16
UPGRADE BPPM FROM 11GR2 TO 12C WITH ORACLEPDB Best practice document MAY 27, 2015 BMC SOFTWARE INC. [Company address]

upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

Embed Size (px)

Citation preview

Page 1: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

upgrade bppm from 11gr2 to 12c with oraclepdb

Best practice document

MAY 27, 2015BMC Software Inc.[Company address]

Page 2: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

Upgrade BPPM 9.6 from using Oracle 11gr2 to Oracle 12c cdb

Pre-requisites:BPPM: Should be on 9.6 (Malibu)

Oracle: Should be on 11.2.0.3. (11g R2 latest patch)

Summary of steps to be carried out.The upgrade-migrate of oracle 11GR2 to 12C need to be achieved in two phases. This document

describes the process to migrate using Phase 2.

Phase 1: Install Oracle 12C on same machine or another machine

Phase 2: Migrate data from 11gr2 db to 12c database server.

1. Install Oracle 12C fresh with a new SID on a new machine2. Create three separate pdbs for catering to three BPPM setups 3. Create users, tablespaces on each pdb that matches the number of bppms present

on oracle.4. Stop all the BPPM server by running the command pw system stop – Down time

starts5. Export data from source database (11gr2):6. Import user and data into 12c pdbs7.8. Start all the BPPM server by running the command pw system start - Down time

ends.9.

Advantages: Less down time for transition.

Need Storage on the database machine (3 times the database size for migration)

On oracle 11gr2- size of

Page 3: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

Create three separate pdbs for catering to three BPPM setups

1. On the Oracle 12 C machine, create 3 pdbs, using database configuration assistant.

Ex: pdb names: (CMA1, child1, and child2).

2. Creating PDB on 12 C Screenshot3. Please ensure that oracle Home is set, the same can be verified as below

C:\Pramod_oracle\Utilities\oracle\12C\PDB>set | findstr oracleORACLE_HOME=C:\oracle\produc\12.1.0\db_1Path=C:\oracle\produc\12.1.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\

4. Once all the pdbs are created, ensure that in the <Oracle install directory>\produc\12.1.0\db_1\NETWORK\ADMIN\tnsnames.ora file has the following entries for the three pdbs in the format below

CMA1 =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = clm-pun-007660)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = cma1)

)

)

CHILD1 =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = clm-pun-007660)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = CHILD1)

)

Page 4: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

)

CHILD2 =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = clm-pun-007660)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = CHILD2)

)

)

1. Add this line into the file listener.ora under the directory Oracle install directory>\produc\12.1.0\db_1\NETWORK\ADMIN\listener.ora

USE_SID_AS_SERVICE_LISTENER=on

This will allow the Java/JDBC clients to connect to the pdb seamlessly using pdb name as sid/service.

2. Restart Oracle Listener and use the command as below.

lsnrctl stop – to stop the listener

snrctl start - to start the listener

3. Verify the pdb creation from C:\oracle\produc\oradata\ORA12CNT all the 3 pdb folder will be created.

4. Ensure that all the created 3 pdb are running and opened, to verify that by running the startup as below for Cma1, child1 & child2 as well.

Create users, tablespaces on each pdb that matches the number of bppms present on oracle.

1. From the 9.6 installable directory copy the entire utilities directory to the oracle 12c server machine.

2. Please ensure that oracle Home is set, the same can be verified as below

Page 5: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

C:\Pramod_oracle\Utilities\oracle\12C\PDB>set | findstr oracleORACLE_HOME=C:\oracle\produc\12.1.0\db_1Path=C:\oracle\produc\12.1.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\

3. From the cdb directory as mentioned below, configure the oracle parameters by running the following script.

<Copied directory>\Utilities\oracle\12c\cdb\set_system_parameter_oracle_pnet.sql

Connecting to cdb with ora12cnt as the SID.

Cmd> sqlplus sys/<password>@ora12cnt as sysdba

SQL> @set_system_parameter_oracle_pnet.sql

This script will set the parameters on the oracle 12c and requests for restarting the database. Please do after taking backup as prescribed by script. Relogin as specified by script.

Page 6: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

