Here, We are liferay data migrating from HSQLDB to ORACLE DB.
Data migration
In addition, you may plan to
move data from Database to
database. You can do it by following
these steps:
1.
Add
ojdbc<VERSION>.jar in lib/ext
(based our target database. Here we are using oracle database().)
2.
Goto Control Panel : Server
Administration under the category Server of Control Panel.
2. Click on the tab: Data Migration.
Enter the valid details
JDBC Driver Class Name :
oracle.jdbc.driver.OracleDriver ( Enter your Driver class name)
JDBC URL: jdbc:oracle :thin:@10.10.10.00:0000:ORCL (Enter URL of
your driver)
JDBC User Name:test (Enter
database user name)
JDBC Password :secret (Enter
database password)
- Click on the Execute button to convert existed database to Oracle database. After clicked we will get the below screen shot.
- Open tomcat console of the server and check the console messages. Application it will take backup of all existed table’s data.
- Wait until get the below mentioned messages at the end of the tomcat console:
12:04:14,593 DEBUG [MaintenanceUtil:64] Please change your JDBC
settings before restarting server
12:04:14,593 INFO [ConvertProcess:47] Finished conversion for
com.liferay.portal.convert.ConvertDatabase in 15359 ms
- Shut down the server (Goto D:\iSolutions\Application\tomcat-6.0.29\bin folder and double click on the shutdown.bat)
- Open context.xml file(available in D:\iSolutions\Application\tomcat-6.0.29\conf folder) add another resource entry :
<Resource
auth="Container"
driverClassName="oracle.jdbc.driver.OracleDriver"
maxActive="100" maxIdle="30" maxWait="10000"
name="jdbc/application" password="secret"
type="javax.sql.DataSource" url="jdbc:oracle:thin:@10.16.10.81:1521:ORCL"
username="test "/>
Syntax :
for name=”jdbc/SCHEMA_NAME” . Here we are
assuming you created new schema with ‘application’.
For url=”jdbc:oracle:thin:@<DB_SERVER_IP>:<DB_PORT>:DB_SID”
- Open portal-ext.properties file(available in D:\iSolutions\Application folder) and add the below entry :
jdbc.default.jndi.name=jdbc/application
(Here application is your schema name)
- Start server(Goto D:\iSolutions\Application\tomcat-6.0.29\bin folder and double click on the startup.bat) and verify server identify oracle dialect or not. (identified from the tomcat console.)
Sample msg:
12:38:31,171 INFO
[DialectDetector:69] Determining dialect for Oracle 10
12:38:31,593 INFO [DialectDetector:49] Using dialect
org.hibernate.dialect.Oracle10gDialect
No comments:
Post a Comment