Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Separate db connections for branches-database.xml
r_pal007
Hi!
The scenario for the problem is that , i have 2 databases Ora1 and Ora2 and 2 Branches Br1 and Br2. I need to connect to Ora1 from Br1
and Ora2 from Br2.
Br1-->Ora1
Br2-->Ora2.
Is this kind of configuration possible? If yes, how and where can i specify the configuration ? If i add 2 <database> elements in database.xml, how do i specify which one to use for which branch?
Using TeamSite 6.1.
Thanks in advance.
Find more posts tagged with
Comments
fish
I've not done this but the database.xml file has a 'name' element that specifies the database connection parameters. I assume that the XML file can have multiple names and then the *dd.cfg files that are specified at a branch level refer to required 'named' db connection.
Steve.
r_pal007
Thanks! .But i was wondering if i could do the same in some common files rather than specific *_dd.cfg files since they can be recreated after deletion
and running the iwsyncdb.ipl -initial command. In that case , i would lose all my configurations.
fish
As far as I know they have to be *_dd.cfg files and those files must be on the branch level.
Afraid that I am not exactly clear on your issue I usually make any changes to the dd.cfg files manually if any schema changes are made. Probably not the Interwoven way but hey it has worked for me thus far ...
-----------------------
Steve.
jajtiii
You can place the *_dd.cfg in any location (I use iw-home/datadeploy/config/deployments) and you could specify the different databases by using some of the tips above.
You would first create an entry for each db in the database.xml, like so :
<database
name = "oracle9iDB1"
db = "initux21:1521
RA1"
user = "user"
password = "password"
vendor = "oracle"/>
<database
name = "oracle9iDB2"
db = "initux21:1521
RA2"
user = "user"
password = "password"
vendor = "oracle"/>
You would need a *_dd.cfg for each branch and, at the start have the following :
<data-deploy-configuration>
<data-deploy-elements filepath="/usr/iw-home/datadeploy/conf/database.xml" /> (or wherever your database.xml is located).
Then, in the deployments of the *_dd.cfg, you would call whichever database is required of the branch in question by utilizing the name of the set in the database.xml, like so :
<destinations>
<!-- Oracle -->
<database use ="oracle9iDB1"
and in the second *_dd.cfg, you would have
<destinations>
<!-- Oracle -->
<database use ="oracle9iDB2"
Edited by jajtiii on 01/11/05 07:56 AM (server time).
r_pal007
Thanks for all the suggestions. Was wondering is there any way, that while running the iwsyndb.ipl -initial command, i can specify the name of the database where the tables need to be created/updated.
Thnks in advance.