upgradation from oracle 9i to oracle 10g

Steps for Upgrading the Database to 10g Release 2 Preparing to Upgrade Fresh Install oracle software only 10gR2 on the same 9i instance. Oracle 9i(9.2.0.6) to Oracle 10g(10.2.0.1) Oracle 9i home ==> /oracle/app/oracle/testdb/9.2.0 Oracle 10g home ==> /u01/app/oracle/product/10.2.0/ mkdir -p /u01/app/oracle chown -R oracle:oinstall /u01 export ORACLE_BASE=/oracle/app/oracle export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 export PATH=$PATH:$ORACLE_HOME/bin kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmni kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.rmem_max=262144 net.core.wmem_default=262144 net.core.wmem_max=262144 ================================== Step 1 Copy utlu102i.sql , utltzuv2.sql 10g oracle home to /tmp folder. Then run both scripts. This scripts will show the preupgrade steps. ORACLE_HOME ==> 10g Home cp $ORACLE_HOME/rdbms/admin/utlu102i.sql /tmp cp $ORACLE_HOME/rdbms/admin/utltzuv2.sql /tmp

.. minimum required size: 58 MB --> APPS_TS_QUEUES tablespace is adequate for the upgrade.=================================== Step 2 Then login 9i oracle home and login sql prompt.sql SQL> spool off =================================== Check the log file and solve that issues.2.2. minimum required size: 8082 MB --> TEMP tablespace is adequate for the upgrade. .0 --> compatible: 9. Then run that above scripts. ********************************************************************** Database: ********************************************************************** --> name: TEST --> version: 9. spool Database_Info.6.. minimum required size: 14 MB --> OLAP tablespace is adequate for the upgrade.. .0...2 Upgrade Information Utility 04-23-2008 11:07:05 .log Oracle Database 10.. ... sqlplus '/as sysdba' SQL> spool Database_Info. . minimum required size: 577 MB --> APPS_TS_TX_DATA tablespace is adequate for the upgrade. ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** --> SYSTEM tablespace is adequate for the upgrade. minimum required size: 10842 MB --> ODM tablespace is adequate for the upgrade. ....0 ... ********************************************************************** Logfiles: [make adjustments in the current environment] ********************************************************************** --> The existing log files are adequate. No changes are required. . .log SQL> @utlu102i..

ora or spfile] ********************************************************************** WARNING: --> "streams_pool_size" is not currently defined and needs a value of at least 50331648 WARNING: --> "large_pool_size" needs to be increased to at least 8388608 .. No changes are required...The 'Oracle interMedia Image Accelerator' is ..is required to be installed from the 10g Companion CD. ********************************************************************** Update Parameters: [Update Oracle Database 10. ********************************************************************** Obsolete Parameters: [Update Oracle Database 10. minimum required size: 30 MB --> SYSAUX tablespace is adequate for the upgrade. .. .No deprecated parameters found....ora or spfile] ********************************************************************** --> "optimizer_max_permutations" --> "row_locking" --> "undo_suppress_errors" --> "max_enabled_roles" --> "enqueue_resources" --> "sql_trace" ..ora or spfile] ********************************************************************** -. ********************************************************************** Deprecated Parameters: [Update Oracle Database 10. minimum required size: 109 MB ...2 init.. ********************************************************************** 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 Java Packages [upgrade] VALID --> Oracle Text [upgrade] VALID --> Oracle XML Database [install] --> Real Application Clusters [upgrade] INVALID --> Oracle Data Mining [upgrade] VALID --> OLAP Analytic Workspace [upgrade] UPGRADED --> OLAP Catalog [upgrade] VALID --> Oracle OLAP API [upgrade] UPGRADED --> Oracle interMedia [upgrade] VALID .The 'JServer JAVA Virtual Machine' JAccelerator (NCOMP) . .2 init..required to be installed from the 10g Companion CD...2 init.

Readwrite . Component Schemas with stale statistics: ....dbf' SIZE 4096M..--> Spatial [upgrade] VALID . sum(bytes/1024/1024) from dba_data_files where TABLESPACE_NAME='SYSTEM' GROUP BY FILE_NAME.. SYS ...... . . . . SegmentSpaceManagementAuto . WARNING: --> Deprecated CONNECT role granted to some user/roles.... Passwords will be encrypted during the upgrade... ********************************************************************** SYSAUX Tablespace: [Create tablespace in the Oracle Database 10. ODM ............ Permanent . ======================================= Step 3 Check the above output file and resolve the warning and failed messages ======================================= Increase the SYSTEM tablespace select sum(bytes/1024/1024) from dba_free_space where tablespace_name='SYSTEM'. ********************************************************************** Miscellaneous Warnings ********************************************************************** WARNING: --> Passwords exist in some database links.. Refer to the 10g Upgrade Guide for instructions to update .. ALTER TABLESPACE SYSTEM ADD DATAFILE '/oracle/app/oracle/testdata/sys8.. Minimum required size for database upgrade:500 MB .. WARNING: --> Database contains stale optimizer statistics. Online .. ExtentManagementLocal . select FILE_NAME. Downgrade of database links with passwords is not supported. . . ....... statistics prior to upgrading the database..2 environment] ********************************************************************** WARNING: SYSAUX tablespace is present..... CONNECT role after upgrade has only CREATE SESSION privilege.

