Thursday, May 9, 2013

Change Derby DB default port 1527 and more

Weblogic comes with Derby database. The default port is 1527. I want to change it to 1528. Ideally, I'd like to set it in weblogic scripts. I couldn't quite do it. Here is my work around, just in case you desperately need to change it.

WL_HOME/common/derby/bin/startNetworkServer.bat (be careful, it's .bat, not the .cmd)

add this at the top of the file (

You also need to update your domain config/jdbc/*.xml where necessary to 1528 if they references 1527.

Of course, finally, any of your apps that have explicit reference to 1527 also need be updated.

BTW, I tried to change from startWebLogic.cmd

 set DERBY_CMD_LINE_ARGS=-p 1528
 call "%WL_HOME%\common\derby\bin\startNetworkServer.cmd" >"%DOMAIN_HOME%\derby.log" 2>&1

That didn't quite work for me. I scratched my head for long time why the "set" command won't take effect. There must be some other command within the weblogic script set that disabled "set". I couldn't figure out why. Even if "set" command were to work, I still can't figure out how to make the Derby script to see DERBY_CMD_LINE_ARGS setting. Anyone can make it work, i'd like to hear.

5/20/13 - hmm.., just found this link:
Haven't read the details yet, but sounds like interesting...

If you simply getting tired of seeing Derby pops up every time you start weblogic, the best spot to disable it is setDomainEnv.cmd, simply comment out line "set DERBY_FLAG=true". Of course, that's assuming you know what you are doing. If you configured OSB in the domain, by default, it uses Derby for "reporting" service. Turning off Derby will result in jdbc errors when starting Weblogic and OSB. If you don't use OSB reporting, you can simply untarget wlsbjmsrpDataSource. Or you can read this post, find the Oracle Db script for OSb reporting, create the tables in Oracle DB, then reconfigure wlsbjmsrpDataSource to point Oracle DB.

Depends on how your installed the OWSM, it may also use Derby. If that's the case, it may not be able to simply turn off derby. That, you may need to re-run RCU or re-install the SOA suite.

If you simply want to mess around with derby DB, here is a good link

No comments:

Post a Comment