Earlier i blogged about how to connect to HSQL DB from command prompt using HSQL Database Manager. Now as per request i have blogged to connect to HSQL DB form Eclipse
> Open Data source explorer in Eclipse
> Right click on Database Connections > New, you see screen looking like below as shown in Figure.1
> Type hsql as showing screen below & select HSQLDB - Give a name to your DB connection
Figure.1 |
> Do as described in Figure.2 below(Point to a Liferay DB which is using HSQL)
Figure.2 |
Figure.3 |
> Now you have to give proper Liferay DB name & Database location - Give DB connection other will be populated automatically. Check the save password check box. In my case DB location is
D:\projects\liferay\lr52sp3\liferay-portal-5.2-ee-sp3\data\hsql\lportal
You change this path according to your Liferay instance DB running on HSQL
> You can test the connection as show below
> You will be redirect to Datasource Explorer, which looks like below
Please feel free to add comments.
Cheers :)
Great blog!
ReplyDeleteThanks Nagendra, that was very helpful.
This comment has been removed by the author.
ReplyDeleteHi Nagendra,
ReplyDeleteThanks for the article.It's working nice for 6.0.5 but i am unable to do the same for LR 6.1.
Any pointer?
Can you please share error what you are getting for LR 6.1, basically this configuration nothing to do with version Liferay - from the eclipse point of view just connecting to any DB
ReplyDeleteHi I also get the same problem for Liferay 6.1 :
ReplyDelete- the database name is not filled
- if I try with lportal (file names are lportal) no tables are present
Ok I fixed (on luck).
ReplyDeleteInstead of filling the location as ${liferay.home}/data/hsql (in Liferay6.1 there is not lportal directory in it), I used ${liferay.home}/data/hsql/lportal
(and lportal as db name)
Now this works fine.
Thank you very much for sharing info
ReplyDeleteThis comment has been removed by the author.
ReplyDeletei want to add new table in sample database which is present in hsqldb.can you explain me the steps required for this process??
ReplyDeleteI hope it should be fairly as simple as adding a table in traditional RDBMS using create table syntax listed below
ReplyDeletehttp://www.w3schools.com/sql/sql_create_table.asp
let me know if you are not able to do it
Using service builder i have created a table but i was not able to find it in lportal db where can i find it
ReplyDeleteAre you trying to use HSQL even for your custom portlet development?
DeleteAre you able to see other liferay default tables?
By default service builder related tables will be generated with the namespace your provided in namespace element of service.xml under service-builder along with entity name