留言板

Steps to setup SQL server database for Liferay?

Kieu Phong,修改在12 年前。

Steps to setup SQL server database for Liferay?

New Member 帖子: 6 加入日期: 11-12-12 最近的帖子
Hi,

Please help to share the information about the steps to setup SQL server database for Liferay?
Include:
- How to change the configuration of portal to switch from default database (hypersonic) to SQL server?
- How to create Liferay table in database server?
- How to update database if any?
-...
Currently, I am using Liferay portal 6.0.6.

Thanks for your helps!
thumbnail
Sandeep Nair,修改在12 年前。

RE: Steps to setup SQL server database for Liferay?

Liferay Legend 帖子: 1744 加入日期: 08-11-6 最近的帖子
Create a database in you SQL server named lportal or anything that you like.

Create a file called portal-ext.properties and place it in tomcat\Root\WEB-INF\classes or LIferay_home directory

Add the following in your portal-ext.properties\

#
# SQL Server
#
jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
jdbc.default.url=jdbc:jtds:sqlserver://localhost/lportal
jdbc.default.username=sa
jdbc.default.password=

Change username and password with whatever you are having for SQL server

Restart the liferay server.

It should start up properly and one server is up, you should be able to see all the tables created in lportal database that you have create.

Troubleshoot : Whiler server startup if you find ClassNotFoundException for net.sourceforge.jtds.jdbc.Driver, then make sure your tomcat/lib/ext has jtds.jar(sql server driver) already present and if not then put it there.

Regards,
Sandeep
Kieu Phong,修改在12 年前。

RE: Steps to setup SQL server database for Liferay?

New Member 帖子: 6 加入日期: 11-12-12 最近的帖子
I got it. Thanks you very much for your help!
Taruchit Goyal,修改在5 年前。

RE: Steps to setup SQL server database for Liferay?

Junior Member 帖子: 60 加入日期: 18-3-16 最近的帖子
Hello
I am using Liferay DXP and Heidi SQL. Does the above steps work for it? If not, please help with the required steps for setting up db connection.
Thanks
Taruchit
thumbnail
Olaf Kock,修改在5 年前。

RE: Steps to setup SQL server database for Liferay?

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Taruchit Goyal:
I am using Liferay DXP and Heidi SQL. Does the above steps work for it? If not, please help with the required steps for setting up db connection.


HeidiSQL looks like a frontend for various databases, rather than a backend to store data (correct me if I'm wrong). Figure out which database you're using in the backend (as you're on DXP, preferably one of the supported or certified ones) and go through the standard installation procedure with that database.
Taruchit Goyal,修改在5 年前。

RE: Steps to setup SQL server database for Liferay?

Junior Member 帖子: 60 加入日期: 18-3-16 最近的帖子
I am using the default option stated while setting up Liferay DXP: Hypersonic db.
As I understand, Heidi SQL will be used to query it. However, I am too new to it, thus, please correct me if the concept goes wrong.
Please suggest if some other db is required for the same, and the steps or link to tutorial for connecting db to the setup.

Regards
Taruchit
thumbnail
Olaf Kock,修改在5 年前。

RE: Steps to setup SQL server database for Liferay?

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Taruchit Goyal:
I am using the default option stated while setting up Liferay DXP: Hypersonic db.
As I understand, Heidi SQL will be used to query it. However, I am too new to it, thus, please correct me if the concept goes wrong.
Please suggest if some other db is required for the same, and the steps or link to tutorial for connecting db to the setup.


hsql is good for a demo system, but not for production. In case of a power outage during it writing (or your server process terminating abruptly for any other reason), it's easy to loose data. Plus, as soon as you have a lot of data in there, you'll end up having everything in memory.

I'd recommend to choose a proper database for anything other than a local demo system that you don't care about. I'll leave the choice to you: You'll have to install/backup/recover it, and my choice won't help you do so.

There's not much to do - other than making sure that the database of your choice uses UTF-8 as the default character set.
Taruchit Goyal,修改在5 年前。

RE: Steps to setup SQL server database for Liferay?

Junior Member 帖子: 60 加入日期: 18-3-16 最近的帖子
Thank you for your inputs.
I was able to configure Liferay with Maria DB 10.2.