Moving the database instance from one server to another
This topic provides information about how to change the database connection information on the reports server when the Oracle database instance moves from one server to another. You might need to move your instance in case of database crash.
Before you begin
Back up the tnsnames.ora file on the reports server and on the server where Oracle database instance is running. This file is typically located in the ORACLE_HOME/NETWORK/ADMIN directory.
To update the database connection information
Update the tnsnames.ora files on the reports server and the Oracle database instance with the new connection string information for the BMC Server Automation database and the reports warehouse, portal, and ETL Master and Work databases.
The following example shows the new connection string information for various databases:
NEWBLDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = newbldb.xxx.com) (PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = NEWBLDB)))
NEWWHSE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = newwhse.xxx.com) (PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = NEWWHSE)))
NEWPORTAL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = newportal.xxx.com) (PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = NEWPORTAL)))- Log on to the reports server as a root user (UNIX) or as an Administrator (Windows).
- Log on to SQL*Plus as the BSARA_DW user (reports data warehouse user) with the new warehouse connection information by using the following command: sqlplus BSARA_DW@newconnectionstringinfo
Identify and drop the current linked server by using the following commands:
select * from user_db_links;
DROP DATABASE LINK <linkedServerName>;Create a new linked server with the new connection information of the BMC Server Automation database by using the following command:
CREATE DATABASE LINK <linkName> CONNECT TO <BMCServerAutomationUser> IDENTIFIED BY <password> USING '<TNSNAMEfornewBMCServerAutomationdatabase>';For example:
CREATE DATABASE LINK DB_SITE1_LINK CONNECT TO BLADELOGIC IDENTIFIED BY password USING 'NEWBLDB';- (Optional) Display the new linked server by using the following command: select * from user_db_links;
- Exit from SQL*Plus.
- From the BDSSAInstallationDirectory/bin directory, run the following command to start the Report Administration Utility: nsh blrptadmin.nsh.
On the blrptadmin prompt, run the gencred command with a user that has the GlobalReportAdmins role, generally BLAdmin. For the SRP authentication type, code is 1.
blrptadmin> gencred
Enter options for gencred
Enter GlobalReportAdmin Site: Primary
Enter GlobalReportAdmin User Name: BLAdmin
Enter GlobalReportAdmin role name: BLAdmins
Enter authentication type: 1
Enter password:
User credentials file bmcsareports_user.dat generated successfully.
File is placed under : /root/home/.bmcsareports Make sure only user has permissions to file.(Optional) View the current information for various databases and sites.
Update the connection string in the reports warehouse database by using the set warehouse command, as shown in the following example:
blrptadmin> set warehouse
Accept argument for command: Do you want to use cached credentials as generated by gencred command? (y/n):y
Enter database user: BSARA_DW
Enter database password [Optional]:
Confirm password:
Enter JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=newwhse.xxx.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=NEWWHSE)))
Enter TNS Name: NEWWHSE
Successfully modified Config files.
Restarting portal and cognos services......
Datasource ORA75 could not be tested successfully.
Warehouse configuration set successfully and all services restarted successfully
Set warehouse successfully.Update the connection string in the portal database by using the set portalcontentstore command, as shown in the following example:
blrptadmin> set portalcontentstore
Accept argument for command: Do you want to use cached credentials as generated by gencred command? (y/n):y
Enter database type (sqlserver | oracle):: oracle
Enter database user: BSARA_PORTAL
Enter database password [Mandatory]:
Confirm password:
Enter JDBC URL: (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL = TCP)(HOST=newportal.xxx.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=NEWPORTAL)))
Changed portal content store database settings,
Please restart portal to reflect portal content store changes.Update the connection string in the ETL Master and Work databases by using the set etldb command, as shown in the following example:
blrptadmin> set etldb
Accept argument for command: Do you want to use cached credentials as generated by gencred command? (y/n):y
Enter database type (sqlserver | oracle):: oracle
Eneter Master Repository User Name: BSARA_ETL_MASTER
Eneter Master Repository Password [Optional]:
Confirm password:
Enter Master Repository User Name Connection String: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=newwhse.xxx.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=NEWWHSE)))
Eneter Work Repository User Name: BSARA_ETL_WORK
Eneter Work Repository Password [Optional]:
Confirm password:
Enter Work Repository User Name Connection String:
jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=newwhse.xxx.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=NEWWHSE)))
Changed etl settings successfully, Please restart Cognos Service and login Metadata Navigator to reflect changes before executing ETLUpdate the connection string in the reports warehouse database again by using the set warehouse command, as shown in the following example:
blrptadmin> set warehouse
Accept argument for command: Do you want to use cached credentials as generated by gencred command? (y/n):y
Enter database user: BSARA_DW
Enter database password [Optional]:
Confirm password:
Enter JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=newwhse.xxx.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=NEWWHSE)))
Enter TNS Name: NEWWHSE
Successfully modified Config files.
Restarting portal and cognos services......
Tested datasource ORA75 successfully.
Warehouse configuration set successfully and all services restarted successfully
Set warehouse successfully.Update the connection string in the BMC Server Automation database by using the set context command, as shown in the following example:
blrptadmin> set context
Accept argument for command: Do you want to use cached credentials as generated by gencred command? (y/n):y
Enter site name: Primary
Enter linked server/database link name: db_site1_link
Enter database type (sqlserver | oracle):: oracle
Enter database user: BLADELOGIC
Enter database password [Mandatory]:
Confirm password:
Accept argument for command:JDBC Connection Params For ORACLE JDBC Url (y/n):y
Enter JDBC URL: jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=newbldb.xxx.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=NEWBLDB)))
Database link db_site1_link connection test successful
Set context successfully.- Exit the Report Administration Utility.
- Stop the reports server.
- Restart the reports server.