Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Hery Sutanto
SQL server database no tables and data
June 14, 2012 3:23 AM
Answer

Hery Sutanto

Rank: Junior Member

Posts: 81

Join Date: June 3, 2012

Recent Posts

I have managed to established connection using SQL server....
but unfortunately there are no table created when I check the database.... in some article someone mention to use script to pre-create the table....
still there is no data in the table... while using MySql I can see the data...

Is anyone encounter similar issue as above?

Regards,

Hery
Jan van der Kaaden
RE: SQL server database no tables and data
June 14, 2012 2:29 PM
Answer

Jan van der Kaaden

Rank: New Member

Posts: 20

Join Date: March 20, 2011

Recent Posts

Hi Hery,
I have Liferay 6.1 6.0 and 5.2 running with SQL server. Can you tell how you connect to the database and if there is any logging when you startup Liferay?

Regards,
Jan
Brian Scott Schupbach
RE: SQL server database no tables and data
June 14, 2012 2:51 PM
Answer

Brian Scott Schupbach

Rank: Expert

Posts: 329

Join Date: October 23, 2008

Recent Posts

When you startup the server take a look at the log...by default it will be an HSQL database. If you really are connected to the database a script will run when the portal is starting and insert tables/data. So, my guess is that you are still using the HSQL database and are not connected to your database.
Hitoshi Ozawa
RE: SQL server database no tables and data
June 14, 2012 3:07 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

I have managed to established connection using SQL server....


How have you checked if you have established connection when no tables were created and when no data is being inserted?
It seems you really haven't established connection yet.
Hitoshi Ozawa
RE: SQL server database no tables and data
June 14, 2012 3:40 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Seems liferay 6.1.0 CE has a bug with SQL Server. Try using 6.0.6.

http://issues.liferay.com/browse/LPS-24850
Hery Sutanto
RE: SQL server database no tables and data
June 15, 2012 1:38 AM
Answer

Hery Sutanto

Rank: Junior Member

Posts: 81

Join Date: June 3, 2012

Recent Posts

Jan van der Kaaden:
Hi Hery,
I have Liferay 6.1 6.0 and 5.2 running with SQL server. Can you tell how you connect to the database and if there is any logging when you startup Liferay?

Regards,
Jan



Hi Jan,

I keep track on the catalina.bat execution... while it's running in command prompt when it hits... portal-ext.properties
previously when there are errors, then there are always exception get load out in command prompt...... jdbc exceptions...

Regards,

Hery
Hery Sutanto
RE: SQL server database no tables and data
June 15, 2012 1:45 AM
Answer

Hery Sutanto

Rank: Junior Member

Posts: 81

Join Date: June 3, 2012

Recent Posts

Brian Scott Schupbach:
When you startup the server take a look at the log...by default it will be an HSQL database. If you really are connected to the database a script will run when the portal is starting and insert tables/data. So, my guess is that you are still using the HSQL database and are not connected to your database.



Hi Brian,

Yeah I am aware of that... Hitoshi told me previously to rename the 'hsql' folder into something else then liferay will create a new one... and yes indeed I did renamed the folder again and with connection string to sql server but it doesn't create a new 'hsql' folder while if I didn't set up any sql server connection string.... the folder will be created and any previous changes that I have done before are not there


Regards,

Hery
Hery Sutanto
RE: SQL server database no tables and data
June 15, 2012 1:54 AM
Answer

Hery Sutanto

Rank: Junior Member

Posts: 81

Join Date: June 3, 2012

Recent Posts

Hitoshi Ozawa:
I have managed to established connection using SQL server....


How have you checked if you have established connection when no tables were created and when no data is being inserted?
It seems you really haven't established connection yet.


When I change the password of my sqlserver connection, it back to the same error.... when I put the correct one it launch the Liferay and also the previous changes that I made while using Hypersonic DB all gone....

Regards,

Hery
Hitoshi Ozawa
RE: SQL server database no tables and data
June 15, 2012 5:15 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

What does the console say? There should be some messages about connecting to the database.
David H Nebinger
RE: SQL server database no tables and data
June 16, 2012 8:56 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11109

Join Date: September 1, 2006

Recent Posts

Hery Sutanto:
I have managed to established connection using SQL server, but unfortunately there are no table created when I check the database


Verify that you're using the jdts driver for SQL server access (that's the best one for pointing Liferay at SQL server).

Verify that the credentials you're using to connect to the database have the appropriate permissions to create and alter tables and insert/update/delete data (DBA privileges are the easiest way to assign necessary permissions).
Hery Sutanto
RE: SQL server database no tables and data
June 18, 2012 7:56 PM
Answer

Hery Sutanto

Rank: Junior Member

Posts: 81

Join Date: June 3, 2012

Recent Posts

Hitoshi Ozawa:
What does the console say? There should be some messages about connecting to the database.



02:46:31,835 INFO [DialectDetector:80] Determine dialect for Microsoft SQL Serv
er 10
02:46:32,275 INFO [DialectDetector:145] Found dialect com.liferay.portal.dao.or
m.hibernate.SQLServer2008Dialect
Starting Liferay Portal Community Edition 6.1.0 CE (Paton / Build 6100 / January
6, 2012)
02:47:56,006 INFO [BaseDB:409] Database does not support case sensitive queries

That's all that I got from the log

Regards,

Hery
Hery Sutanto
RE: SQL server database no tables and data
June 18, 2012 8:04 PM
Answer

Hery Sutanto

Rank: Junior Member

Posts: 81

Join Date: June 3, 2012

Recent Posts

David H Nebinger:
Hery Sutanto:
I have managed to established connection using SQL server, but unfortunately there are no table created when I check the database


Verify that you're using the jdts driver for SQL server access (that's the best one for pointing Liferay at SQL server).

Verify that the credentials you're using to connect to the database have the appropriate permissions to create and alter tables and insert/update/delete data (DBA privileges are the easiest way to assign necessary permissions).


Hi David,

Yes I have verified the permission, the account has sysadmin role.... another things that is weird is that any changes that I made got stored somewhere, when I restart Liferay after I have made changes, the changes remain there...

but checking the table in the sql server, all is empty....

Regards,


Hery
Hery Sutanto
RE: SQL server database no tables and data
June 19, 2012 12:32 AM
Answer

Hery Sutanto

Rank: Junior Member

Posts: 81

Join Date: June 3, 2012

Recent Posts

Hi everyone,

It turns out Liferay did create table but in master database, that's because the default database of that particular user is master.
After I change the default database of the user into lportal it works out fine emoticon

Thanks all,

Hery
Hitoshi Ozawa
RE: SQL server database no tables and data
June 19, 2012 10:40 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Nice to hear that it's working OK now. You really go me perplex on this one. :-)
Raja Datla
RE: SQL server database no tables and data
October 31, 2013 9:42 AM
Answer

Raja Datla

Rank: New Member

Posts: 3

Join Date: February 22, 2010

Recent Posts

Hery Sutanto:
Hi everyone,

It turns out Liferay did create table but in master database, that's because the default database of that particular user is master.
After I change the default database of the user into lportal it works out fine emoticon

Thanks all,

Hery



Oh my!!! I just went mad until I've seen this! thanks dude! emoticon