GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

20
Migration 10.2.0.4 to 11.1.0.7  Software OPERATIONS MANUAL FOR Migration from 10.2.0.4 to 11.1.0.7 Author: Cristian Abatangelo Creation Date: 02-Feb-11 Last Updated: Document Ref: Version: Version 1.0 Approvals: <Approver 1> <Approver 2>

Transcript of GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

Page 1: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 1/20

Page 2: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 2/20

Migration 10.2.0.4 to 11.1.0.7  

MIGRATION DATABASE 11.1.0.7..................................................................................................................................................3

SECTION 1. MANUAL INSTALLATION OF ORACLE TEXT 10GR2 ............. ............. ............. ............. ............. ............. ..........4

SECTION 2. STOP OTM SERVICES ............ ............. ............. ............. ............. ............. ............. ............ ............. ........ ..... ..... ..... .....6

SECTION 3. MIGRATION DATABASE TO 11.1.0.7 ............. ............. ............. ............. ............. ............. ............. ............. ..... ..... ....6

3.1. PRE-R EQUISITION ............................................................................................................................................................................... 6Complete Checklist for Manual Upgrades to 11gR1 [ID 429825.1].............................................................................................6 Collecting Pre-Upgrade Information............................................................................................................................................6 

3.1.1. Compile database Objects ............ ............. ............ ............. ............. ............. ............. ............. ............. ............. ............. ..... ..6 

3.1.2. Run the Pre-Upgrade Information Tool ............. ............. ............. ............. ............. ............. ............. ............. ...... ..... ..... ..... ..7 3.1.3. Modify Init Parameters ............. ............. ............. ............. ............. ............. ............ ............. ............. ............. ....... ..... ..... ..... .9

3.1.4. Optimizer Statistics ............. ............ ............. ............. ............. ............. ............. ............. ............. ............. ........... ..... ..... ..... ...93.1.5. Check for corruption in the dictionary ................................................................................................................................9

3.1.6. Check all Snapshot refreshes are completed: ....................................................................................................................103.1.7. Take a list of Invalid Objects..............................................................................................................................................11

3.1.8. Set database in NOARCHIVELOG..................................................................................................................................... 123.1.9. Stop Database & Listener ............ ............. ............. ............. ............. ............ ............. ............. ............. ............ ..... ..... ..... ....13

3.1.10. Change oratab & oratab.plus ........... ............. ............. ............. ............. ............. ............. ............. ............. ............. ......... ..13

3.1.11. Change Oracle Home on Environment ............ ............. ............. ............. ............. ............. ............. ............. ............. ...... ...133.1.12. Change listener ............. ............. ............. ............. ............. ............. ............. ............. ............ ............. ............. ..... ..... ..... ...143.1.13. Change Initialization Parameters ............. ............. ............. ............. ............. ............. ............. ............. ............. ............. ...15

3.2. UPGRADING A R ELEASE 11.1.0.7 DATABASE........................................................................................................................................ 163.2.1. Migration of database ........... ............. ............. ............. ............. ............. ............. ............. ............. ............. .......... ..... ..... ....16 

3.2.2. Restart Database ............ ............. ............. ............. ............ ............. ............. ............. ............. ............. ............. ........... ..... ...17 3.3. FINAL STEP...................................................................................................................................................................................... 17

3.3.1. Fid Public SYNONYM JOB ( Invalid Objects ) ............. ............. ............. ............. ............. ............. ............. ..... ..... ..... ..... ...17 3.3.2. Compile Invalid Objects ............ ............. ............. ............. ............ ............. ............. ............. ............. ............. ............ ..... ....17 3.3.3. Revert Back the Parameter File ............ ............. ............. ............. ............. ............. ............. ............. ............ ...... ..... ..... ..... .18

3.3.4. Restart database and Listener ............ ............. ............. ............. ............. ............. ............. ............. ............ ............ ..... ..... ...183.3.5. PROD ONLY: Enable ARCHIVELOG mode and restart the DB [3 min] ............ ............ ............. ............. ............. ....... .....183.3.6. PROD ONLY: Re-Enable purge-log shell [1 min.] ........... ............. ............. ............. ............. ............. .......... ..... ..... ..... ..... ..18

