Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Upgrade two oracle 11g databases under AIX platform HA dual standby environment

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment and demand environment

Two P570 machines, operating system AIX 6.1, database software oracle 11.2.0.1.0, HA dual backup mode, two instances db1 and db2 (two libraries, different business systems), usually one on each machine.

Demand

Upgrade the oracle software on both ends of HA to 11.2.0.3.0

The two libraries involved in HA, db1 and db2, were upgraded to 11.2.0.3.0

Upgrade plan upgrade steps

The main steps for upgrading are as follows:

Stop application, stop ha dual computers (stop database)

Stop listening, isqlplus, dbconsole, etc.

Manual varyonvg, mount the corresponding vg

Back up the base directory and the data storage directory to check whether the backup is complete and valid

Upload and extract the patch pack, create a new oracle home directory, and adjust the oracle environment variable parameter file

Install softwar

Upgrade libraries, update upgrade data dictionaries, recompile invalid objects, etc.

Copy and modify parameter files and monitoring configuration files, etc.

Manually uninstall the corresponding vg and varyoffvg,HA switching tests

(note: the following upgrade software, upgrade library, HA test, adjust database parameters, create tablespaces and build users are all operations performed on the machine and library where db1 resides; the steps for upgrading software and libraries on the machine where db2 resides are the same and will not be repeated. )

Upgrade oracle software requirements

Upgrade the oracle database software on both ends of the HA to 11.2.0.3.0.

Implement

? Stop application, stop HA dual computers (stop database)

# smitty clstop

? Stop listening, isqlplus, dbconsole, etc.

The monitoring has been stopped by HA.

DB1host:/home/oracle$isqlplusctl stop

DB1host:/home/oracle$ emctl stop dbconsole

? Varyonvg corresponding VG and mount

# lspv

# lsvg

# varyonvg DB1_datavg

# mount / oracle/oradata/DB1data

# mount

# varyonvg DB1_backupvg

# mount / backup/DB1

# mount

? Backup software

The database is empty and has no data, so you only need to back up the oracle BASE directory and the directory where the database files (including parameter files, control files, log files, data files, password files, password files and monitoring configuration files, etc.) are located.

# chown-R oracle:oinstall / backup/DB1

DB1host:/home/oracle$ cp-r / oracle/* / backup/DB1/ &

? Upload and decompress the patch package

Upload and extract the patch pack, create a new oracle home directory, and adjust the oracle environment variable parameter file

Upload p10404530_112030_AIX64-5L_1of7.zip and p10404530_112030_AIX64-5L_2of7.zip to the / tmp/oracle_patch directory

Unzip:

Jar-xvf p10404530_112030_AIX64-5L_1of7.zip

Jar-xvf p10404530_112030_AIX64-5L_2of7.zip

Create a new directory:

DB1host:/home/oracle$ mkdir-p / oracle/product/11.2.0.3

Note:

Oracle 11.2.0.3.0 is a new installation, so you can install 11.2.0.1.0 directly without installing 11.2.0.1.0. Oracle recommends upgrading the installation in a new home directory, and then updating the database with the new software library. If you specify the original directory, an error INS-35432 will be reported.

Modify the environment variable parameter file:

DB1host:/home/oracle$ cp .profile .profile.bak20120712

DB1host:/home/oracle$ vi .profile

Comment out the line export ORACLE_HOME=$ORACLE_BASE/product/11.2 and add a new line under it

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.3 exits after saving

To make the changes effective:

DB1host:/home/oracle$. . / .profile

? Install softwar

Remote graphical display with xmanager

# su-oracle

DB1host:/home/oracle$ export DISPLAY=192.168.1.195:0.0 (where the red mark is local ip)

DB1host:/home/oracle$ xclock

Run the script rootpre.sh as root and install the software as oracle. / runInstaller

# cd / tmp/oracle_patch/database

#. / rootpre.sh

# su-oracle

DB1host:/home/oracle$ cd / tmp/oracle_patch/database

DB1host:/home/oracle$./runInstaller

Execute the script / oracle/product/11.2.0.3/root.sh as root:

Upgrade oracle library requirements

Upgrade the libraries db1 and db2 on both ends of HA to 11.2.0.3.0.

Implement

? Upgrade library

Upgrade libraries, update upgrade data dictionaries, recompile invalid objects, etc.

DB1host:/tmp/oracle_patch/database$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 12 15:49:43 2012

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

Connected to an idle instance.

SQL > startup upgrade

ORACLE instance started.

Total System Global Area 1.2994E+10 bytes

Fixed Size 2233680 bytes

Variable Size 6543116976 bytes

Database Buffers 6442450944 bytes

Redo Buffers 6590464 bytes

Database mounted.

Database opened.

SQL >! pwd

/ tmp/oracle_patch/database

SQL > spool patch.log

SQL > @ / oracle/product/11.2.0.3/rdbms/admin/utlu112i.sql

SQL > spool off

SQL > spool upgrade.log

SQL > @ / oracle/product/11.2.0.3/rdbms/admin/catupgrd.sql

The script that upgrades the data dictionary ends up consistently shutting down the database (SQL > shutdown immediate)

DB1host:/tmp/oracle_patch/database$ ps-ef | grep ora_

Oracle 12518044 7798840 0 16:24:44 pts/6 0:00 grep ora_

DB1host:/tmp/oracle_patch/database$ echo $ORACLE_SID

Db1

DB1host:/tmp/oracle_patch/database$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 12 16:25:15 2012

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

Connected to an idle instance.

SQL > startup

ORACLE instance started.

Total System Global Area 1.2994E+10 bytes

Fixed Size 2233680 bytes

Variable Size 6643780272 bytes

Database Buffers 6341787648 bytes

Redo Buffers 6590464 bytes

Database mounted.

Database opened.

SQL > @ / oracle/product/11.2.0.3/rdbms/admin/utlrp.sql

SQL > shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL > startup

ORACLE instance started.

Total System Global Area 1.2994E+10 bytes

Fixed Size 2233680 bytes

Variable Size 6677334704 bytes

Database Buffers 6308233216 bytes

Redo Buffers 6590464 bytes

Database mounted.

Database opened.

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

No rows selected

SQL > select * from v$version

SQL > SELECT comp_name, version, status FROM dba_registry

SQL > shutdown immediate

? Related profile adjustment

Copy and modify parameter files and monitoring configuration files, etc.

Copy the relevant parameter files, password files, and listening configuration files from the original oracle home directory to the new directory:

DB1host:/home/oracle$ cp-r / oracle/product/11.2/dbs/* / oracle/product/11.2.0.3/dbs/

DB1host:/home/oracle$ cp-r / oracle/product/11.2/network/admin/* / oracle/product/11.2.0.3/network/admin/

Modify the listener.ora file:

In / oracle/product/11.2.0.3/network/admin/listener.ora

ORACLE_HOME = / oracle/product/11.2/

Change all to ORACLE_HOME = / oracle/product/11.2.0.3/

Save and exit.

Test HA Test after upgrade

# ps-ef | grep ora_

# umount / oracle/oradata/DB1data

# umount / backup/DB1

# varyoffvg / backup/DB1

# lspv

# varyoffvg DB1_backupvg

# varyoffvg DB1_datavg

# smitty hacmp

# smitty clstart

# tail-f / tmp/hacmp.out

# lspv

# ps-ef | grep ora_

# tail-f / tmp/hacmp.out

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report