Tuesday, April 7, 2015

Plan & Database Audit

TWS Plan & Database updates audit.

We can track the updates on TWS Plan and Database, to switch it on perform the following steps:

   1. Turn on the audit on database:
Change the enDbAudit / da value from 0 to 1 (0=off 1=on).
optman chg enDbAudit=1 or optman chg da=1

   2. Turn on the audit on plan:
Change the enPlanAudit / pa value from 0 to 1 (0=off 1=on).
optman chg enDbAudit=1 or optman chg pa=1

  3. Set-up where to store the audit files:
Set the auditStore / as value to FILE (default) / DB / BOTH (FILE - to be stored in files only, DB - to be stores in TWS DB only, BOTH to be stored in files and TWS DB).
optman chg auditStore=BOTH or optman chg as=BOTH
The audit files can be found in:
On Linux / Unix:
/<TWS_home>/audit/plan or /<TWS_home>/audit/database
On Windows:
<TWS_home>\audit\plan or <TWS_home>\audit\database

!!! NOTE: In the audit file you will find what object was changed, when and by whom, but there is no record of what was changed in that particular object.

Friday, April 3, 2015

TWS LTPA key update / exchange

Sometimes the LTPA (Lightweight Third-Party Authentication) key need to be updated for TWS / TDWC or exchanged between several TWS / TDWC servers in order to connect from any TDWC (tivoli Dynamic Workload Console) to any TWS / TDWC. Usually this exchange is done automatically (totally transparent for end user) but it some cases it doesn't work and manual exchange is needed.

To update or export / import LTPA key perform the following steps:

   1. Connect to TWS / TDWC WebSphere, administrative console:
Default path: https://:31124/ibm/console/logon.jsp?action=OK

   2. Log in using the administrative account and navigate to Security -- Global security -- Authentication -- LTPA

   3. To generate a new key press the Generate keys button from Key Generation menu or if you need to export / import the key in Cross-cell single sign-on menu add a Password / Confirm Password and a Fully qualified key file name and press Export Keys.

   4. To import the key, copy the exported key from step 3. on the target server, repeat steps 1 and 2 for the target and in Cross-cell single sign-on menu add a the  Password / Confirm Password from step 3. type the path and file name in Fully qualified key file name and press Import Keys.

   5. Save the changes are you are done (there is no need to restart the WebSphere).

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):
OracleType4URL=jdbc:oracle:thin:@//<db server name>:1521/TWS_DB
DB2Type4ServerName=<db server name>

   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:
On Windows:

   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@