3.3.7. Run catbundle cpu .............................................................................................................................................................193.3.8. Change the Database Definition on OEM ............ ............. ............. ............. ............. ............. ............. ............. ........ ..... ..... .19

3.3.9. Change the Database Definition on NSI ........... ............. ............. ............. ............. ............. ............. ............. ............. ........ ..20

SECTION 4. START OTM SERVICES ........... ............. ............. ............. ............. ............. ............. ............. ............. ............. ......... ..20

Page 3: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 3/20

Migration 10.2.0.4 to 11.1.0.7  

Migration Database 11.1.0.7

Drafting and revision historyVersion Prepared by Date Description

1.0 Cristian Abatangelo

02-Feb Restore GPSOGD93 on rs15edp

Metalink references:Manual installation, deinstallation of Oracle Text 10gR1 [ID 280713.1]catupgrd.sql gives ORA-4043 error on XDB_DATASTORE_PROC [ID 360907.1]

SR 3-2905057221: OTM O&G 5.5.CU6 upgrade to 11gR1

Page 4: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 4/20

Migration 10.2.0.4 to 11.1.0.7  

Section 1. Manual installation of Oracle Text10gR2

Manual installation of Text 10gR2

Note: In SQL*Plus we use '?' instead of $ORACLE_HOME

1. Text dictionary, schema name CTXSYS, is created by calling following script from SQL*Plusconnected as SYSDBA:Text dictionary, schema name CTXSYS, is created by calling following script from SQL*Plus connectedas SYSDBA:

Cd $ORACLE_HOMESqlplus /nologConnect /As sysdbaspool text_install.txt@$ORACLE_HOME/ctx/admin/catctx.sql CTXSYS SYSAUX TEMP NOLOCK

Where:CTXSYS - is the ctxsys user password

SYSAUX - is the default tablespace for ctxsysTEMP - is the temporary tablespace for ctxsys

LOCK|NOLOCK - ctxsys user account will be locked or not

2. The next step is to install appropriate language-specific default preferences. There is script whichcreates language-specific default preferences for every language Oracle text supports in

 /ctx/admin/defaults directory, such as English(US), Danish(DK), Dutch(NL), Finnish(SF), French(F),

German(D), Italian(IT), Portuguese(PT), Spanish(E), and Swedish(S). They are named in the formdrdefXX.sql, where XX is the international license plate code.To manually install US default preferences, for example, log into sqlplus as CTXSYS, and run

'drdefus.sql' as described below:

SQL> connect CTXSYS/passwordSQL> @$ORACLE_HOME/ctx/admin/defaults/drdefus.sqlSQL> spool off

  Text 10gR2 Installation verificationCheck to make sure that all Text objects were created in CTXSYS schema and correct version isinstalledCheck to make sure that there are not invalid objects for CTXSYS.

With the following Scripts:

------------------- cut here ------------------------------connect SYS/password as SYSDBA

set pages 1000col object_name format a40col object_type format a20col comp_name format a30column library_name format a8column f i le_ spec format a60 wrapspool text_ insta l l_veri f i cat ion. log

- - check on setupselect comp_name, status, substr (ver s ion ,1 ,10) as version from dba_regis tr y where comp_id = 'CONTEXT';select * f rom ctxsys.ctx_version ;

select substr(c txsys .dr i_ vers ion ,1,10) VER_CODE from dual;

selec t count(*) from dba_objec ts where owner='CTXSYS';

Page 5: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 5/20

Migration 10.2.0.4 to 11.1.0.7  - - Get a summary countselect object_t ype, count(*) from dba_objects where owner='CTXSYS' group by object_t ype;

- - Any inval id objectsselec t object_name, object _t ype, status fr om dba_objec ts where owner='CTXSYS' and status != 'VALID ' order by object_nam

spool off 

------------------- cut here ------------------------------

Note: The number of CTXSYS objects might be different on other Patch set versi