ALTER TABLESPACE APPS_TS_TX_DATA ADD DATAFILE '/oracle/app/oracle/testdata/tx_data14.dbf' SIZE 1024M. sum(bytes/1024/1024) from dba_data_files where TABLESPACE_NAME='APPS_TS_QUEUES' GROUP BY FILE_NAME. select FILE_NAME.dbf' SIZE 4096M.dbf' resize 4096M. ALTER TABLESPACE APPS_TS_TX_DATA ADD DATAFILE '/oracle/app/oracle/testdata/tx_data13.dbf' SIZE 4096M. sum(bytes/1024/1024) from dba_data_files where TABLESPACE_NAME='ODM' GROUP BY FILE_NAME. APPS_TS_QUEUES select sum(bytes/1024/1024) from dba_free_space where tablespace_name='APPS_TS_QUEUES'. sum(bytes/1024/1024) from dba_data_files where TABLESPACE_NAME='APPS_TS_TX_DATA' GROUP BY FILE_NAME. ALTER TABLESPACE SYSTEM ADD DATAFILE '/oracle/app/oracle/testdata/sys10.ALTER TABLESPACE SYSTEM ADD DATAFILE '/oracle/app/oracle/testdata/sys9.dbf' SIZE 4096M.dbf' SIZE 4096M. ALTER TABLESPACE APPS_TS_QUEUES ADD DATAFILE '/oracle/app/oracle/testdata/queues3. ALTER TABLESPACE APPS_TS_TX_DATA ADD DATAFILE '/oracle/app/oracle/testdata/tx_data12. select FILE_NAME. ODM select sum(bytes/1024/1024) from dba_free_space where tablespace_name='ODM'. APPS_TS_TX_DATA select sum(bytes/1024/1024) from dba_free_space where tablespace_name='APPS_TS_TX_DATA'. select FILE_NAME. . TEMP alter database tempfile '/oracle/app/oracle/testdata/tmp1.dbf' SIZE 1024M.

dbf' resize 250m. sum(bytes/1024/1024) from dba_data_files where TABLESPACE_NAME='OLAP' GROUP BY FILE_NAME.sys_tzuv2_temptab * ERROR at line 1: ORA-00942: table or view does not exist Table created.sys_tzuv2_temptab Table to see if any TIMEZONE data is affected by version 2 transition rules PL/SQL procedure successfully completed. CREATE TABLESPACE sysaux DATAFILE '/oracle/app/oracle/testdata/sysaux01. Query sys. select FILE_NAME. alter database datafile '/oracle/app/oracle/testdata/olap.alter database datafile '/oracle/app/oracle/testdata/odm. ============================================= Step 5 . ============================================ Step 4 Check for the TIMESTAMP WITH TIMEZONE Datatype. SQL> @utltzuv2.dbf' SIZE 500M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE.sql DROP TABLE sys. OLAP select sum(bytes/1024/1024) from dba_free_space where tablespace_name='OLAP'. Commit complete.dbf' resize 250m.

