Sie sind auf Seite 1von 2

Upgrade Oracle to Upgrade Oracle to 1. Install software 10.1.0.

1 in 1st ORACLE_HOME Install oracle before upgrading this to You must have version installed along with database.2. RequirementsOrac le DB: Oracle (later) Operating System: Windows 2000 (Service Pack 2 or higher) 3. Pre - Installation Tasks Identify prior installationBefore upgrading to new version you must have installed oracle and database created. 5. Download softwareDownload and extract the sof tware set installation archive to a directory that is not the Oracle home direct ory or under the Oracle home directory. 6. Backup your database.Oracle recommends that you create a backup of the databa se before you start upgradation. I.e., (datafile, redologfile) 7. Check SYSTEM Tablespace Size Ensure that there is at least 50 MB of free spac e allocated to the SYSTEM tablespace. query to check tablespace size and freespace

col "Tablespace" for a22col "Used MB" for 99,999,999col "Free MB" for 99,999,999 col "Total MB" for 99,999,999select df.tablespace_name "Tablespace",totalusedspa ce "Used MB",(df.totalspace - tu.totalusedspace) "Free MB",df.totalspace "Total MB",round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))"Pct. Free "from(select tablespace_name,round(sum(bytes) / 1048576) TotalSpacefrom dba_data _files group by tablespace_name) df,(select round(sum(bytes)/(1024*1024)) totalu sedspace, tablespace_namefrom dba_segments group by tablespace_name) tuwhere df. tablespace_name = tu.tablespace_name ; Resize the system datafile if free space below 50 MB ALTER DATABASE DATAFILE 'c:\oracle\oradata\orabase\system01.dbf' RESIZE 150M; Check for free space from the above query again. 8. Set the SHARED_POOL_SIZE and JAVA_POOL_SIZE Initialization Parameters to mini mum 150 MB. Users who have JVM (Java enabled) or JVM and XDB installed on their dat abases should make sure that the init.ora parameters SHARED_POOL_SIZE and JAVA_P OOL_SIZE are each 150 MB or more before running the catpatch.sql upgrade script. Failure to do so could result in an unrecoverable memory failure while running of the script. Please note that JVM and XML DB was shipped as part of the defaul t seed database, and will be present unless the user explicitly install ed a instance without them. Set the value of the SHARED_POOL_SIZE and t he JAVA_POOL_SIZE initialization parameters as follows: Note: If the system uses an initialization parameter file, if necessary change t he values of the SHARED_POOL_SIZE and the JAVA_POOL_SIZE initialization paramete rs to at least 150 MB in the initialization parameter file (initsid.ora). If the database uses sp-file use the below command. SQL> ALTER SYSTEM SET JAVA_POOL_SIZE=150M SCOPE=SPFILE; System altered.SQL> ALTE R SYSTEM SET SHARED_POOL_SIZE=150M SCOPE=SPFILE; System altered. 9. Shutdown oracle database.C:\>set oracle_sid=orclC:\>sqlplus /nologSQL*plus: R elease - Production on Tue Nov 13 10:49:26 2007Copyright (c) 1982, 20 02, Oracle Corporation. All rights reserved.SQL> connect sys@orcl as sysdbaEnter password: Connected.SQL> SHUTDOWNDatabase closed.Database dismounted.ORACLE ins tance shut down. 10. Stop all servicesC:\>set oracle_sid=orclC:\>net stop OracleDBConsoleORCLThe OracleDBConsoleORCLvice is stopping................The OracleDBConsoleORCLservic e was stopped successfully.C:\>net stops OracleServiceORCLThe OracleServiceORCL is stopping.The OracleServiceORCLservice was stopped successfully.C:\>net stop O racleOraDB10g_Home1iSQL*Plus...The OracleOraDb10g_home1iSQL*Plus service was sto pped successfully.C:\>net stop OracleOraDB10g_Home1TNSListenerThe OracleOraDb10g _home1TNSListener service is stopping.The OracleOraDb10g_home1TNSListener servic

e was stopped successfully. C:\>net stop msdtcThe Distributed Transaction Coordinator service is stopping.Th e Distributed Transaction Coordinator service was stopped successfully OR CAN STOP ALL THE ORACLE SERVICES FROM SERVICES.MSC FROM THE RUN CONSOLE ON TH E START BUTTON. 11. Install software in new ORACLE_HOME. On welcome screen click Next1) On Specify file location screen, select the Name field and Path where you wish to Install new software (If you have multiple data base installed on your machine you will see drop down menu select new database o racle_home) 2) On summay screen, click Install After the software is installed on the new ORACLE_HOME 12. Upgrade the Database After you install the software in new ORACLE_HOME, you must perform the following steps on every database associated with the old ORACL E_HOME 1. Copy the p-file from old ORACLE_HOME and paste it into new ORACLE_HOME and re name it to associate the new SID (ie, and change the parameter to comp atible= in the p-file. 2. Create and Start NEW oracle services oradim -new -sid orcl2 -intpwd orcl2 -pfile 'E:\oracle\product\10.2.0\db_2\datab ase\INITorcl2.ora' -startmode auto 3 set ORACLE_SID=ORCL2 4. Connect sys userC :\> sqlplus /NOLOGSQL> CONNECT SYS/SYS_password AS SYSDBA5. Enter the following SQL*Plus commands:SQL> STARTUP UPGRADE pfile= New path where p-file is located\p-file.ora SQL> SPOOL upgrade.logSQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\catupgrd.sqlSQL> SPOOL OFFReview the upgrade.log file for errors and inspect the list of compone nts that is displayed at the end of catupgrd.sql script. This list provides the version and status of each SERVER component in the database. If necessary, rerun the catupgrd.sql script after correcting any problems. 6. Re start the database: SQL> SHUTDOWNSQL> STARTUP7. Compile Invalid ObjectsRun the u tlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended . SQL> @ORACLE_BASE\ORACLE_HOME\rdbms\admin\utlrp.sqlSQL> select * from v$versio n;BANNER----------------------------------------------------------------Oracle D atabase 10g Release - ProductionPL/SQL Release - Productio nCORE ProductionTNS for 32-bit Windows: Version - Producti onNLSRTL Version - Production 8. Clone the Database associated old ORACLE_HOME to new ORACLE_HOME if you want to remove the old ORACLE_HOME. 9. Delete the old oracle services by using the following command oradim -delete sid SID (associated with the previous database ie, 10. Remove the old Installation of oracle software (i.e., ------END OF ORACLE UPGRADATION FROM TO