Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Shyamal Pal
Setting up database for liferay portal-6.1
August 28, 2012 5:44 AM
Answer

Shyamal Pal

Rank: New Member

Posts: 1

Join Date: August 8, 2012

Recent Posts

Hi,

I am using liferay portal 6.1.
It's default database is HSQL.
Now I want to change it to ORACLE batabase.

Can someone please tell me what is the procedure to change the datasource for liferay portal as ORACLE.

Oracle DB version - 10g

Thanks
Hitoshi Ozawa
RE: Setting up database for liferay portal-6.1
August 28, 2012 5:48 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Try reading liferay's documents before posting questions here.

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/installing-lifer-1
Vishal Panchal
RE: Setting up database for liferay portal-6.1
August 28, 2012 9:35 AM
Answer

Vishal Panchal

Rank: Expert

Posts: 288

Join Date: May 20, 2012

Recent Posts

Shyamal Pal:
Hi,

I am using liferay portal 6.1.
It's default database is HSQL.
Now I want to change it to ORACLE batabase.

Can someone please tell me what is the procedure to change the datasource for liferay portal as ORACLE.

Oracle DB version - 10g

Thanks


Hi ,
First of all It's default database is not HSQL but it is hypersonic.
Now You can set specific database instead of hypersonic by overriding default portal.properties file .
All you have to do is to make portal-ext.properties file containing properties related to ORACLE 10g.
put this file @ tomcat level and than restart your server.

You have to add following lines in portal-ext.properties file
#
# Oracle
#
jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.default.url=jdbc:oracle:thin:@localhost:1521:xe
jdbc.default.username=lportal
jdbc.default.password=lportal

For configuring other databases please visit this link.

Thats it..!!


Thanks & Regards,
Vishal R. Panchal
Hitoshi Ozawa
RE: Setting up database for liferay portal-6.1
August 28, 2012 4:38 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

You'll also have to first create a database schema for liferay to use and create a user with administrative privileges so liferay will be able to create tables.
Juan Gonzalez
RE: Setting up database for liferay portal-6.1
August 29, 2012 8:13 AM
Answer

Juan Gonzalez

Rank: Liferay Legend

Posts: 3060

Join Date: October 28, 2008

Recent Posts

You can use Liferay data migration section in Control Panel -> Server Admin (don't remember the name exactly).

You have to add oracle jar to classpath before that.
Shankar Baba
RE: Setting up database for liferay portal-6.1
December 6, 2012 1:56 AM
Answer

Shankar Baba

Rank: Regular Member

Posts: 144

Join Date: October 17, 2012

Recent Posts

Is there any other way insted of setting properties in portal-ext.properties?
Jitendra Rajput
RE: Setting up database for liferay portal-6.1
December 6, 2012 11:20 PM
Answer

Jitendra Rajput

Rank: Liferay Master

Posts: 875

Join Date: January 7, 2011

Recent Posts

You can also connect to your data source using JNDI look up setting in tomcat .

Modify context.xml (available inside /conf)

 1
 2
 3 <Resource name="jdbc/LiferayPool" auth="Container" type="javax.sql.DataSource"
 4                   maxActive="500" maxIdle="120" maxWait="20000"
 5                   username="root" password="root"
 6    driverClassName="net.sourceforge.jtds.jdbc.Driver"
 7                   url="jdbc:jtds:sqlserver:/localhost/lportal"
 8                   removeAbandoned="true"
 9                   removeAbandonedTimeout="20"
10                   logAbandoned="true"
11                   minEvictableIdleTimeMillis="3600000"
12                   timeBetweenEvictionRunsMillis="1800000"
13                   numTestsPerEvictionRun="10"
14                   testWhileIdle="true"
15                   testOnBorrow="true"
16                   testOnReturn="false"
17               />
18
19</Context>


And set below property in your portal-ext

jdbc.default.jndi.name=jdbc/LiferayPool
Shankar Baba
RE: Setting up database for liferay portal-6.1
December 14, 2012 9:59 PM
Answer

Shankar Baba

Rank: Regular Member

Posts: 144

Join Date: October 17, 2012

Recent Posts

If ur using liferay 6.1 it will ask u to change the db in starting page itself, check the option should be there, and select the oracle db from drop down from there, thats it.
Hope this will help u.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!