Once restarted, connect to the three pdbs and create the required users, and tablespaces, needed for each TSIM server.

CMAUsers : proactReport user: proactruMain tablespace name: pnet_ts (Ensure that you create the same tablespace names as present in oracle 11gr2).

Cmd> sqlplus sys/<password@cma1 as sysdba

Sql> @run_oracle_db_scripts.sql

This script asks for the tablespace, main user and report user details. On providing, it will create the same.

Child 1Users : proact1

Report user: proactru1

Main tablespace name: pnet_ts1 (Ensure that you create the tablespace with same names as present in oracle 11g r2).

Cmd> sqlplus sys/<password@child1 as sysdba

Sql> @run_oracle_db_scripts.sql

This script asks for the tablespace, main user and report user details. On providing, it will create the same.

Child 2Users : proact2

Report user: proactru2

Main tablespace name: pnet_ts2 (Ensure that you create the tablespace with same names as present in oracle 11g r2).

Cmd> sqlplus sys/<password@child2 as sysdba

Sql> @run_oracle_db_scripts.sql

This script asks for the tablespace, main user and report user details. On providing, it will create the same. Use PNET_TS2, proact2 and proactru2 for main tablespace, main user, and report user respectively.

Once the required schemas are created, import the exported data from 11g users into 12c.

Page 7: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

Export data from source database (11gr2):Exporting CMA database

On oracle server machine (clm-pu-007659):

Ensure that the oracle Home path is set as above.

1. Create a directory for dumping exported data:

C:\tmp\cma

2. Ensure that this directory has read/write permission

Connect to oracle:

Login with the new sid created C:\oracle\product\11.2.0>sqlplus sys/bmcAdm1n@bppm as sysdba

SQL> CREATE DIRECTORY MY_DATA_PUMP_DIR AS 'C:\tmp\cma';

SQL> GRANT READ, WRITE on DIRECTORY MY_DATA_PUMP_DIR to sys;

SQL>quit

3. Export the main user and report users of CMA Server.

C:\oracle\product\11.2.0\db_1>expdp DIRECTORY=MY_DATA_PUMP_DIR DUMPFILE=MY_DATA_PUMP_DIR:proactexp.dmp LOGFILE=MY_DATA_PUMP_DIR:proactexp.log SCHEMAS=PROACT, PROACTRU

username: sys/bmcAdm1n@bppm as sysdba

Where bppm is the oracle SID

Exporting Child server 1 database:First two steps are same as CMA Server. If space is available then the data can be dumped in the same directory. In case space is constraint, then another directory where space is present can be used. Repeating steps 1 and 2.

1. Create a directory for dumping:

C:\tmp\cma

2. Ensure that this directory has read/write permission

Connect to oracle:

SQL> CREATE DIRECTORY MY_DATA_PUMP_DIR AS 'C:\tmp\cma';

Page 8: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

SQL> GRANT READ, WRITE on DIRECTORY MY_DATA_PUMP_DIR to sys;

SQL>quit

3. Export Child server 1’s main database and report database.

C:\oracle\product\11.2.0\db_1>expdp DIRECTORY=MY_DATA_PUMP_DIR DUMPFILE=MY_DATA_PUMP_DIR:proact1exp.dmp LOGFILE=MY_DATA_PUMP_DIR:proact1exp.log SCHEMAS=PROACT1,PROACTRU1

Username: sys/bmcAdm1n@bppm as sysdba

Where bppm is the oracle SID

Exporting Child server 2 database:First two steps are same as CMA Server. If space is available then the data can be dumped in the

same directory. In case space is constraint, then another directory where space is present can be used. Repeating steps 1 and 2.

1. Create a directory for dumping:

C:\tmp\cma

2. Ensure that this directory has read/write permission

Connect to oracle:

SQL> CREATE DIRECTORY MY_DATA_PUMP_DIR AS 'C:\tmp\cma';

SQL> GRANT READ, WRITE on DIRECTORY MY_DATA_PUMP_DIR to sys;

SQL> quit

3. Export Child server 2’s main database and report database.

