Thursday, April 2, 2015

DB connection update


In some cases the DB connection needs to be updated (e.g. new DB server, failure on primary on DB server, DR fail-over / validation).

To update the DB server connection perform the following steps:

   1. Stop TWS: 

On Linux / Unix:
./<TWS_home>/wastools/stopWas.sh -direct -user<TWS user> -password <TWS user password&gt
On Windows:
<TWS_home>\wastools\stopWas.bat -direct -user<TWS user> -password <TWS user password>
Note !!! "-direct" -- flag it is used in version 8.4 and above.


   2. Export the connection properties:

On Linux / Unix:
./<TWS_home>/wastools/showDataSourceProperties.sh > /tmp/DataSourceProps.new
On Windows:
<TWS_home>\wastools\showDataSourceProperties.bat > %TEMP%\DataSourceProps.new

   3. Edit the data file DataSourceProps.new and adjust the below values with the new ones:

Oracle (depending on the jdbc drivers you use):
OracleType2URL=jdbc:oracle:oci:@TWS_DB
OracleType2DatabaseName=TWS_DB
OracleType2PortNumber=1521
or
OracleType4URL=jdbc:oracle:thin:@//<db server name>:1521/TWS_DB
OracleType4DatabaseName=TWS_DB
OracleType4PortNumber=1521
DB2:
DB2Type4DatabaseName=TWS_DB
DB2Type4ServerName=<db server name>
DB2Type4PortNumber=50000

   4. Import the new connection properties:

On Linux / Unix:
./<TWS_home>/wastools/changeDataSourceProperties.sh /tmp/DataSourceProps.new
On Windows:
<TWS_home>\wastools\changeDataSourceProperties.bat %TEMP%\DataSourceProps.new

   5. Start TWS:

On Linux / Unix:
./<TWS_home>/wastools/startWas.sh
On Windows:
<TWS_home>\wastools\startWas.bat

   6. Validate the new set-up by running a composer command or use the GUI (TDWC) to display a DB object.

On Linux / Unix
./<TWS_home>/bin/composer di @#@FINAL@
On Windows:
<TWS_home>\bin\composer.exe di @#@FINAL@


1 comment:

  1. Sands Casino | Entertainment, gaming, hotel - Treasure Island
    The Sands Casino 메리트카지노총판 Resort is a 1xbet casino located on the beautiful Las Vegas Strip septcasino in Treasure Island, California. The casino features a 24-hour poker room

    ReplyDelete