'OLAPSVR'. 'SYSTEM'. ODM . 'WKSYS'. 'ORDPLUGINS'.. 'SI_INFORMTN_SCHEMA'. SQL> EXEC DBMS_STATS. 'WKPROXY'. 'MDDATA'. 'SYSMAN'. GRANTEE ======= CFD DMS HCC DGRAY EUL_US SSOSDK WEBSYS PROJMFG SERVICES WIRELESS EDWEUL_US GRANTEE .. 'OUTLN'. SQL> EXEC DBMS_STATS. 'EXFSYS'. 'LBACSYS'... 'ORDSYS'.. SQL> EXEC DBMS_STATS. 'WKUSER'.. 'OLAPDBA'. 'OLAP_USER'.. connect to the database AS SYSDBA using SQL*Plus.GATHER_SCHEMA_STATS('SYS').. SQL> EXEC DBMS_STATS. 'CTXSYS'. 'LOGSTDBY_ADMINISTRATOR'.GATHER_DICTIONARY_STATS. 'DBSNMP'. 'OLAPSYS'.. 'WMSYS'.GATHER_SCHEMA_STATS('OLAPSYS'). MDSYS ================================================== Step 6 REVOKE CONNECT RIGHTS TO ABOVE 12 USERS SELECT grantee FROM dba_role_privs WHERE granted_role = 'CONNECT' and grantee NOT IN ( 'SYS'.GATHER_SCHEMA_STATS('MDSYS'). 'ODM').To gather statistics run this script. 'XDB'.GATHER_SCHEMA_STATS('ODM'). 'WK_TEST'. 'OEM_MONITOR'. SQL> EXEC DBMS_STATS. 'MDSYS'. OLAPSYS .. . 'DMSYS'.. SYS ..

'SI_INFORMTN_SCHEMA'. 'SYSTEM'. 'SYSMAN'. Then change the parameter file. 'DMSYS'.' FROM dba_role_privs WHERE granted_role = 'CONNECT' and grantee NOT IN ( 'SYS'. 'WMSYS'.-----------------------------MOBILEADMIN 12 rows selected. 'ORDPLUGINS'. 'OLAPSYS'. 'OEM_MONITOR'.ora file 9i to 10g oracle home.sum(bytes/1024/1024) from dba_free_space where tablespace_name in . =========================================== Remove or comment the following initparameters 10 oracle home. 'ORDSYS'. Copy init. 'EXFSYS'. 'WKPROXY'. 'DBSNMP'. 'MDSYS'. 'OLAP_USER'. 'LBACSYS'. 'OLAPDBA'. Take the spool on above scripts and run sql prompt. 'MDDATA'. -->"optimizer_max_permutations" --> "row_locking" --> "undo_suppress_errors" --> "max_enabled_roles" --> "enqueue_resources" --> "sql_trace" =========================================== Check the spool log file to Add and Increase the below parameter size shared_pool_size=181217280 streams_pool_size=50331648 large_pool_size=8388608 =========================================== Check the free tablespace size select tablespace_name. 'WKSYS'. ============================================ SELECT 'REVOKE CONNECT FROM 'grantee'. 'OUTLN'. 'OLAPSVR'. 'ODM'). 'CTXSYS'. 'XDB'. 'LOGSTDBY_ADMINISTRATOR'. 'WK_TEST'. 'WKUSER'.