Example:

SQL> select comp_name, status, substr(version,1,10) as versionfrom dba_registry where comp_id = 'CONTEXT';

COMP_NAME STATUS VERSION------------------------------ ----------- ------------------------------Oracle Text VALID 10.2.0.4.0

SQL> select count(*) from dba_objects where owner='CTXSYS';

COUNT(*)----------

339

SQL> select object_type, count(*) from dba_objectswhere owner='CTXSYS' group by object_type;

OBJECT_TYPE COUNT(*)-------------------- ----------INDEX 46 TYPE BODY 7INDEXTYPE 4PROCEDURE 2

 TABLE 37 TYPE 44VIEW 54FUNCTION 5LIBRARY 1PACKAGE BODY 58OPERATOR 6SEQUENCE 3LOB 1PACKAGE 71

14 rows selected.

SQL> select object_name, object_type, status from dba_objectswhere owner='CTXSYS' and status != 'VALID'order by object_name;

no rows selected

SQL> spool off 

Page 6: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 6/20

Migration 10.2.0.4 to 11.1.0.7  

Section 2. Stop OTM Services

There is to stop the OTM services:

DEV tsgoq00326.np.ge.com:80 http://tsgoq00326.np.ge.com:80 GPSOGD93

QA Balance tnlq01296.np.ge.com:81 http://tnlq01296.np.ge.com:81 GPSOGQ93

QA Balance tsgod00325.np.ge.com:81 http://tsgod00325.np.ge.com:81 GPSOGQ93

QA Balance tnlq01296.np.ge.com:81 http://tnlq01296.np.ge.com:81 GPSOGQ93

QA Balance tsgod00325.np.ge.com:81 http://tsgod00325.np.ge.com:81 GPSOGQ93

PROD Balance tsgop00324.np.ge.com:80 http://www5.gepower.com/ogotm/ GPSOGP93PROD Balance tsgop00596.np.ge.com:80 http://www5.gepower.com/ogotm/ GPSOGP93

PROD Balance tsgop00324.np.ge.com:80 http://www5.gepower.com/ogotm/ GPSOGP93

PROD Balance tsgop00596.np.ge.com:80 http://www5.gepower.com/ogotm/ GPSOGP93

Section 3. Migration Database to 11.1.0.7

3.1. Pre-Requisition

For any reference on all the steps provided below you can check the following note:

Complete Checklist for Manual Upgrades to 11gR1 [ID 429825.1]

Collecting Pre-Upgrade Information

3.1.1. Compile database Objects

If the dbupgdiag.sql script reports any invalid objects, run $ORACLE_HOME/rdbms/admin/utlrp.sql(multiple times) to validate the invalid objects in the database, until there is no change in the number of invalid objects.

$ cd $ORACLE_HOME/rdbms/admin$ sqlplus "/ as sysdba"alter system set job_queue_processes = 20;

@utlrp.sql

Prior to upgrade, resolving invalid objects under SYS and SYSTEM is mandatory.

Page 7: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 7/20

Migration 10.2.0.4 to 11.1.0.7  

 After validating the invalid objects, re-run dbupgdiag.sql in the database once again and make surethat everything is fine.

Owner Invalid Objects

CONTRIBUTOR_TEST 4

C_CONTEST1 54

GLOGOWNER 1

 NNG10_VIEW 32

 NPP10_VIEW 32

OTR_ANALYST_NFL90_VIEW 32

OTR_ANALYST_NPE10_VIEW 32

PNL_VIEW 4

3.1.2. Run the Pre-Upgrade Information Tool

Log in to the system as the owner of the new 11gR1 ORACLE_HOME and copy the following filefrom the 11gR1 ORACLE_HOME/rdbms/admin directory to a directory outside of the Oracle home,such as the /tmp directory on your system:

$ORACLE_HOME/rdbms/admin/utlu111i.sql

Change to the directory where utlu111i.sql has been copied in the previous step.

