[root@oracle9i ~]# hostname
oracle9i.abc.com
IP地址:
[root@oracle9i ~]# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:0C:29:F5:24:62
inet addr:192.168.1.19 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fef5:2462/64 Scopeink
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:92 errors:0 dropped:0 overruns:0 frame:0
TX packets:95 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9187 (8.9 KiB) TX bytes:11789 (11.5 KiB)
Interrupt:193 Base address:0x2024
lo Link encapocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4708 errors:0 dropped:0 overruns:0 frame:0
TX packets:4708 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6440256 (6.1 MiB) TX bytes:6440256 (6.1 MiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
当前服务器上9i版本数据库实例的个数及实例名称:
[root@oracle9i ~]# cat /etc/oratab
# *:/opt/oracle/product/9.2:N
# *:/opt/oracle/product/9.2:N
# *:/opt/oracle/product/9.2:N
ora9i:/opt/oracle/product/9.2:N
*:/opt/oracle/product/9.2:N
orcl:/opt/oracle/product/9.2:N
升级前oracle用户下bash_profile 文件的配置:
[root@oracle9i ~]# su - oracle
[oracle@oracle9i ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/9.2
export PATH=$ORACLE_HOME/binORACLE_HOME/Apache/Apache/binPATH
#export DISPLAY=鈥92.168.9.205:0.0鈥(127.0.0.1:0.0)
export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i #(鏁版嵁搴撳叏灞€鍙橀噺鍚export ORACLE_TERM=xterm #(xterm绐楀彛妯″紡 vt100 缁堢璋冭瘯妯″紡)
export LD_ASSUME_KERNEL=2.4.19 #鏋滃畨瑁呭湪AS3 涓婃澶勪负2.4.1
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export THREADS_FLAG=native
export LD_LIBRARY_PATH=/opt/oracle/product/9.2/libLD_LIBRARY_PATH
export LANG=en_US #(璁剧疆璇█鑻辨枃鎴杄xport NLS_LANG='AMERCIAN')
#PATH=$PATHHOME/bin
export PATH
unset USERNAME
[oracle@oracle9i ~]$ exit
logout
升级前确认每个实例的版本:
[root@oracle9i ~]# su - oracle
[oracle@oracle9i ~]$ echo $ORACLE_SID
ora9i
[oracle@oracle9i ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Oct 1 22:49:30 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysDBA
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 235999648 bytes
Fixed Size 450976 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for Linux: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@oracle9i ~]$ export ORACLE_SID=orcl
[oracle@oracle9i ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Oct 1 22:50:47 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 235999648 bytes
Fixed Size 450976 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for Linux: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
查看监听是否启动,未启动:
[oracle@oracle9i ~]$ ps -ef | grep ora_| grep -v grep
[oracle@oracle9i ~]$ exit
logout
通过rman对数据库的每个实例做一个全备:
1)创建备份目录:
[root@oracle9i /]# cd /opt
[root@oracle9i opt]# ls -l
total 8
drwxr-xr-x 9 oracle oinstall 4096 Sep 5 11:54 oracle
drwxr-xr-x 3 root root 4096 Sep 6 07:39 ORCLfmap
[root@oracle9i opt]# mkdir /backup
2)设置备份目录权限:
[root@oracle9i opt]# chown oracleinstall /backup/
[root@oracle9i opt]# cd / ;ls -l | grep backup
drwxr-xr-x 2 oracle oinstall 4096 Oct 1 22:54 backup
3)分别备份每个实例,备份在mount状态下进行:
[root@oracle9i /]# su - oracle
[oracle@oracle9i ~]$ echo $ORACLE_SID
ora9i
[oracle@oracle9i ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Oct 1 22:56:06 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 235999648 bytes
Fixed Size 450976 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@oracle9i ~]$ echo $ORACLE_SID
ora9i
[oracle@oracle9i ~]$ rman target / nocatalog
Recovery Manager: Release 9.2.0.8.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: ORA9I (DBID=2592811513)
using target database controlfile instead of recovery catalog
RMAN> run {
2> allocate channel c1 type disk;
3> backup full database filesperset 3 format '/backup/ora9i_%U.bak';
4> release channel c1;
5> }
allocated channel: c1
channel c1: sid=11 devtype=DISK
Starting backup at 01-OCT-12
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00006 name=/opt/oracle/oradata/ora9i/indx01.dbf
input datafile fno=00009 name=/opt/oracle/oradata/ora9i/users01.dbf
input datafile fno=00004 name=/opt/oracle/oradata/ora9i/drsys01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/ora9i_01nmmpd6_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00010 name=/opt/oracle/oradata/ora9i/xdb01.dbf
input datafile fno=00003 name=/opt/oracle/oradata/ora9i/cwmlite01.dbf
input datafile fno=00007 name=/opt/oracle/oradata/ora9i/odm01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/ora9i_02nmmpdd_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00005 name=/opt/oracle/oradata/ora9i/example01.dbf
input datafile fno=00011 name=/opt/oracle/oradata/ora9i/undotbs02.dbf
input datafile fno=00008 name=/opt/oracle/oradata/ora9i/tools01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/ora9i_03nmmpdk_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:15
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00001 name=/opt/oracle/oradata/ora9i/system01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/ora9i_04nmmpe3_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:26
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00002 name=/opt/oracle/oradata/ora9i/undotbs01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/ora9i_05nmmpet_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:25
Finished backup at 01-OCT-12
released channel: c1
RMAN> exit
Recovery Manager complete.
[oracle@oracle9i ~]$ export ORACLE_SID=orcl
[oracle@oracle9i ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Oct 1 23:00:54 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 235999648 bytes
Fixed Size 450976 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@oracle9i ~]$ echo $ORACLE_SID
orcl
[oracle@oracle9i ~]$ rman target / nocatalog
Recovery Manager: Release 9.2.0.8.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: ORCL (DBID=1321047502)
using target database controlfile instead of recovery catalog
RMAN> run {
2> allocate channel c1 type disk;
3> backup full database filesperset 3 format '/backup/orcl_%U.bak';
4> release channel c1;
5> }
allocated channel: c1
channel c1: sid=11 devtype=DISK
Starting backup at 01-OCT-12
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00010 name=/opt/oracle/oradata/orcl/xdb01.dbf
input datafile fno=00006 name=/opt/oracle/oradata/orcl/indx01.dbf
input datafile fno=00009 name=/opt/oracle/oradata/orcl/users01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/orcl_01nmmpnh_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:07
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00005 name=/opt/oracle/oradata/orcl/example01.dbf
input datafile fno=00003 name=/opt/oracle/oradata/orcl/cwmlite01.dbf
input datafile fno=00004 name=/opt/oracle/oradata/orcl/drsys01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/orcl_02nmmpno_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:15
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00002 name=/opt/oracle/oradata/orcl/undotbs01.dbf
input datafile fno=00007 name=/opt/oracle/oradata/orcl/odm01.dbf
input datafile fno=00008 name=/opt/oracle/oradata/orcl/tools01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/orcl_03nmmpo7_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:35
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00001 name=/opt/oracle/oradata/orcl/system01.dbf
channel c1: starting piece 1 at 01-OCT-12
channel c1: finished piece 1 at 01-OCT-12
piece handle=/backup/orcl_04nmmppa_1_1.bak comment=NONE
channel c1: backup set complete, elapsed time: 00:00:37
Finished backup at 01-OCT-12
released channel: c1
RMAN> exit
查看备份文件是否生成:
Recovery Manager complete.
[oracle@oracle9i ~]$ cd /backup
[oracle@oracle9i backup]$ ls -l
total 1719444
-rw-r----- 1 oracle oinstall 5726208 Oct 1 22:58 ora9i_01nmmpd6_1_1.bak
-rw-r----- 1 oracle oinstall 36438016 Oct 1 22:58 ora9i_02nmmpdd_1_1.bak
-rw-r----- 1 oracle oinstall 134225920 Oct 1 22:59 ora9i_03nmmpdk_1_1.bak
-rw-r----- 1 oracle oinstall 349110272 Oct 1 22:59 ora9i_04nmmpe3_1_1.bak
-rw-r----- 1 oracle oinstall 409632768 Oct 1 22:59 ora9i_05nmmpet_1_1.bak
-rw-r----- 1 oracle oinstall 21577728 Oct 1 23:04 orcl_01nmmpnh_1_1.bak
-rw-r----- 1 oracle oinstall 138870784 Oct 1 23:04 orcl_02nmmpno_1_1.bak
-rw-r----- 1 oracle oinstall 337682432 Oct 1 23:05 orcl_03nmmpo7_1_1.bak
-rw-r----- 1 oracle oinstall 325672960 Oct 1 23:05 orcl_04nmmppa_1_1.bak
关闭备份时启动到mount状态的两个实例:
[oracle@oracle9i backup]$ cd
[oracle@oracle9i ~]$ ps -ef | grep ora_
oracle 30163 1 0 22:56 ? 00:00:00 ora_pmon_ora9i
oracle 30165 1 0 22:56 ? 00:00:00 ora_dbw0_ora9i
oracle 30167 1 0 22:56 ? 00:00:00 ora_lgwr_ora9i
oracle 30169 1 0 22:56 ? 00:00:00 ora_ckpt_ora9i
oracle 30171 1 0 22:56 ? 00:00:00 ora_smon_ora9i
oracle 30173 1 0 22:56 ? 00:00:00 ora_reco_ora9i
oracle 30175 1 0 22:56 ? 00:00:00 ora_cjq0_ora9i
oracle 30179 1 0 22:56 ? 00:00:00 ora_s000_ora9i
oracle 30181 1 0 22:56 ? 00:00:00 ora_d000_ora9i
oracle 30211 1 0 23:01 ? 00:00:00 ora_pmon_orcl
oracle 30213 1 0 23:01 ? 00:00:00 ora_dbw0_orcl
oracle 30215 1 0 23:01 ? 00:00:00 ora_lgwr_orcl
oracle 30217 1 0 23:01 ? 00:00:00 ora_ckpt_orcl
oracle 30219 1 0 23:01 ? 00:00:00 ora_smon_orcl
oracle 30221 1 0 23:01 ? 00:00:00 ora_reco_orcl
oracle 30223 1 0 23:01 ? 00:00:00 ora_cjq0_orcl
oracle 30227 1 0 23:01 ? 00:00:00 ora_s000_orcl
oracle 30229 1 0 23:01 ? 00:00:00 ora_d000_orcl
oracle 30254 1 0 23:13 ? 00:00:00 ora_qmn0_orcl
oracle 30256 1 0 23:14 ? 00:00:00 ora_qmn0_ora9i
oracle 30267 30134 0 23:17 pts/2 00:00:00 grep ora_
[oracle@oracle9i ~]$ echo $ORACLE_SID
ora9i
[oracle@oracle9i ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Oct 1 23:17:26 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@oracle9i ~]$ export ORACLE_SID=orcl
[oracle@oracle9i ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Mon Oct 1 23:18:21 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected.
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> exit
关闭监听:
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@oracle9i ~]$ ps -ef | grep ora_| grep -v grep
[oracle@oracle9i ~]$ ps -ef | grep tns| grep -v grep
[oracle@oracle9i ~]$
查看文件系统使用情况,建立oracle 10.2.0.1数据库软件的安装目录:
[oracle@oracle9i ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 22G 12G 9.4G 55% /
/dev/sda1 981M 24M 907M 3% /boot
none 768M 0 768M 0% /dev/shm
查看一下9i数据库的相关目录:
[root@oracle9i /]# su - oracle
[oracle@oracle9i ~]$ echo $ORACLE_BASE
/opt/oracle
[oracle@oracle9i ~]$ echo $ORACLE_HOME
/opt/oracle/product/9.2
[oracle@oracle9i ~]$ exit
logout
建立oracle 10.2.0.1数据库软件的安装目录:
[root@oracle9i /]# mkdir -p /home/db/oracle
[root@oracle9i /]# mkdir -p /home/db/oracle/10g
[root@oracle9i /]# chown oracle:dba -R /home/db/oracle
[root@oracle9i /]# chown oracle:dba -R /home/db/oracle/10g
[root@oracle9i /]# ls -l /home/db/oracle
total 4
drwxr-xr-x 2 oracle dba 4096 Oct 1 23:34 10g
[root@oracle9i /]# ls -l /home/db/oracle/10g
total 0
上传oracle 10.2.0.1软件,注意上传后文件的权限,或用oracle用户上传:
[root@oracle9i /]# cd /home/db/oracle
[root@oracle9i oracle]# ls
10201_database_linux32.zip 10g
[root@oracle9i oracle]# ls -l
total 653712
-rwxr--r-- 1 root root 668734007 Oct 1 23:37 10201_database_linux32.zip
drwxr-xr-x 2 oracle dba 4096 Oct 1 23:34 10g
[root@oracle9i oracle]# chown oracle:dba 10
10201_database_linux32.zip 10g/
更改上传文件的权限:
[root@oracle9i oracle]# chown oracle:dba 10201_database_linux32.zip
[root@oracle9i oracle]# chmod 755 10201_database_linux32.zip
oracle用户解压并安装10g数据库软件,注意只安装数据库软件不建库
[root@oracle9i oracle]# su - oracle
[oracle@oracle9i ~]$ cd /home/db/oracle
[oracle@oracle9i oracle]$ ls
10201_database_linux32.zip 10g
[oracle@oracle9i oracle]$ unzip 10201_database_linux32.zip
[oracle@oracle9i oracle]$ ls -l
total 653716
-rwxr-xr-x 1 oracle dba 668734007 Oct 1 23:37 10201_database_linux32.zip
drwxr-xr-x 2 oracle dba 4096 Oct 1 23:34 10g
drwxr-xr-x 6 oracle oinstall 4096 Jul 2 2005 database
[oracle@oracle9i oracle]$ 安装oracle 10.2.0.1
更改目录为新建的相关目录,如下图
忽略警告信息
执行root.sh脚本
首先升级ora9i实例
启动oracle9.2.0.8, 以SYSDBA身份登陆到SQLPLUS,进行安装前的准备工作,看是否还有参数、表空间需要调整:
[oracle@oracle9i ~]$ export ORACLE_SID
[oracle@oracle9i ~]$ echo $ORACLE_SID
ora9i
[oracle@oracle9i ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Tue Oct 2 00:01:16 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 235999648 bytes
Fixed Size 450976 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> spool upgrade.info
SQL> @/home/db/oracle/10g/rdbms/admin/utlu102i.sql
Oracle Database 10.2 Upgrade Information Utility 10-02-2012 00:03:39
.
**********************************************************************
Database:
**********************************************************************
--> name: ORA9I
--> version: 9.2.0.8.0
--> compatible: 9.2.0.0.0
.
**********************************************************************
Logfiles: [make adjustments in the current environment]
**********************************************************************
--> The existing log files are adequate. No changes are required.
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 571 MB
.... AUTOEXTEND additional space required: 161 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 58 MB
.... AUTOEXTEND additional space required: 18 MB
--> CWMLITE tablespace is adequate for the upgrade.
.... minimum required size: 16 MB
--> DRSYS tablespace is adequate for the upgrade.
.... minimum required size: 27 MB
.... AUTOEXTEND additional space required: 7 MB
--> EXAMPLE tablespace is adequate for the upgrade.
.... minimum required size: 150 MB
.... AUTOEXTEND additional space required: 1 MB
--> ODM tablespace is adequate for the upgrade.
.... minimum required size: 10 MB
--> XDB tablespace is adequate for the upgrade.
.... minimum required size: 48 MB
.... AUTOEXTEND additional space required: 3 MB
.
**********************************************************************
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
WARNING: --> "shared_pool_size" needs to be increased to at least 183314432
WARNING: --> "streams_pool_size" is not currently defined and needs a value of
at least 50331648
WARNING: --> "session_max_open_files" needs to be increased to at least 20
.
**********************************************************************
Deprecated Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No deprecated parameters found. No changes are required.
.
**********************************************************************
Obsolete Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
--> "hash_join_enabled"
.
**********************************************************************
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
...The 'JServer JAVA Virtual Machine' JAccelerator (NCOMP)
...is required to be installed from the 10g Companion CD.
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> Oracle Data Mining [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] UPGRADED
--> OLAP Catalog [upgrade] VALID
--> Oracle OLAP API [upgrade] UPGRADED
--> Oracle interMedia [upgrade] VALID
...The 'Oracle interMedia Image Accelerator' is
...required to be installed from the 10g Companion CD.
--> Spatial [upgrade] VALID
--> Oracle Ultra Search [upgrade] VALID
... To successfully upgrade Ultra Search, install it from
... the 10g Companion CD.
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Deprecated CONNECT role granted to some user/roles.
.... CONNECT role after upgrade has only CREATE SESSION privilege.
WARNING: --> Database contains stale optimizer statistics.
.... Refer to the 10g Upgrade Guide for instructions to update
.... statistics prior to upgrading the database.
.... Component Schemas with stale statistics:
.... SYS
.... XDB
.... WMSYS
.... ODM
.... OLAPSYS
.... MDSYS
.... WKSYS
.
**********************************************************************
SYSAUX Tablespace:
[Create tablespace in the Oracle Database 10.2 environment]
**********************************************************************
--> New "SYSAUX" tablespace
.... minimum required size for database upgrade: 500 MB
.
PL/SQL procedure successfully completed.
关闭带升级的数据库实例:
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
(上面的警告信息是需要调整的参数)
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@oracle9i ~]$ echo $ORACLE_SID
ora9i
拷贝9i的initora9i.ora文件到/home/db/oracle/10g/dbs目录下;
拷贝9i的密码文件orapwora9i到/home/db/oracle/10g/dbs目录下;
[oracle@oracle9i ~]$ cd $ORACLE_HOME/dbs
[oracle@oracle9i dbs]$ ls
initdw.ora lkORA9I orapworcl spfileora9i.ora
init.ora lkORCL snapcf_ora9i.f spfileorcl.ora
initora9i.ora orapwora9i snapcf_orcl.f
[oracle@oracle9i dbs]$ cp initora9i.ora /home/db/oracle/10g/dbs/
[oracle@oracle9i dbs]$ cp orapwora9i /home/db/oracle/10g/dbs/
,拷贝oracle9.2.0.8目录$ORACLE_HOME/network下的tnsname.ora、listener.ora到/home/db/oracle/10g/network/admin目录;
[oracle@oracle9i dbs]$ cd ../
[oracle@oracle9i 9.2]$ cd network
[oracle@oracle9i network]$ ls
[oracle@oracle9i network]$ cd admin
[oracle@oracle9i admin]$ ls
libnk59.def samples snmp_ro.ora tnsnames.ora
listener.ora shrept.lst sqlnet.ora
[oracle@oracle9i admin]$ cp tnsnames.ora /home/db/oracle/10g/network/admin/
[oracle@oracle9i admin]$ cp listener.ora /home/db/oracle/10g/network/admin/
[oracle@oracle9i admin]$ cd /home/db/oracle/10g/dbs
[oracle@oracle9i dbs]$ ls
initdw.ora init.ora initora9i.ora orapwora9i
编辑参数文件,调整上面提到的警告信息中的参数值根据upgrade.info的提示,手工修改/home/db/oracle/10g/dbs下参数文件initora.ora,添加参数streams_pool_size并赋值为50331648:
[oracle@oracle9i dbs]$ vi initora9i.ora
添加以下内容:
*.shared_pool_size=183314432
*.streams_pool_size=50331648
*.session_max_open_files=20
关闭oracle9.2.0.8数据库实例,关闭listener进程,用oracle10g的环境变量以oracle身份登陆到图形界面,以dbua的方式启动数据库的升级,下面显示截图,过程不赘述:
[oracle@oracle9i dbs]$ cd
[oracle@oracle9i ~]$ vi .bash_profile
export ORACLE_BASE=/home/db/oracle/
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_BASE=/home/db/oracle/
export ORACLE_HOME=$ORACLE_BASE/10g
#export ORACLE_BASE=/opt/oracle
#export ORACLE_HOME=/opt/oracle/product/9.2
export PATH=$ORACLE_HOME/binORACLE_HOME/Apache/Apache/binPATH
#export DISPLAY=[1m~@92.168.9.205:0.0[1m~@(127.0.0.1:0.0)
export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i #([1m~U版~M[1m~S[1m~Eㄥ[1m~@[1m~O~X[1m~G~O[1m~P
export ORACLE_TERM=xterm #(xterm绐~W[1m~Ofā寮~O vt100 缁~H绔[1m~C璇~U妯″[1m~O)
export LD_ASSUME_KERNEL=2.4.19 #[1m~^~\瀹~I瑁~E[1m~\ˋS3 涓~J姝ゅ[1m~D涓.4.1
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export THREADS_FLAG=native
export LD_LIBRARY_PATH=/opt/oracle/product/9.2/libLD_LIBRARY_PATH
export LANG=en_US #(璁剧疆璇[1m~@[1m~K辨~V~G[1m~H~Vexport NLS_LANG='AMERCIAN')
#PATH=$PATHHOME/bin
".bash_profile" 26L, 891C written
[oracle@oracle9i ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export ORACLE_BASE=/home/db/oracle/
export ORACLE_HOME=$ORACLE_BASE/10g
#export ORACLE_BASE=/opt/oracle
#export ORACLE_HOME=/opt/oracle/product/9.2
export PATH=$ORACLE_HOME/binORACLE_HOME/Apache/Apache/binPATH
#export DISPLAY=鈥92.168.9.205:0.0鈥(127.0.0.1:0.0)
export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i #(鏁版嵁搴撳叏灞€鍙橀噺鍚
export ORACLE_TERM=xterm #(xterm绐楀彛妯″紡 vt100 缁堢璋冭瘯妯″紡)
export LD_ASSUME_KERNEL=2.4.19 #鏋滃畨瑁呭湪AS3 涓婃澶勪负2.4.1
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export THREADS_FLAG=native
export LD_LIBRARY_PATH=/opt/oracle/product/9.2/lib:$LD_LIBRARY_PATH
export LANG=en_US #(璁剧疆璇█鑻辨枃鎴杄xport NLS_LANG='AMERCIAN')
#PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
[oracle@oracle9i ~]$ source .bash_profile
[oracle@oracle9i ~]$ exit
logout
[root@oracle9i oracle]# su - oracle
[oracle@oracle9i ~]$ exit
logout
因为之前安装过oracle9.2.0.8的数据库,所以这里自动获得实例名以及对应的oracle home,选择这个实例进行升级:
oracle升级程序开始收集一些信息比如初始化参数文件initora.ora以及其他一些相关参数,如果在此之前没有将oracle9i中的初始化参数文件拷贝到oracle10g对应的目录,那么这里会弹出对话框提示操作无法继续进行:
出现一条警告信息,不用管:
又有一个警告信息,不管它,接着往下走:
因为在oracle9i中没有sysaux表空间,如果之前也没有建立相应的表空间,那么到了这一步系统会提示你建立sysaux表空间
在这里可以选择并行度,如果服务器里有多个CPU,可以将并行参数值调高来工作,那么安装的速度会加倍提升:
如果之前做过系统全备,那么这里可以选择不备份,继续往下走:
这
设定登陆密码,继续往下走
[oracle@oracle9i ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# ORACLE 10
export ORACLE_BASE=/home/db/oracle/
export EDITOR=vim
export ORACLE_HOME=$ORACLE_BASE/10g/
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/X11R6/lib
export PATH=$ORACLE_HOME/bin:$PATH
# ORACLE 9I
#export ORACLE_BASE=/opt/oracle
#export ORACLE_HOME=/opt/oracle/product/9.2
#export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
#export DISPLAY=\uffff\uffff92.168.9.205:0.0\uffff\uffff(127.0.0.1:0.0)
#export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i #(\u6570\u636e\u5e93\u5168\u5c40\u53d8\u91cf
#export ORACLE_TERM=xterm #(xterm\u7a97\u53e3\u6a21\u5f0f vt100 \u7ec8\u7aef\u8c03\u8bd5\u6a21\u5f0f)
#export LD_ASSUME_KERNEL=2.4.19 #\u679c\u5b89\u88c5\u5728AS3 \u4e0a\u6b64\u5904\u4e3a2.4.1
#export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
#export THREADS_FLAG=native
#export LD_LIBRARY_PATH=/opt/oracle/product/9.2/lib:$LD_LIBRARY_PATH
export LANG=en_US #(\u8bbe\u7f6e\u8bed\u8a00\u82f1\u6587\u6216export NLS_LANG='AMERCIAN')
#PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
(数据库升级完成后实例会自动启动,监听器要手动启动,但此时sqlplus 登陆数据库可能会报ORA-01034,数据库EXCLUSIVE 模式的错误
解决方法:kill -9 杀掉自动开启的实例,然后sqlplus 手动启动实例,此问题即可解决)
使用下列语句查询升级后数据库组件的版本:
select * from dba_registry;
select comp_name,version from dba_registry;
至此 数据库实例ora9i已升级到10.2.0.1成功。
此数据库服务器上还有另个9i 的实例orcl,升级实例orcl,
[root@oracle9i ~]# su - oracle
[oracle@oracle9i product]$ cd
[oracle@oracle9i ~]$ vi .bash_profile
# ORACLE 10
export ORACLE_BASE=/home/db/oracle/
export EDITOR=vim
export ORACLE_HOME=$ORACLE_BASE/10g/
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/X11R6/lib
export PATH=$ORACLE_HOME/bin:$PATH
# ORACLE 9I
#export ORACLE_BASE=/opt/oracle
#export ORACLE_HOME=/opt/oracle/product/9.2
#export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
#export DISPLAY=[1m~@92.168.9.205:0.0[1m~@(127.0.0.1:0.0)
#export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i #([1m~U版~M[1m~S[1m~Eㄥ[1m~@[1m~O~X[1m~G~O[1m~P
#export ORACLE_TERM=xterm #(xterm绐~W[1m~Ofā寮~O vt100 缁~H绔[1m~C璇~U妯″[1m~O)
#export LD_ASSUME_KERNEL=2.4.19 #[1m~^~\瀹~I瑁~E[1m~\ˋS3 涓~J姝ゅ[1m~D涓.4.1
#export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
#export THREADS_FLAG=native
#export LD_LIBRARY_PATH=/opt/oracle/product/9.2/lib:$LD_LIBRARY_PATH
export LANG=en_US #(璁剧疆璇[1m~@[1m~K辨~V~G[1m~H~Vexport NLS_LANG='AMERCIAN')
#PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
unset USERNAME
".bash_profile" 31L, 1035C written
[oracle@oracle9i ~]$ source .bash_profile
[oracle@oracle9i ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# ORACLE 10
#export ORACLE_BASE=/home/db/oracle/
#export EDITOR=vim
#export ORACLE_HOME=$ORACLE_BASE/10g/
#export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/X11R6/lib
#export PATH=$ORACLE_HOME/bin:$PATH
# ORACLE 9I
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/9.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i #(鏁版嵁搴撳叏灞€鍙橀噺鍚
export ORACLE_TERM=xterm #(xterm绐楀彛妯″紡 vt100 缁堢璋冭瘯妯″紡)
export LD_ASSUME_KERNEL=2.4.19 #鏋滃畨瑁呭湪AS3 涓婃澶勪负2.4.1
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export THREADS_FLAG=native
export LD_LIBRARY_PATH=/opt/oracle/product/9.2/lib:$LD_LIBRARY_PATH
export LANG=en_US #(璁剧疆璇█鑻辨枃鎴杄xport NLS_LANG='AMERCIAN')
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
[oracle@oracle9i ~]$ export ORACLE_SID=orcl
[oracle@oracle9i ~]$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 - Production on Tue Oct 2 02:34:02 2012
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL> connect /as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 235999648 bytes
Fixed Size 450976 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
SQL> create pfile from spfile;
File created.
SQL> host;
[oracle@oracle9i ~]$ cd $ORACLE_HOME/dbs
[oracle@oracle9i dbs]$ ls -l | grep initorcl.ora
-rw-r--r-- 1 oracle oinstall 980 Oct 2 02:34 initorcl.ora
[oracle@oracle9i dbs]$ exit
exit
SQL> spool upgrade.info
SQL> @/home/db/oracle/10g/rdbms/admin/utlu102i.sql
Oracle Database 10.2 Upgrade Information Utility 10-02-2012 02:36:08
.
**********************************************************************
Database:
**********************************************************************
--> name: ORCL
--> version: 9.2.0.8.0
--> compatible: 9.2.0.0.0
.
**********************************************************************
Logfiles: [make adjustments in the current environment]
**********************************************************************
--> The existing log files are adequate. No changes are required.
.
**********************************************************************
Tablespaces: [make adjustments in the current environment]
**********************************************************************
--> SYSTEM tablespace is adequate for the upgrade.
.... minimum required size: 556 MB
.... AUTOEXTEND additional space required: 166 MB
--> TEMP tablespace is adequate for the upgrade.
.... minimum required size: 58 MB
.... AUTOEXTEND additional space required: 17 MB
--> CWMLITE tablespace is adequate for the upgrade.
.... minimum required size: 16 MB
--> DRSYS tablespace is adequate for the upgrade.
.... minimum required size: 27 MB
.... AUTOEXTEND additional space required: 7 MB
--> EXAMPLE tablespace is adequate for the upgrade.
.... minimum required size: 139 MB
.... AUTOEXTEND additional space required: 1 MB
--> ODM tablespace is adequate for the upgrade.
.... minimum required size: 10 MB
--> XDB tablespace is adequate for the upgrade.
.... minimum required size: 48 MB
.... AUTOEXTEND additional space required: 3 MB
.
**********************************************************************
Update Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
WARNING: --> "shared_pool_size" needs to be increased to at least 183314432
WARNING: --> "streams_pool_size" is not currently defined and needs a value of
at least 50331648
WARNING: --> "session_max_open_files" needs to be increased to at least 20
.
**********************************************************************
Deprecated Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
-- No deprecated parameters found. No changes are required.
.
**********************************************************************
Obsolete Parameters: [Update Oracle Database 10.2 init.ora or spfile]
**********************************************************************
--> "hash_join_enabled"
.
**********************************************************************
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
...The 'JServer JAVA Virtual Machine' JAccelerator (NCOMP)
...is required to be installed from the 10g Companion CD.
--> Oracle XDK for Java [upgrade] VALID
--> Oracle Java Packages [upgrade] VALID
--> Oracle Text [upgrade] VALID
--> Oracle XML Database [upgrade] VALID
--> Oracle Workspace Manager [upgrade] VALID
--> Oracle Data Mining [upgrade] VALID
--> OLAP Analytic Workspace [upgrade] LOADED
--> OLAP Catalog [upgrade] VALID
--> Oracle OLAP API [upgrade] LOADED
--> Oracle interMedia [upgrade] VALID
...The 'Oracle interMedia Image Accelerator' is
...required to be installed from the 10g Companion CD.
--> Spatial [upgrade] VALID
--> Oracle Ultra Search [upgrade] VALID
... To successfully upgrade Ultra Search, install it from
... the 10g Companion CD.
.
**********************************************************************
Miscellaneous Warnings
**********************************************************************
WARNING: --> Deprecated CONNECT role granted to some user/roles.
.... CONNECT role after upgrade has only CREATE SESSION privilege.
WARNING: --> Database contains stale optimizer statistics.
.... Refer to the 10g Upgrade Guide for instructions to update
.... statistics prior to upgrading the database.
.... Component Schemas with stale statistics:
.... SYS
.... CTXSYS
.... XDB
.... WMSYS
.... ODM
.... OLAPSYS
.... ORDSYS
.... MDSYS
.... WKSYS
.
**********************************************************************
SYSAUX Tablespace:
[Create tablespace in the Oracle Database 10.2 environment]
**********************************************************************
--> New "SYSAUX" tablespace
.... minimum required size for database upgrade: 500 MB
.
PL/SQL procedure successfully completed.
SQL> spool off
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
[oracle@oracle9i ~]$ ps -ef | grep tns
oracle 3200 2524 0 02:37 pts/4 00:00:00 grep tns
oracle 31695 1 0 01:26 ? 00:00:00 /home/db/oracle//10g/bin/tnslsnr LISTENER -inherit
oracle 31696 31695 0 01:26 ? 00:00:00 /home/db/oracle//10g/bin/tnslsnr LISTENER -inherit
oracle 31697 31696 0 01:26 ? 00:00:00 /home/db/oracle//10g/bin/tnslsnr LISTENER -inherit
oracle 31698 31696 0 01:26 ? 00:00:00 /home/db/oracle//10g/bin/tnslsnr LISTENER -inherit
[oracle@oracle9i ~]$ lsnrctl stop
LSNRCTL for Linux: Version 9.2.0.8.0 - Production on 02-OCT-2012 02:37:13
Copyright (c) 1991, 2006, Oracle Corporation. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
TNS-12618: TNS:versions are incompatible
[oracle@oracle9i ~]$ ps -ef | grep tns
oracle 3217 2524 0 02:37 pts/4 00:00:00 grep tns
oracle 31695 1 0 01:26 ? 00:00:00 /home/db/oracle//10g/bin/tnslsnr LISTENER -inherit
oracle 31696 31695 0 01:26 ? 00:00:00 /home/db/oracle//10g/bin/tnslsnr LISTENER -inherit
oracle 31697 31696 0 01:26 ? 00:00:00 /home/db/oracle//10g/bin/tnslsnr LISTENER -inherit
oracle 31698 31696 0 01:26 ? 00:00:00 /home/db/oracle//10g/bin/tnslsnr LISTENER -inherit
[oracle@oracle9i ~]$ kill -9 31695
[oracle@oracle9i ~]$ kill -9 31696
-bash: kill: (31696) - No such process
[oracle@oracle9i ~]$ ps -ef | grep tns
oracle 3312 2524 0 02:38 pts/4 00:00:00 grep tns
[oracle@oracle9i ~]$ cd $ORACLE_HOME/dbs
[oracle@oracle9i dbs]$ pwd
/opt/oracle/product/9.2/dbs
[oracle@oracle9i dbs]$ ls -l | grep orcl
-rw-r--r-- 1 oracle oinstall 980 Oct 2 02:34 initorcl.ora
-rwSr----- 1 oracle oinstall 1536 Sep 6 08:19 orapworcl
-rw-r----- 1 oracle oinstall 1613824 Oct 1 23:05 snapcf_orcl.f
-rw-r----- 1 oracle oinstall 2560 Sep 6 08:18 spfileorcl.ora
[oracle@oracle9i dbs]$ cp initorcl.ora /home/db/oracle/10g/dbs/
[oracle@oracle9i dbs]$ cp orapwor
orapwora9i orapworcl
[oracle@oracle9i dbs]$ cp orapworcl /home/db/oracle/10g/dbs/
[oracle@oracle9i dbs]$ cd ../
[oracle@oracle9i 9.2]$ pwd
/opt/oracle/product/9.2
[oracle@oracle9i 9.2]$ cd network
[oracle@oracle9i network]$ ls
admin agent doc install jlib lib log mesg snmp tools trace
[oracle@oracle9i network]$ cd admin
[oracle@oracle9i admin]$ pwd
/opt/oracle/product/9.2/network/admin
[oracle@oracle9i admin]$ ls
libnk59.def samples snmp_ro.ora tnsnames.ora
listener.ora shrept.lst sqlnet.ora
[oracle@oracle9i admin]$ #此步骤在上个实例升级过程中医拷贝,略掉
[oracle@oracle9i admin]$ cd /home/db/oracle/10g/dbs
[oracle@oracle9i dbs]$ ls
hc_ora9i.dat initora9i.ora lkORA9I spfileora9i.ora
initdw.ora initora9i.ora.92201203041 orapwora9i
init.ora initorcl.ora orapworcl
[oracle@oracle9i dbs]$ vi initorcl.ora
*.aq_tm_processes=1
*.background_dump_dest='/opt/oracle/admin/orcl/bdump'
*.compatible='9.2.0.0.0'
*.control_files='/opt/oracle/oradata/orcl/control01.ctl','/opt/oracle/oradata/orcl/control02.ctl','/opt/oracle/oradata/orcl/control03.ctl'
*.core_dump_dest='/opt/oracle/admin/orcl/cdump'
*.db_block_size=8192
*.db_cache_size=25165824
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='orcl'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)'
*.fast_start_mttr_target=300
*.hash_join_enabled=TRUE
*.instance_name='orcl'
*.java_pool_size=83886080
*.job_queue_processes=10
*.large_pool_size=8388608
*.open_cursors=300
*.pga_aggregate_target=25165824
*.processes=150
*.query_rewrite_enabled='FALSE'
*.remote_login_passwordfile='EXCLUSIVE'
*.shared_pool_size=83886080
*.sort_area_size=524288
*.star_transformation_enabled='FALSE'
*.timed_statistics=TRUE
*.undo_management='AUTO'
*.undo_retention=10800
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/opt/oracle/admin/orcl/udump'
*.shared_pool_size=184549376
"initorcl.ora" 33L, 1066C written
[oracle@oracle9i dbs]$ cd
[oracle@oracle9i ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
. ~/.bashrc
fi
# User specific environment and startup programs
# ORACLE 10
#export ORACLE_BASE=/home/db/oracle/
#export EDITOR=vim
#export ORACLE_HOME=$ORACLE_BASE/10g/
#export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/X11R6/lib
#export PATH=$ORACLE_HOME/bin:$PATH
# ORACLE 9I
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=/opt/oracle/product/9.2
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i #([1m~U版~M[1m~S[1m~Eㄥ[1m~@[1m~O~X[1m~G~O[1m~P
export ORACLE_TERM=xterm #(xterm绐~W[1m~Ofā寮~O vt100 缁~H绔[1m~C璇~U妯″[1m~O)
export LD_ASSUME_KERNEL=2.4.19 #[1m~^~\瀹~I瑁~E[1m~\ˋS3 涓~J姝ゅ[1m~D涓.4.1
export LD_ASSUME_KERNEL=2.4.19 #[1m~^~\瀹~I瑁~E[1m~\ˋS3 涓~J姝ゅ[1m~D涓.4.1
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export THREADS_FLAG=native
#export LD_LIBRARY_PATH=/opt/oracle/product/9.2/lib:$LD_LIBRARY_PATH
export LANG=en_US #(璁剧疆璇[1m~@[1m~K辨~V~G[1m~H~Vexport NLS_LANG='AMERCIAN')
PATH=$PATH:$HOME/bin
#export PATH
".bash_profile" 30L, 989C written
[oracle@oracle9i ~]$ more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
# ORACLE 10
export ORACLE_BASE=/home/db/oracle/
export EDITOR=vim
export ORACLE_HOME=$ORACLE_BASE/10g/
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/X11R6/lib
export PATH=$ORACLE_HOME/bin:$PATH
# ORACLE 9I
#export ORACLE_BASE=/opt/oracle
#export ORACLE_HOME=/opt/oracle/product/9.2
#export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
#export ORACLE_OWNER=oracle
export ORACLE_SID=ora9i #(鏁版嵁搴撳叏灞€鍙橀噺鍚
#export ORACLE_TERM=xterm #(xterm绐楀彛妯″紡 vt100 缁堢璋冭瘯妯″紡)
export LD_ASSUME_KERNEL=2.4.19 #鏋滃畨瑁呭湪AS3 涓婃澶勪负2.4.1
#export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
#export THREADS_FLAG=native
#export LD_LIBRARY_PATH=/opt/oracle/product/9.2/lib:$LD_LIBRARY_PATH
export LANG=en_US #(璁剧疆璇█鑻辨枃鎴杄xport NLS_LANG='AMERCIAN')
#PATH=$PATH:$HOME/bin
#export PATH
unset USERNAME
[oracle@oracle9i ~]$ source .bash_profile
|
|