C:\oracle\product\11.2.0\db_1>expdp DIRECTORY=MY_DATA_PUMP_DIR DUMPFILE=MY_DATA_PUMP_DIR:proact2exp.dmp LOGFILE=MY_DATA_PUMP_DIR:proact2exp.log SCHEMAS=PROACT2,PROACTRU2

Username: sys/bmcAdm1n@bppm as sysdba

Where bppm is the oracle SID

With these steps the CMA Server, Child Server 1, and Child server 2’s database has been exported and available in c:\tmp\cma directory as shown below. (on oracle 11gr2 machine )

Page 9: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

Copy these files from the oracle 11g box to oracle 12c server machine.

Import user and data into 12c pdbsCMA

Cmd> sqlplus sys/<password>@cma1 as sysdba

SQL> create directory CMA_PUMP_DIR as 'C:\Oracle_dump_copied'; SQL> grant read,write on directory CMA_PUMP_DIR to sys; SQL> quit

Cmd> impdp SCHEMAS=PROACT,PROACTRU DIRECTORY=CMA_PUMP_DIR LOGFILE=CMA_PUMP_DIR:cmaimp.log DUMPFILE= CMA_PUMP_DIR:proactexp.dmp

Username : sys/<password>@cma1 as sysdba

Once import is complete, verify the number of tables present in the imported database matches with what is exported.

Page 10: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

Child1Cmd>sqlplus sys/<password>@child1 as sysdba

SQL> create directory CHILD1_PUMP_DIR as 'C:\Oracle_dump_copied';

SQL> grant read, write on directory CHILD1_PUMP_DIR to sys;

SQL> quit

cmd>impdp SCHEMAS=PROACT1,PROACTRU1 DIRECTORY=CHILD1_PUMP_DIR LOGFILE=CHILD1_PUMP_DIR:child1imp.log DUMPFILE=CHILD1_PUMP_DIR:proact1exp.dmp

username: sys/<password>@child1 as sysdba.

This will import the proact1 and proactru2 contents into the child1 pdb.

Note: As we have already created the usernames, while importing it will show error specifying that the users are already present. This can be ignored.

Child2Cmd>sqlplus sys/<password>@child1 as sysdba

SQL> create directory CHILD2_PUMP_DIR as 'C:\Oracle_dump_copied';

SQL> grant read, write on directory CHILD2_PUMP_DIR to sys;

SQL> quit

Cmd> impdp SCHEMAS=PROACT2,PROACTRU2 DIRECTORY=CHILD2_PUMP_DIR LOGFILE=CHILD2_PUMP_DIR:child2imp.log DUMPFILE=CHILD2_PUMP_DIR:proact2exp.dmp

username: sys/<password>@child2 as sysdba.

This will import the proact2 and proactru2 contents into the child2 pdb.

Note: As we have already created the usernames, while importing it will show error specifying that the users are already present. This can be ignored.

This completes the import procedure on the database.

Change DB configuration for each BPPMCMA:

Connect to CMA server box command prompt.

Ensure that server is not running, pw p l.

Cmd> pw dbconfig set -database oracle -sid cma -host clm-pun-007660:1521 -username proact -password proact -repusername proactru -reppassword proactru

Restart the server using “pw sys start”

Page 11: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

Child1:Connect to Child1 server box command prompt.

Ensure that server is not running, pw p l.

Cmd> pw dbconfig set -database oracle -sid child1 -host clm-pun-007660:1521 -username proact1 -password proact1 -repusername proactru1 -reppassword proactru1

Restart the server using “pw sys start”

Child2:Connect to Child2 server box command prompt.

Ensure that server is not running, pw p l.

Cmd> pw dbconfig set -database oracle -sid child2 -host clm-pun-007660:1521 -username proact2 -password proact2 -repusername proactru2 -reppassword proactru2

Restart the server using “pw sys start”

Appendix: Creation of pdbs on Oracle 12c Hostname that we have used for this doc is

Clm-pun-007659- Oracle 11gr2

Clm-pun-007660- Oracle 12c

Page 12: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2
Page 13: upgrade bppm from 11gr2 to 12c with oraclepdb · Web viewOracle: Should be on 11.2.0.3. (11g R2 latest patch) Summary of steps to be carried out. The upgrade-migrate of oracle 11GR2

bmcAdm1n is password