Start SQL*Plus and connect to the database instance as a user with SYSDBA privileges. Then runand spool the utlu111i.sql file. Please note that the database should be started using the SourceOracle Home (10.2.0.x)

$ sqlplus '/ as sysdba'spool [email protected] off

Check the spool file and examine the output in the upgrade_info.log file;

Do necessary changes.

Example:

SQL> @utlu111i.sqlOracle Database 11.1 Pre-Upgrade Information Tool 02-02-2011 15:59:50.**********************************************************************Database:**********************************************************************--> name: GPSOGD93--> version: 10.2.0.4.0--> compatible: 10.2.0.3--> blocksize: 8192

--> platform: AIX-Based Systems (64-bit)--> timezone file: V4.**********************************************************************

Page 8: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 8/20

Migration 10.2.0.4 to 11.1.0.7  Tablespaces: [make adjustments in the current environment]**********************************************************************--> SYSTEM tablespace is adequate for the upgrade..... minimum required size: 715 MB--> UNDOTBS tablespace is adequate for the upgrade..... minimum required size: 157 MB--> SYSAUX tablespace is adequate for the upgrade..... minimum required size: 855 MB--> TEMP tablespace is adequate for the upgrade..... minimum required size: 61 MBWARNING: --> DATA tablespace is not large enough for the upgrade..... currently allocated size: -1 MB.... minimum required size: 17249 MB.... increase current size by: 17250 MB.... tablespace is NOT AUTOEXTEND ENABLED...**********************************************************************Update Parameters: [Update Oracle Database 11.1 init.ora or spfile]**********************************************************************WARNING: --> "sga_target" needs to be increased to at least 672 MB.**********************************************************************Renamed Parameters: [Update Oracle Database 11.1 init.ora or spfile]**********************************************************************-- No renamed parameters found. No changes are required.**********************************************************************Obsolete/Deprecated Parameters: [Update Oracle Database 11.1 init.ora or spfile]**********************************************************************--> "background_dump_dest" replaced by "diagnostic_dest"--> "user_dump_dest" replaced by "diagnostic_dest"--> "core_dump_dest" replaced by "diagnostic_dest".**********************************************************************Components: [The following database components will be upgraded or installed]**********************************************************************--> Oracle Catalog Views [upgrade] VALID--> Oracle Packages and Types [upgrade] VALID--> JServer JAVA Virtual Machine [upgrade] VALID

--> Oracle XDK for Java [upgrade] VALID--> Oracle Text [upgrade] VALID--> Oracle XML Database [install]--> Oracle Java Packages [upgrade] VALID--> Expression Filter [upgrade] VALID.**********************************************************************Miscellaneous Warnings**********************************************************************WARNING: --> Database contains stale optimizer statistics..... Refer to the 11g Upgrade Guide for instructions to update.... statistics prior to upgrading the database..... Component Schemas with stale statistics:.... SYS.... CTXSYSWARNING: --> Database contains INVALID objects prior to upgrade.

.... The list of invalid SYS/SYSTEM objects was written to.... registry$sys_inv_objs.

.... The list of non-SYS/SYSTEM objects was written to

.... registry$nonsys_inv_objs.

.... Use utluiobj.sql after the upgrade to identify any new invalid

.... objects due to the upgrade.

.... USER PUBLIC has 1 INVALID objects.

.... USER NPOTM has 2 INVALID objects.

.... USER PNL_VIEW has 4 INVALID objects.

.... USER SYS has 2 INVALID objects.

.... USER GLOGOWNER has 1 INVALID objects.

.... USER NPP10_VIEW has 32 INVALID objects.

.... USER OTR_ANALYST_NFL90_VIEW has 32 INVALID objects.

.... USER OTR_ANALYST_NPE10_VIEW has 32 INVALID objects.

.... USER CONTRIBUTOR_TEST has 4 INVALID objects.

.... USER C_CONTEST1 has 54 INVALID objects.

.... USER NNG10_VIEW has 32 INVALID objects.WARNING: --> Database contains schemas with objects dependent on networkpackages..... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs..... USER NPOTM has dependent objects.

Page 9: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 9/20