0/db_1 export PATH=$PATH:$ORACLE_HOME/bin ========================================== After completing pre upgrade steps.0 .'APPS_TS_QUEUES'.Production on Wed Apr 23 14:48:39 2008 Copyright (c) 1982.2.2 Upgrade Status Utility 04-23-2008 16:23:48 . [oracle@sys43 admin]$ sqlplus "/as sysdba" SQL*Plus: Release 10. Component Status Version HH:MM:SS Oracle Database Server VALID 10.2. Oracle.'ODM'.0.'SYSAUX') GROUP BY TABLESPACE_NAME.0. SQL> startup upgrade ORACLE instance started.1.0 00:00:25 Oracle Text VALID 10.1.0 00:01:08 .2.0 00:48:24 JServer JAVA Virtual Machine VALID 10.0. SQL> spool upgrade. Total System Global Area 473956352 bytes Fixed Size 1220024 bytes Variable Size 297796168 bytes Database Buffers 163577856 bytes Redo Buffers 11362304 bytes Database mounted.2.sql Oracle Database 10. Database opened. 2005.1. you have to login 10g oracle home.0. All rights reserved.'APPS_TS_TX_DATA'. Connected to an idle instance.0.2.1.2.('SYSTEM'.log SQL> @catupgrd.1.0 00:06:07 Oracle XDK VALID 10. =========================================== set below env export ORACLE_SID=TEST export ORACLE_BASE=/u01/app/ export ORACLE_HOME=/u01/app/oracle/product/10.0 00:06:03 Oracle Database Java Packages VALID 10.1.0.2.

2. spool off ======================================== SQL>shutdown immediate ======================================== The 9idata directory has no files so go to following folder and run that perl scripts.2.. substr(object_name. Please reset environment variable ORA_NLS10 to /u01/11i/uat/oracle/uatdb/10.2.2.0/nls/data/9idata . /u01/11i/uat/oracle/uatdb/10.05b$ ============================ Then normal startup SQL>startup ============================ Compile invalid objects SQL> @utlrp. Copying files to /u01/11i/uat/oracle/uatdb/10.0.pl Creating directory /u01/11i/uat/oracle/uatdb/10.2.2.lst select substr(owner.1.0 00:04:21 .0.0 00:01:30 Oracle Real Application Clusters INVALID 10.0. Copy finished.2..0.0 00:00:16 OLAP Catalog VALID 10.05b$ perl cr9idata. substr(object_type.1.1.0.1.1.12) owner.30) type.1.2..1. Total Upgrade Time: 01:31:00 ======================================== spool invalid_pre.0/nls/data/9idata! bash-2.0/nls/data/9idata.2.0 00:01:13 Oracle OLAP API VALID 10.0 00:00:38 Oracle interMedia VALID 10.0.1.0 00:05:22 Spatial INVALID 10.2.0 00:00:02 Oracle Data Mining VALID 10. status from dba_objects where status <> 'VALID'.0.1.Oracle XML Database VALID 10.1.0/nls/data/old/cr9idata.2.2..30) object.0 00:00:19 OLAP Analytic Workspace VALID 10.0.sql ======================================== SQL> shut immediate cp env to oracle_home_10g and edit new values .1.pl bash-2.

env file b) Create appsutil.Copy finished. Copy AutoConfig to the RDBMS ORACLE_HOME Update the RDBMS ORACLE_HOME file system with the AutoConfig files by performing the following steps: Steps: * On the Application Tier (as the APPLMGR user): a) Log in to the APPL_TOP environment and source the APPSORA.0/nls/data/old bash-2.05b$ perl cr9idata.. /u01/11i/uat/oracle/uatdb/10.pl bash-2. listeners.0/nls/data/9idata .zip in $APPL_TOP/admin/out perl $AD_TOP/bin/admkappsutil.zip file. This will create appsutil.ora and sqlnet. Please reset environment variable ORA_NLS10 to /u01/11i/uat/oracle/uatdb/10. setting the environment variable ORA_NLS10 causes the following error:ERROROra-12705: cannot access nls data files or invalid environment specified ora-127 This is script cr9idata. cp tns_admin(9i) to oracle 10g Start listener ================================================ SQL>startup ================================================ SymptomsIn 10gR2.2.ora.0/nls/data/9idata! =========================================================== Implement and run Autoconfig on the new Database home 1.2.pl located following path.zip Log file located at .pl Creating directory /u01/11i/uat/oracle/uatdb/10.2..2.05b$ perl admkappsutil.ora 9i to new 10g orale home...Copy tnsnames.Copying files to /u01/11i/uat/oracle/uatdb/10.0/nls/data/9idata.pl Starting the generation of appsutil.

Execute the following commands to create your Database Context File: Steps: a) cd RDBMS ORACLE_HOME b) CONTEXT_NAME.zip MakeAppsUtil completed successfully.0>/appsutil/bin d) perl adbldxml./progs2/11i/uat/applmgr/uatappl/admin/log/MakeAppsUtil_09051242.XML appspass=APPSpwd .1. Generate your Database Context File.log output located at /progs2/11i/uat/applmgr/uatappl/admin/out/appsutil.env c) cd <10.pl tier=db appsuser=apps appspasswd=xxxxx Steps: a) cd /appsutil/bin b) adconfig.zip 2.sh contextfile=CONTEXT. c) Copy or FTP the appsutil.env file f) unzip -o appsutil.pl tier=db appsuser=APPSuser appspasswd=APPSpwd perl adbldxml.zip file to the * On the Database Tier (as the APPLMGR or ORACLE user): d) cd RDBMS ORACLE_HOME e) Source 10g CONTEXT_NAME.

Sign up to vote on this title
UsefulNot useful