Prepare for upgrading an invoice development test database. This upgrade is only applicable to database upgrades in the test environment. Therefore, the system, database statistics, and machines are not obtained one month in advance.
Prepare for upgrading an invoice development test database. This upgrade is only applicable to database upgrades in the test environment. Therefore, the system, database statistics, and machines are not obtained one month in advance.
Upgrade an invoice development test database
Preparations before upgrade. This upgrade is only applicable to database upgrades in the test environment. Therefore, the system and database statistics and machine performance comparison are not obtained one month in advance.
To speed up the upgrade, only the following information is cleared.
01. truncate SYS. AUD $ base table:
SQL> TRUNCATE TABLE SYS. AUD $;
02. Clear the DBA recycle bin:
SQL> purge DBA_RECYCLEBIN;
1. Before the upgrade, disconnect the middleware application in the test environment.
View the local Oracle_HOME
[Oracle @ Oel_10 ~] $ Echo $ ORACLE_HOME
/Opt/product/10.2.0/db_1
2.put the patch p8202632_10205_linux-x86-64.zip of 10.2.0.5to the/oinstall directory.
[Root @ Oel_10 ~] # Cd/oinstall/
[Root @ Oel_10 oinstall] # unzip after the p8202632_10205_Linux-x86-64.zip is decompressed, then grant the corresponding permissions, Disk1 is the directory of the extracted PATCH 10.2.0.5
[Root @ Oel_10 ~] # Chown-R oracle: oinstall/
[Root @ Oel_10 oinstall] # ls-al
Total 1221952
Drwxr-xr-x 5 oracle oinstall 4096 Apr 29 2010 Disk1
-Rw-r -- 1 oracle oinstall 1249857866 Nov 22 p8202632_10205_Linux-x86-64.zip
3. determine the current database version
SQL> select * from v $ version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64bit Production
PL/SQL Release 10.2.0.4.0-Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0-Production
NLSRTL Version 10.2.0.4.0-Production
5. Back up the database software and data files before upgrading. Backup is top priority.
01. Back up the database software with the tar command (omitted)
02. Use RMAN to back up the database itself (omitted)
03. After the backup is complete, stop the corresponding service.
Instance SQL> shutdown immediate
Listener $ lsnrctl stop
EM $ emctl stop dbconsole
6. Start to install the patch. the root user first enters the graphical interface.
[Root @ Oel_10 ~] # Xhost +
[Root @ Oel_10 ~] # Su-oracle
[Oracle @ Oel_10 ~] $ Cd/oinstall/
[Oracle @ Oel_10 oinstall] $ cd Disk1/
[Oracle @ Oel_10 Disk1] $ ls
Install patch_note.htm response runInstaller stage
Start patch installation
[Oracle @ Oel_10 Disk1] $./runInstaller
.
.
Graphical installation, which is consistent with the installation of oracle software. The installation process is ignored here.
.
.
7. After the installation is complete, start the database in upgrade mode and upgrade the data dictionary.
SQL> startup upgrade
SQL> select status from v $ instance;
STATUS
------------------------
OPEN MIGRATE
Confirm that the instance status is open migrate ()
When upgrading a large version of a database or a large patch, you always need to upgrade the data dictionary of an existing database. The reason for upgrading the data field is that with the upgrade of the Oracle version,
Attributes of some objects need to be changed to ensure the integrity and validity of the system's data dictionary. These changes are all in the upgrade script $ ORACLE_HOME/rdbms/admin/catupgrd. SQL.
After starting the database in Upgrade mode, start to upgrade the data dictionary
SQL> @/opt/product/10.2.0/db_1/rdbms/catupgrd. SQL
When upgrading the data dictionary, you can see the corresponding operations
PL/SQL procedure successfully completed.
Type created.
Grant succeeded.
Package created.
No errors.
Table created.
PL/SQL procedure successfully completed.
View created.
Synonym created.
The function of catupgrd. SQL is further verified. After the data dictionary is upgraded, the following information will appear in sqlplus:
TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP RUL 06:56:47
DBUA_TIMESTAMP rul valid 2012-11-23 06:56:47
COMP_TIMESTAMP UPGRD_END 2012-11-23 06:58:01
.
Oracle Database 10.2 Upgrade Status Utility 11-23-2012 06:58:01
.
Component Status Version HH: MM: SS
Oracle Database Server VALID 10.2.0.5.0 00:07:52
JServer JAVA Virtual Machine VALID 10.2.0.5.0 00:00:56
Oracle xdk valid 10.2.0.5.0 00:00:23
Oracle Database Java Packages VALID 10.2.0.5.0 00:00:12
Oracle Text VALID 10.2.0.5.0 00:00:18
Oracle XML Database VALID 10.2.0.5.0 00:02:02
Oracle Workspace Manager VALID 10.2.0.5.0 00:00:36
Oracle Data Mining VALID 10.2.0.5.0 00:00:15
OLAP Analytic Workspace VALID 10.2.0.5.0 00:00:16
OLAP Catalog VALID 10.2.0.5.0 00:00:42
Oracle olap api valid 10.2.0.5.0 00:00:31
Oracle interMedia VALID 10.2.0.5.0 00:02:21
Spatial VALID 10.2.0.5.0 00:01:32
Oracle Expression Filter VALID 10.2.0.5.0 00:00:06
Oracle Enterprise Manager VALID 10.2.0.5.0 00:00:30
Oracle Rule Manager VALID 10.2.0.5.0 00:00:06
.
Total Upgrade Time: 00:20:01
DOC> ###################################### #################################
DOC> ###################################### #################################
DOC>
DOC> The above PL/SQL lists the SERVER components in the upgraded
DOC> database, along with their current version and status.
DOC>
DOC> Please review the status and version columns and look
DOC> any errors in the spool log file. If there are errors in the spool
DOC> file, or any components are not VALID or not the current version,
DOC> consult the Oracle Database Upgrade Guide for troubleshooting
DOC> recommendations.
DOC>
DOC> Next shutdown immediate, restart for normal operation, and then
DOC> run utlrp. SQL to recompile any invalid application objects.
DOC>
DOC> ###################################### #################################
DOC> ###################################### #################################
For more details, please continue to read the highlights on the next page:
-------------------------------------- Split line --------------------------------------
Install Oracle 11gR2 (x64) in CentOS 6.4)
Steps for installing Oracle 11gR2 in vmwarevm
Install Oracle 11g XE R2 In Debian
-------------------------------------- Split line --------------------------------------