Migration 10.2.0.4 to 11.1.0.7  .... USER GLOGOWNER has dependent objects.WARNING: --> There are files which need media recovery..... Ensure no files need media recovery prior to upgrade..

PL/SQL procedure successfully completed.

SQL> spool off;

3.1.3. Modify Init Parameters

remove

background_dump_dest = /u12/app/oracle/admin/gpsogd93/bdumpcore_dump_dest = /u12/app/oracle/admin/gpsogd93/cdumpuser_dump_dest = /u12/app/oracle/admin/gpsogd93/udump

and create only the entry

diagnostic_dest=/u12/app/oracle

Also change

sga_target=600M to sga_target=1000M

In the utlu111i.sql log made at the beginning, coming from a 10.2.0.4 to 11.1.0.7 will be also notifiedabout the creation of the “diagnostic_dest” parameter. So for the new initfile for the database thathas to be migrated insert the new parameter using the $ORACLE_BASE destination and remove thefollowing:

background_dump_dest

core_dump_dest

user_dump_dest

diagnostic_dest=/u12/app/oracle

3.1.4. Optimizer Statistics

Take the Statics of Database:

$ sqlplus "/as sysdba"EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

3.1.5. Check for corruption in the dictionary

Check for corruption in the dictionary, use the following commands in SQL*Plus (connected as sys):

Set verify off Set space 0Set line 120

Page 10: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 10/20

Migration 10.2.0.4 to 11.1.0.7  Set heading off Set feedback off Set pages 1000Spool analyze.sql

SELECT 'Analyze cluster "'||cluster_name||'" validate structure cascade;'

FROM dba_clustersWHERE owner='SYS'UNION SELECT 'Analyze table "'||table_name||'" validate structure cascade;'FROM dba_tablesWHERE owner='SYS'AND partitioned='NO'AND (iot_type='IOT' OR iot_type is NULL)UNION SELECT 'Analyze table "'||table_name||'" validate structure cascade into invalid_rows;'FROM dba_tablesWHERE owner='SYS'AND partitioned='YES';

spool off 

This creates a script called analyze.sql.Now execute the following steps.

$ sqlplus "/ as sysdba"@$ORACLE_HOME/rdbms/admin/[email protected]

This script (analyze.sql) should not return any errors.

Note:

1. ORA-30657 might occur, if there is any external table is validated,which can be safely ignored as per Note 209355.1 ORA-30657: Using ANALYZE TABLE for an External Table

2. Errors shown below when executing analyze.sql can be ignored:

SP2-0734: unknown command beginning "SQL> SELEC..." - rest of line ignored.SP2-0042: unknown command "SQL>" - rest of line ignored.

SP2-0734: unknown command beginning "SQL> spool..." - rest of line ignored .

3.1.6. Check all Snapshot refreshes are completed:

Ensure that all snapshot refreshes are successfully completed, and that replication is stopped.

$ sqlplus "/as sysdba"SELECT distinct(trunc(last_refresh))

FROM dba_snapshot_refresh_times;

No Row Return

$ sqlplus "/ as sysdba"SELECT * FROM v$recover_file;

No rows selected

Ensure no files are in backup mode:

Page 11: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 11/20

Migration 10.2.0.4 to 11.1.0.7  SELECT * FROM v$backup WHERE status!='NOT ACTIVE';

This should return no rows.

Resolve any outstanding unresolved distributed transaction:

select * from dba_2pc_pending;

This should return no rows.

If this returns rows you should do the following:

SELECT local_tran_idFROM dba_2pc_pending;EXECUTE dbms_transaction.purge_lost_db_entry('');COMMIT;

Ensure the users sys and system have 'system' as their default tablespace.

SELECT username, default_tablespaceFROM dba_usersWHERE username in ('SYS','SYSTEM');

If DEFAULT_TABLESPACE is anything other than SYSTEM tablespace, modify the defaulttablespace to SYSTEM by using the below command.

ALTER user SYS default tablespace SYSTEM;ALTER user SYSTEM default tablespace SYSTEM;

