分类: Oracle
2010-11-19 17:19:29
单实例环境
Vmware Server 1.0.6 +CentOS 5.2+Oracle 10g
1,停进程
2,安装补丁
3,升级数据库
1>停止所有Oracle相关进程
[oracle@node2 Disk1]$ emctl stop dbconsole
[oracle@node2 Disk1]$ lsnrctl stop
SQL>shutdown immediate
2>安装补丁步骤
升级至10.2.0.4
下载包:p6810189_10204_Linux-x86
使用DBUA升级。
[oracle@linux Disk1~]$ ./runInstaller
安装图像界面。
运行root.sh 脚本
[root@node2 db]# sh root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/10.2.0/db
Enter the full pathname of the local bin directory: [/usr/local/bin]: y
The file "dbhome" already exists in y. Overwrite it? (y/n)
[n]: y
Copying dbhome to y ...
The file "oraenv" already exists in y. Overwrite it? (y/n)
[n]: y
Copying oraenv to y ...
The file "coraenv" already exists in y. Overwrite it? (y/n)
[n]: y
Copying coraenv to y ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
3>升级数据库。
方式一:DBUA
[oracle@node2 ~]$ dbua
数据库未在图中列出,修改/etc/oratab 添加SID
注意:选择"升级完成后编译无效对象"的选项
关闭归档选项
数据库未备份,可以选择做备份(建议升级前做冷备份)
方式二:手工(推荐)
SQL>startup upgrade
SQL>spool /u01/upgrade.log
SQL>@?/rdbms/admin/catupgrd.sql //时间较长。
Ok
select count(1) from dba_objects where status='INVALID' 是否存在有无效的对象,有
则运行utlrp.sql 编译无效的对象
重启数据库
SQL>shutdown immediate
SQL>startup
SQL> @?/rdbms/admin/utlrp.sql
检查表空间,用户,用户对象等信息。
备份数据库
chinaunix网友2011-06-05 02:06:09
大连法律咨询在线 http://www.fabowang.com 大连律师在线咨询 http://www.fabowang.com 大连法律顾问网 http://www.fabowang.com 大连律师咨询 http://www.fabowang.com
chinaunix网友2010-11-20 16:51:43
很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com