先关闭数据库和监听
shutdown immediate
然后杀掉所有的oracle进程
ps -ef |grep oracle |grep -v grep |grep -v ef
kill -9 进程号
然后解压安装包,解压后是Disk1文件夹,将安装包改成用户为oracle用户所有,之前已是就不用改了.
chown -R oracle:oinstall 解压目录/Disk1
我在运行runInstaller时报子目录一个oui权限错误.
所以我把该软件包全部改成可执行.
chown -R 755 oracle:ointsll Disk1
然后确保oracle用户能打开图形界面,可用root用户运行
export DISPLAY=:0.0
xhost +
如果出现界面乱码现象,执行以下命令:
export LANG=en
然后以oracle用户执行 Disk1下的runInstaller 。
./runInstaller
出现图形界面后和windows上一样,选择oracle_home 只有一个数据库的话默认即可.
完了最后会让你以root用户运行一个root.sh的脚本, 该脚本会提示是否覆盖已存在的目录,默认为否即可.
安装后以upgrade方式打开数据库及监听.(否则报704错误)
以sys用户登录.检查system表空间情况.
select tablespace_name, sum(bytes)/(1024*1024) as free_space
from dba_free_space
where tablespace_name = 'SYSTEM'
group by tablespace_name;
如果该值小于50,则需要加大SYSTEM表空间;不建议使用resize方式而是使用添加文件的方式.
alter tablespace system add datafile '/opt/app/oradata/orcl/system02.dbf'size 300m;
4).检查shared_pool_size和java_pool_size大小,可适当增大(我们这里都设置成了100M,默认是0).否则更新脚本因pool空间不够而无法升级成功.
alter system set shared_pool_size=100M
alter system java_pool_size=100M
如果启用自动sga管理,保证sga_max_size和sga_target在400M以上.
5). 重启数据库, 开始运行升级脚本,执行catupgrd.sql是个很耗时的过程.内存足够的话运行时间半个小时左右,建议在运行期间关闭所有其它相关的运行程序,另外最好有200M的多余内存空间
shutdown immediate
STARTUP upgrade
spool /opt/app/patch.log(必须有读写权限)
@$ORACLE_HOME/rdbms/admin/catupgrd.sql
spool off
检查 /opt/app/patch.log是否有报错.如有必要可重新运行.
运行utlrp.sql以重新编译所有无效的PL/SQL程序包。
spool /opt/app/utlrp.log
@$ ORACLE_HOME /rdbms/admin/utlrp.sql
spool off;
检查执行情况.
utlrp.sql,catupgrd.sql,utlu102i.sql 执行没有按照先后顺序,也升级成功,不知道在后续的应该中是否有问题。
7).根据实际情况调整sga
shutdown immediate;
STARTUP;
8).查看升级结果
select * from v$version;
column comp_name format a30;
column version format a20
select comp_name, status, substr(version,1,10) as version from dba_registry;
我们的Oracle安装目录:opt/oracle/
附表:完全升级后各模块列表及其升级后的版本。
Component Version
Advanced Queuing (AQ) API 10.2.0.3
Advanced Queuing (AQ) API Demos 10.2.0.3
Advanced Replication 10.2.0.3
Agent Required Support Files 10.2.0.3
Assistant Common Files 10.2.0.3
Authentication and Encryption 10.2.0.3
Authentication and Encryption 32-bit 10.2.0.3
CSS Single-instance Common Files 10.2.0.3
Character Set Migration Utility 10.2.0.3
Clusterware 10.2.0.3
DBJAVA Required Support Files 10.2.0.3
Data Management Services Common Files 10.2.0.3
Data Mining Scoring Engine 10.2.0.3
Database Configuration Assistant 10.2.0.3
Database SQL Scripts 10.2.0.3
Database Upgrade Assistant 10.2.0.3
Database Verify Utility 10.2.0.3
Database Workspace Manager 10.2.0.1
Enterprise Manager Agent 10.2.0.3
Enterprise Manager Common Files 10.2.0.3
Enterprise Manager Repository 10.2.0.3
Enterprise Manager plugin Common Files 10.2.0.3
Export/Import 10.2.0.3
External Naming: NIS 10.2.0.3
Generic Connectivity Common Files 10.2.0.3
Generic Connectivity Using ODBC 10.2.0.3
HAS component of Oracle Clusterware install 10.2.0.3
Installation Common Files 10.2.0.3
iSQL*Plus 10.2.0.3
JAccelerator (NCOMP) 10.2.0.3
JDBC Common Files 10.2.0.3
JDBC/OCI Common Files 10.2.0.3
JDBC/OCI Common Files for Instant Client 10.2.0.3
LDAP Required Support Files 10.2.0.3
New Database ID 10.2.0.3
Object Type Translator 10.2.0.3
Oracle C++ Call Interface 10.2.0.3
Oracle C++ Call Interface Demos 10.2.0.3
Oracle C++ Call Interface for Instant Client 10.2.0.3
Oracle Call Interface (OCI) 10.2.0.3
Oracle Call Interface (OCI) Demos 10.2.0.3
Oracle Client 10.2.0.3
Oracle Client Required Support Files 10.2.0.3
Oracle Common Schema Demos 10.2.0.3
Oracle Connection Manager 10.2.0.3
Oracle Containers for Java 10.2.0.3
Oracle Containers for Java Demos 10.2.0.3
Oracle Text Knowledge Bases 10.2.0.3
Oracle Core Required Support Files 10.2.0.3
Oracle Data Mining 10.2.0.3
Oracle Data Mining Demos 10.2.0.3
Oracle Database 10G 10.2.0.3
Oracle Database 10G Companion Products 10.2.0.3
Oracle Database 10G Products 10.2.0.3
Oracle Database Demos 10.2.0.3
Oracle Database Utilities 10.2.0.3
Oracle Enterprise Manager Console DB 10.2.0.3
Oracle Globalization Support 10.2.0.3
Oracle Globalization Support Demos 10.2.0.3
Oracle Instant Client 10.2.0.3
Oracle Instant Client Required Support Files 10.2.0.3
Oracle interMedia Annotator 10.2.0.3
Oracle interMedia Client Demos 10.2.0.3
Oracle interMedia Common Files 10.2.0.3
Oracle interMedia Client Compatibility Files 10.2.0.3
Oracle interMedia Image 10.2.0.3
Oracle interMedia Image Accelerator 10.2.0.3
Oracle interMedia Java Advanced Imaging 10.2.0.3
Oracle interMedia Locator 10.2.0.3
Oracle Internet Directory Client 10.2.0.3
Oracle Internet Directory Client Common Files 10.2.0.3
Oracle Internet Directory Tools 10.2.0.3
Oracle JDBC Development Drivers 10.2.0.3
Oracle JDBC Development Drivers Demos 10.2.0.3
Oracle JDBC Development Drivers for Instant Client 10.2.0.3
Oracle JDBC Thin Driver for JDK 1.2 10.2.0.3
Oracle JDBC Thin Driver for JDK 1.4 10.2.0.3
Oracle JDBC Thin Driver for JDK 1.4 for Instant Client 10.2.0.3
Oracle JVM 10.2.0.3
Oracle Java Tools 10.2.0.3
Oracle Label Security 10.2.0.3
Oracle Label Security Demos 10.2.0.3
Oracle Locale Builder 10.2.0.3
Oracle Net 10.2.0.3
Oracle Net Configuration Assistant 10.2.0.3
Oracle Net Listener 10.2.0.3
Oracle Net Manager 10.2.0.3
Oracle Net Required Support Files 10.2.0.3
Oracle OLAP Analytic Workspace 10.2.0.3
Oracle OLAP API 10.2.0.3
Oracle OLAP Catalog 10.2.0.3
Oracle Partitioning 10.2.0.3
Oracle RAC Required Support Files 10.2.0.3
Oracle RAC Required Support Files-HAS 10.2.0.3
Oracle Real Application Clusters 10.2.0.3
Oracle SQLJ 10.2.0.3
Oracle Spatial 10.2.0.3
Oracle Spatial Demos 10.2.0.3
Oracle Starter Database 10.2.0.3
Oracle Text 10.2.0.3
Oracle Text Samples 10.2.0.3
Oracle Transparent Gateway for IBM DRDA 10.2.0.3
Oracle Ultra Search Middle-Tier 10.2.0.3
Oracle Ultra Search Server 10.2.0.3
Oracle Wallet Manager 10.2.0.3
Oracle XML Developer's Kit 10.2.0.3
Oracle XML SQL Utility 10.2.0.3
Oracle 10g Real Application Clusters Common Files 10.2.0.3
PL/SQL 10.2.0.3
PL/SQL Embedded Gateway 10.2.0.3
PL/SQL Required Support Files 10.2.0.3
Parser Generator Required Support Files 10.2.0.3
Precompiler Common Files 10.2.0.3
Precompiler Required Support Files 10.2.0.3
Pro*C/C++ 10.2.0.3
Pro*C/C++ Demos 10.2.0.3
Pro*COBOL (32-bit and 64-bit) 10.2.0.3
Pro*FORTRAN 10.2.0.3
Pro*FORTRAN Demos 10.2.0.3
RDBMS Required Support Files 10.2.0.3
Recovery Manager 10.2.0.3
Replication API 10.2.0.3
SQL*Loader 10.2.0.3
SQL*Plus 10.2.0.3
SQL*Plus Demos 10.2.0.3
SQL*Plus Required Support Files 10.2.0.3
SQLJ Runtime 10.2.0.3
SRVM component of Oracle Clusterware install 10.2.0.3
SSL Required Support Files 10.2.0.3
SSL Required Support Files for Instant Client 10.2.0.3
Sample Schema 10.2.0.3
Secure Socket Layer 10.2.0.3
Utilities Common Files 10.2.0.3
XDK Required Support Files 10.2.0.3
XML 10.2.0.3
XML Class Generator for C++ 10.2.0.3
XML Class Generator for Java 10.2.0.3
XML Parser for C 10.2.0.3
XML Parser for C++ 10.2.0.3
XML Parser for C++ Demos 10.2.0.3
XML Parser for Java 10.2.0.3
XML Transviewer Bean 10.2.0.3
XML Transx 10.2.0.3
XSQL Servlet 10.2.0.3
XSQL Servlet Demos 10.2.0.3
shutdown immediate
然后杀掉所有的oracle进程
ps -ef |grep oracle |grep -v grep |grep -v ef
kill -9 进程号
然后解压安装包,解压后是Disk1文件夹,将安装包改成用户为oracle用户所有,之前已是就不用改了.
chown -R oracle:oinstall 解压目录/Disk1
我在运行runInstaller时报子目录一个oui权限错误.
所以我把该软件包全部改成可执行.
chown -R 755 oracle:ointsll Disk1
然后确保oracle用户能打开图形界面,可用root用户运行
export DISPLAY=:0.0
xhost +
如果出现界面乱码现象,执行以下命令:
export LANG=en
然后以oracle用户执行 Disk1下的runInstaller 。
./runInstaller
出现图形界面后和windows上一样,选择oracle_home 只有一个数据库的话默认即可.
完了最后会让你以root用户运行一个root.sh的脚本, 该脚本会提示是否覆盖已存在的目录,默认为否即可.
安装后以upgrade方式打开数据库及监听.(否则报704错误)
以sys用户登录.检查system表空间情况.
select tablespace_name, sum(bytes)/(1024*1024) as free_space
from dba_free_space
where tablespace_name = 'SYSTEM'
group by tablespace_name;
如果该值小于50,则需要加大SYSTEM表空间;不建议使用resize方式而是使用添加文件的方式.
alter tablespace system add datafile '/opt/app/oradata/orcl/system02.dbf'size 300m;
4).检查shared_pool_size和java_pool_size大小,可适当增大(我们这里都设置成了100M,默认是0).否则更新脚本因pool空间不够而无法升级成功.
alter system set shared_pool_size=100M
alter system java_pool_size=100M
如果启用自动sga管理,保证sga_max_size和sga_target在400M以上.
5). 重启数据库, 开始运行升级脚本,执行catupgrd.sql是个很耗时的过程.内存足够的话运行时间半个小时左右,建议在运行期间关闭所有其它相关的运行程序,另外最好有200M的多余内存空间
shutdown immediate
STARTUP upgrade
spool /opt/app/patch.log(必须有读写权限)
@$ORACLE_HOME/rdbms/admin/catupgrd.sql
spool off
检查 /opt/app/patch.log是否有报错.如有必要可重新运行.
运行utlrp.sql以重新编译所有无效的PL/SQL程序包。
spool /opt/app/utlrp.log
@$ ORACLE_HOME /rdbms/admin/utlrp.sql
spool off;
检查执行情况.
utlrp.sql,catupgrd.sql,utlu102i.sql 执行没有按照先后顺序,也升级成功,不知道在后续的应该中是否有问题。
7).根据实际情况调整sga
shutdown immediate;
STARTUP;
8).查看升级结果
select * from v$version;
column comp_name format a30;
column version format a20
select comp_name, status, substr(version,1,10) as version from dba_registry;
我们的Oracle安装目录:opt/oracle/
附表:完全升级后各模块列表及其升级后的版本。
Component Version
Advanced Queuing (AQ) API 10.2.0.3
Advanced Queuing (AQ) API Demos 10.2.0.3
Advanced Replication 10.2.0.3
Agent Required Support Files 10.2.0.3
Assistant Common Files 10.2.0.3
Authentication and Encryption 10.2.0.3
Authentication and Encryption 32-bit 10.2.0.3
CSS Single-instance Common Files 10.2.0.3
Character Set Migration Utility 10.2.0.3
Clusterware 10.2.0.3
DBJAVA Required Support Files 10.2.0.3
Data Management Services Common Files 10.2.0.3
Data Mining Scoring Engine 10.2.0.3
Database Configuration Assistant 10.2.0.3
Database SQL Scripts 10.2.0.3
Database Upgrade Assistant 10.2.0.3
Database Verify Utility 10.2.0.3
Database Workspace Manager 10.2.0.1
Enterprise Manager Agent 10.2.0.3
Enterprise Manager Common Files 10.2.0.3
Enterprise Manager Repository 10.2.0.3
Enterprise Manager plugin Common Files 10.2.0.3
Export/Import 10.2.0.3
External Naming: NIS 10.2.0.3
Generic Connectivity Common Files 10.2.0.3
Generic Connectivity Using ODBC 10.2.0.3
HAS component of Oracle Clusterware install 10.2.0.3
Installation Common Files 10.2.0.3
iSQL*Plus 10.2.0.3
JAccelerator (NCOMP) 10.2.0.3
JDBC Common Files 10.2.0.3
JDBC/OCI Common Files 10.2.0.3
JDBC/OCI Common Files for Instant Client 10.2.0.3
LDAP Required Support Files 10.2.0.3
New Database ID 10.2.0.3
Object Type Translator 10.2.0.3
Oracle C++ Call Interface 10.2.0.3
Oracle C++ Call Interface Demos 10.2.0.3
Oracle C++ Call Interface for Instant Client 10.2.0.3
Oracle Call Interface (OCI) 10.2.0.3
Oracle Call Interface (OCI) Demos 10.2.0.3
Oracle Client 10.2.0.3
Oracle Client Required Support Files 10.2.0.3
Oracle Common Schema Demos 10.2.0.3
Oracle Connection Manager 10.2.0.3
Oracle Containers for Java 10.2.0.3
Oracle Containers for Java Demos 10.2.0.3
Oracle Text Knowledge Bases 10.2.0.3
Oracle Core Required Support Files 10.2.0.3
Oracle Data Mining 10.2.0.3
Oracle Data Mining Demos 10.2.0.3
Oracle Database 10G 10.2.0.3
Oracle Database 10G Companion Products 10.2.0.3
Oracle Database 10G Products 10.2.0.3
Oracle Database Demos 10.2.0.3
Oracle Database Utilities 10.2.0.3
Oracle Enterprise Manager Console DB 10.2.0.3
Oracle Globalization Support 10.2.0.3
Oracle Globalization Support Demos 10.2.0.3
Oracle Instant Client 10.2.0.3
Oracle Instant Client Required Support Files 10.2.0.3
Oracle interMedia Annotator 10.2.0.3
Oracle interMedia Client Demos 10.2.0.3
Oracle interMedia Common Files 10.2.0.3
Oracle interMedia Client Compatibility Files 10.2.0.3
Oracle interMedia Image 10.2.0.3
Oracle interMedia Image Accelerator 10.2.0.3
Oracle interMedia Java Advanced Imaging 10.2.0.3
Oracle interMedia Locator 10.2.0.3
Oracle Internet Directory Client 10.2.0.3
Oracle Internet Directory Client Common Files 10.2.0.3
Oracle Internet Directory Tools 10.2.0.3
Oracle JDBC Development Drivers 10.2.0.3
Oracle JDBC Development Drivers Demos 10.2.0.3
Oracle JDBC Development Drivers for Instant Client 10.2.0.3
Oracle JDBC Thin Driver for JDK 1.2 10.2.0.3
Oracle JDBC Thin Driver for JDK 1.4 10.2.0.3
Oracle JDBC Thin Driver for JDK 1.4 for Instant Client 10.2.0.3
Oracle JVM 10.2.0.3
Oracle Java Tools 10.2.0.3
Oracle Label Security 10.2.0.3
Oracle Label Security Demos 10.2.0.3
Oracle Locale Builder 10.2.0.3
Oracle Net 10.2.0.3
Oracle Net Configuration Assistant 10.2.0.3
Oracle Net Listener 10.2.0.3
Oracle Net Manager 10.2.0.3
Oracle Net Required Support Files 10.2.0.3
Oracle OLAP Analytic Workspace 10.2.0.3
Oracle OLAP API 10.2.0.3
Oracle OLAP Catalog 10.2.0.3
Oracle Partitioning 10.2.0.3
Oracle RAC Required Support Files 10.2.0.3
Oracle RAC Required Support Files-HAS 10.2.0.3
Oracle Real Application Clusters 10.2.0.3
Oracle SQLJ 10.2.0.3
Oracle Spatial 10.2.0.3
Oracle Spatial Demos 10.2.0.3
Oracle Starter Database 10.2.0.3
Oracle Text 10.2.0.3
Oracle Text Samples 10.2.0.3
Oracle Transparent Gateway for IBM DRDA 10.2.0.3
Oracle Ultra Search Middle-Tier 10.2.0.3
Oracle Ultra Search Server 10.2.0.3
Oracle Wallet Manager 10.2.0.3
Oracle XML Developer's Kit 10.2.0.3
Oracle XML SQL Utility 10.2.0.3
Oracle 10g Real Application Clusters Common Files 10.2.0.3
PL/SQL 10.2.0.3
PL/SQL Embedded Gateway 10.2.0.3
PL/SQL Required Support Files 10.2.0.3
Parser Generator Required Support Files 10.2.0.3
Precompiler Common Files 10.2.0.3
Precompiler Required Support Files 10.2.0.3
Pro*C/C++ 10.2.0.3
Pro*C/C++ Demos 10.2.0.3
Pro*COBOL (32-bit and 64-bit) 10.2.0.3
Pro*FORTRAN 10.2.0.3
Pro*FORTRAN Demos 10.2.0.3
RDBMS Required Support Files 10.2.0.3
Recovery Manager 10.2.0.3
Replication API 10.2.0.3
SQL*Loader 10.2.0.3
SQL*Plus 10.2.0.3
SQL*Plus Demos 10.2.0.3
SQL*Plus Required Support Files 10.2.0.3
SQLJ Runtime 10.2.0.3
SRVM component of Oracle Clusterware install 10.2.0.3
SSL Required Support Files 10.2.0.3
SSL Required Support Files for Instant Client 10.2.0.3
Sample Schema 10.2.0.3
Secure Socket Layer 10.2.0.3
Utilities Common Files 10.2.0.3
XDK Required Support Files 10.2.0.3
XML 10.2.0.3
XML Class Generator for C++ 10.2.0.3
XML Class Generator for Java 10.2.0.3
XML Parser for C 10.2.0.3
XML Parser for C++ 10.2.0.3
XML Parser for C++ Demos 10.2.0.3
XML Parser for Java 10.2.0.3
XML Transviewer Bean 10.2.0.3
XML Transx 10.2.0.3
XSQL Servlet 10.2.0.3
XSQL Servlet Demos 10.2.0.3