Note down the location of datafiles, redo logs, control files. Also take a backup of all configurationfiles like listener.ora,tnsnames.ora,etc., from $ORACLE_HOME.

SELECT name FROM v$controlfile;SELECT file_name FROM dba_data_files;SELECT group#, member FROM v$logfile;

 After, noting down the the locations, check for sys.plan_table object.

sqlplus “/ as sysdba”select * from dba_objects where object_name = 'PLAN_TABLE' and owner='SYS';drop table sys.plan_table;@$ORACLE_HOME/rdbms/admin/utlrp.sql

select * from dba_objects where status <> 'VALID';

3.1.7. Take a list of Invalid Objects.

You can take this list form NSI Site, or run the following select:

SQL> select owner,object_name,object_type from dba_objects where status <> 'VALID';

no rows selected

select owner,count(*) from dba_objectswhere status !='VALID'group by owner;

OWNER COUNT(*)------------------------------ ----------PNL_VIEW 4GLOGOWNER 1

Page 12: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 12/20

Migration 10.2.0.4 to 11.1.0.7  NPP10_VIEW 32OTR_ANALYST_NFL90_VIEW 32OTR_ANALYST_NPE10_VIEW 32CONTRIBUTOR_TEST 4C_CONTEST1 54NNG10_VIEW 32

3.1.8. Set database in NOARCHIVELOG.

SQL> shutdown immediate;Database closed.Database dismounted.ORACLE instance shut down.SQL>SQL>SQL> startup mount;ORACLE instance started.

Total System Global Area 1073741824 bytesFixed Size 2078296 bytesVariable Size 427821480 bytesDatabase Buffers 637534208 bytesRedo Buffers 6307840 bytesDatabase mounted.SQL> alter database noarchivelog;

Database altered.

SQL> alter database open;

Database altered.

Page 13: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 13/20

Migration 10.2.0.4 to 11.1.0.7  

3.1.9. Stop Database & Listener 

3.1.10. Change oratab & oratab.plus

Change the /etc/oratab and /etc/oratab.plus filling the row of the database you are going to migratewith the new Oracle Home Path.

Example:

gpsogd93:/u12/app/oracle/product/10.2.0.4_OH2:Ntogpsogd93 /u12/app/oracle/product/11.1.0.7_NV_OH1:N

3.1.11. Change Oracle Home on Environment

Change the Environment file (DATABASE.env) with the new ORACLE_HOME and set the new

environment.

Example:

ORACLE_HOME="/ora113/app/oracle/product/10.2.0.4_OH2" toORACLE_HOME=”/ora113/app/oracle/product/11.1.0.7_NV_OH2"

 Add the Variable to Environment Configuration:

ORACLE_DIAG=$ORACLE_BASE/diag/rdbms/${ORACLE_SID}export ORACLE_DIAG

 And comment the following line:

####ORA_NLS10=$ORACLE_HOME/nls/data/9idata

Otherwise we will receiving the following error:

[ora12@rs15edp]/u12/app/oracle/product/11.1.0.7_NV_OH2/rdbms/admin>sqlplus /nolog

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Feb 2 16:37:58 2011

Copyright (c) 1982, 2008, Oracle. All rights reserved.

SQL> connect /as sysdbaERROR:ORA-12705: Cannot access NLS data files or invalid environment specified

Re-create the new password file under the 11g $ORACLE_HOME/dbs

(pay attention that $ORACLE_HOME is the NEW ORACLE HOME 11.1.0.7 that the database has touse after the upgrade):

orapwd file=orapwdatabasename password=XXXXX entries=10

 And Create symbolic link to parameter file under $ORACLE_HOME/dbs

ln -s /u12/app/oracle/admin/gpsogp84/pfile/initgpsp84.ora .

Page 14: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 14/20

Migration 10.2.0.4 to 11.1.0.7  

3.1.12. Change listener 

Change listener.ora setting the new Oracle Home.

Page 15: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 15/20

Migration 10.2.0.4 to 11.1.0.7  

3.1.13. Change Initialization Parameters

Modify the initialization parameters that must be set before the upgrade and revert back when it has

been completed:

SHARED_POOL_SIZE=300MJAVA_POOL_SIZE=300MJOB_QUEUE_PROCESSES=0AQ_TM_PROCESSES=0

In the pfile linked previously to the $ORACLE_HOME/dbs pay attention to set theSHARED_POOL_SIZE at least to 300M and set JOB_QUEUE_PROCESSES=0 and AQ_TM_PROCESSES=0.

IncreaseFrom sga_target=600MTosga_target=1000M for the upg

Page 16: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 16/20

Migration 10.2.0.4 to 11.1.0.7  

3.2. Upgrading a Release 11.1.0.7 Database

3.2.1. Migration of database

1. Your ORACLE_SID is set correctly

2. The oratab file points to your Oracle Database 11g Release 1 (11.1) Oracle home;

3. The following environment variables point to the Oracle Database 11g Release 1 (11.1)directories:

ORACLE_HOME

PATH

Logout and login and set gpsogd83.env environemt

Log in as the Oracle software owner user.

cd $ORACLE_HOME/rdbms/adminsqlplus /nologCONN / AS SYSDBASTARTUP UPGRADESET TIMING ONSET TIME ONSPOOL [email protected]

SPOOL OFF

Review the log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.

You can check the error with the following command:

grep ^ORA- upg11_databasename.log

No error present

Page 17: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 17/20

Migration 10.2.0.4 to 11.1.0.7  

3.2.2. Restart Database

cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONN / AS SYSDBASQL> STARTUP

Run utlu111s.sql to display the results of the upgrade:

SQL> @utlu111s.sql

SQL> @utlu111s.sql.Oracle Database 11.1 Post-Upgrade Status Tool 02-03-2011 12:06:42.Component Status Version HH:MM:SS.

Oracle Server. VALID 11.1.0.7.0 00:36:51JServer JAVA Virtual Machine. VALID 11.1.0.7.0 00:12:44Oracle XDK. VALID 11.1.0.7.0 00:01:14Oracle Text. VALID 11.1.0.7.0 00:01:37Oracle XML Database. VALID 11.1.0.7.0 00:04:05Oracle Database Java Packages. VALID 11.1.0.7.0 00:00:34Oracle Expression Filter. VALID 11.1.0.7.0 00:00:35Gathering Statistics. 00:03:45

Total Upgrade Time: 01:01:30

PL/SQL procedure successfully completed.

Run catuppst.sql, located in the ORACLE_HOME/rdbms/admin directory, to perform upgrade actionsthat do not require the database to be in UPGRADE mode:

SQL> @catuppst.sql

3.3. Final Step

3.3.1. Fid Public SYNONYM JOB ( Invalid Objects )

Under NPOTM Schema there are different Invalid Objects because point to PUBLIC synonym JOB, it

was changed by Upgrade, we have to recreate it with the following Scripts:

drop public synonym JOB;

create public synonym JOB for GLOGOWNER.job;

3.3.2. Compile Invalid Objects

Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packagesare accessed for the first time.

Page 18: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 18/20

Migration 10.2.0.4 to 11.1.0.7  

This step is optional but recommended.

alter system set job_queue_processes = 20;@?/rdbms/admin/utlrp.sqlselect owner,object_name,object_type from dba_objects where status <> 'VALID';

3.3.3. Revert Back the Parameter File

Remove:

shared_pool_size=300M java_pool_size=300M

AQ_TM_PROCESSES=0 job_queue_processes=0

Restore the old value in the parameter.

 

Set compatible value into the initdatabasename as 11.1.0.0.0

==> initgpsogd93.ora <== compatible = 11.1.0.0.0

set the initdatabasename.ora parameter 

sec_case_sensitive_logon =false

Bounce database instance;

3.3.4. Restart database and Listener 

3.3.5. PROD ONLY: Enable ARCHIVELOG mode and restart the DB [3 min]

SHUTDOWN IMMEDIATE;STARTUP MOUNT;ALTER DATABASE ARCHIVELOG;ALTER DATABASE OPEN;

3.3.6. PROD ONLY : Re-Enable purge-log shell [1 min.]

Restore the backup file taken earlier before the upgradecd $RMAN/../backupcp –p check_log_dest.dat.ORIG check_log_dest.dat

Page 19: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 19/20

Migration 10.2.0.4 to 11.1.0.7  

3.3.7. Run catbundle cpu

IF THE RESULT IS TO APPLY PLEASE DO THIS ACTIVITY

• Verify now that view compilation has been performed for this database:

COL ACTION FOR A15COL ACTION_TIME FOR A30COL NAMESPACE FOR A10COL VERSION FOR A10COL ID FOR A5COL COMMENTS FOR A30

select * from registry$history where trunc(ACTION_TIME) > trunc(sysdate -3);

ACTION_TIME ACTION NAMESPACE VERSION ID------------------------------ --------------- ---------- ---------- ----------COMMENTS BUNDLE_SERIES------------------------------ ------------------------------17-DEC-10 10.30.50.268368 AM UPGRADE SERVER 11.1.0.7.0Upgraded from 10.2.0.4.0

If the apply action is not yet performed, run cutbundle.sql cpu apply as below:

cd $ORACLE_HOME/rdbms/adminsqlplus /nologSQL> CONNECT / AS SYSDBASQL> SHUTDOWN IMMEDIATE;SQL> STARTUPSQL> @catbundle.sql cpu apply

SQL> QUIT

CPU patching is over. Restart services, if needed.After id:

ACTION_TIME ACTION NAMESPACE VERSION ID------------------------------ --------------- ---------- ---------- ----------COMMENTS BUNDLE_SERIES------------------------------ ------------------------------02-FEB-11 06.06.32.636216 PM UPGRADE SERVER 11.1.0.7.0Upgraded from 10.2.0.4.0

03-FEB-11 01.51.54.242678 PM APPLY SERVER 11.1.0.7 ##########CPUOct2010 CPU

3.3.8. Change the Database Definition on OEM

Login on OEM with Sysman UserGo to Targets after on Database Find the databaseGo to Configure and after Change the Oracle Home PathAnd there is to do the same activity for the Database Listener

Check the current init placed into $ORACLE_HOME/dbs and verify that the init already has thefollowing parameters:

diagnostic_dest='/u12/app/oracle' ($ORACLE_BASE)

Page 20: GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

7/30/2019 GPSOGD93 Q93 P93 Database Upgrade10204 to 11107 Series

http://slidepdf.com/reader/full/gpsogd93-q93-p93-database-upgrade10204-to-11107-series 20/20

Migration 10.2.0.4 to 11.1.0.7  

and

O7_DICTIONARY_ACCESSIBILITY=TRUE

If not, update the init accordingly.

3.3.9. Change the Database Definition on NSI

Login NSI , check database Registration find the database and change the Version of it put 11.

Section 4. Start OTM Services

There is to stop the OTM services:

DEV tsgoq00326.np.ge.com:80 http://tsgoq00326.np.ge.com:80 GPSOGD93

QA Balance tnlq01296.np.ge.com:81 http://tnlq01296.np.ge.com:81 GPSOGQ93

QA Balance tsgod00325.np.ge.com:81 http://tsgod00325.np.ge.com:81 GPSOGQ93

QA Balance tnlq01296.np.ge.com:81 http://tnlq01296.np.ge.com:81 GPSOGQ93

QA Balance tsgod00325.np.ge.com:81 http://tsgod00325.np.ge.com:81 GPSOGQ93

PROD Balance tsgop00324.np.ge.com:80 http://www5.gepower.com/ogotm/ GPSOGP93

PROD Balance tsgop00596.np.ge.com:80 http://www5.gepower.com/ogotm/ GPSOGP93

PROD Balance tsgop00324.np.ge.com:80 http://www5.gepower.com/ogotm/ GPSOGP93

PROD Balance tsgop00596.np.ge.com:80 http://www5.gepower.com/ogotm/

GPSOGP93