Linux 下Oracle 9i 升级-阿里云开发者社区

开发者社区> 余二五> 正文

Linux 下Oracle 9i 升级

简介:
+关注继续查看

Linux 下Oracle 9i 升级

 
环境: Redhat EL4.6 + Oracle 9.2.0.4

升级: Oracle 10.2.0.1

 

升级步骤:

 

1、首先安装Oracle 10g (只安装软件,不建库)

 

环境变量:

 

[oracle@ora9i ~]$ cat .bash_profile

# .bash_profile

 

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

 

# User specific environment and startup programs

unset USERNAME

export LD_ASSUME_KERNEL=2.4.19

export ORACLE_SID=ora9

export ORACLE_BASE=/u01/app/oracle

#export ORACLE_HOME=$ORACLE_BASE/product/9.2.0/db_1

export ORACLE_HOME=$ORACLE_BASE/ora10g

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

export TNS_ADMIN=$ORACLE_HOME/network/admin

#export NLS_LANG=AMERICAN_AMERICA.zhs16gbk

#export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data

export ORACLE_OWNER=oracle

export ORACLE_TERM=xterm

export PATH=$PATH:$ORACLE_HOME/bin

alias sqlplus='rlwrap sqlplus'

alias rman='rlwrap rman'

[oracle@ora9i ~]$

 

2、将Oracle 10g  9i 安装到不同的目录下

 

3、升级9i

[oracle@ora9i ~]$/u01/app/oracle/ora10g/bin/dbua

 

在oracle user的主目录下编辑.java.policy文件,内容:

[ora92@mddbstandby ~]$ cat .java.policy

grant {

permission java.security.AllPermission;

};

否则直接执行dbua的话,系统会提示下列错误:

Exception in thread "main" java.security.AccessControlException: access denied (java.lang.RuntimePermission setIO)

        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)

        at java.security.AccessController.checkPermission(AccessController.java:401)

        at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)

        at java.lang.System.checkIO(System.java:175)

        at java.lang.System.setErr(System.java:169)

        at oracle.ops.mgmt.trace.Trace.enableLogging(Trace.java:751)

        at oracle.ops.mgmt.trace.Trace.enableLogging(Trace.java:720)

        at oracle.sysman.assistants.dbma.backend.CompManager.setLoggings(CompManager.java:3390)

        at oracle.sysman.assistants.dbma.backend.CompManager.initialize(CompManager.java:297)

        at oracle.sysman.assistants.dbma.ui.UICompManager.initialize(UICompManager.java:141)

        at oracle.sysman.assistants.dbma.Dbma.execute(Dbma.java:90)

        at oracle.sysman.assistants.dbma.Dbma.statusMain(Dbma.java:177)

        at oracle.sysman.assistants.dbma.Dbma.main(Dbma.java:158)

 

如图所示:

 

4、升级结束:

[oracle@ora9i ~]$ env |grep HOME

HOME=/home/oracle

ORACLE_HOME=/u01/app/oracle/ora10g

[oracle@ora9i ~]$ sqlplus '/as sysdba'

 

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 30 12:35:14 2011

 

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

 

Connected to an idle instance.

 

SQL> exit

Disconnected

[oracle@ora9i ~]$ !sql

sqlplus '/as sysdba'

 

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 30 12:35:39 2011

 

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

 

Connected to an idle instance.

 

SQL> startup mount

ORACLE instance started.

 

Total System Global Area  373293056 bytes

Fixed Size                  1219496 bytes

Variable Size             335545432 bytes

Database Buffers           33554432 bytes

Redo Buffers                2973696 bytes

Database mounted.

SQL> alter database open;

 

Database altered.

 

SQL> select * from v$version;

 

BANNER

----------------------------------------------------------------

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod

PL/SQL Release 10.2.0.1.0 - Production

CORE    10.2.0.1.0      Production

TNS for Linux: Version 10.2.0.1.0 - Production

NLSRTL Version 10.2.0.1.0 - Production

 

 

SQL> r

  1* select file_id ,file_name ,tablespace_name,bytes/1024/1024 from dba_data_files

 

   FILE_ID FILE_NAME                                          TABLESPACE_NAME                BYTES/1024/1024

---------- -------------------------------------------------- ------------------------------ ---------------

        10 /u01/app/oracle/oradata/ora9/xdb01.dbf             XDB                                     48.125

         9 /u01/app/oracle/oradata/ora9/users01.dbf           USERS                                       25

         2 /u01/app/oracle/oradata/ora9/undotbs01.dbf         UNDOTBS1                                   740

         8 /u01/app/oracle/oradata/ora9/tools01.dbf           TOOLS                                       10

         1 /u01/app/oracle/oradata/ora9/system01.dbf          SYSTEM                                     600

         7 /u01/app/oracle/oradata/ora9/odm01.dbf             ODM                                         20

         6 /u01/app/oracle/oradata/ora9/indx01.dbf            INDX                                        25

         5 /u01/app/oracle/oradata/ora9/example01.dbf         EXAMPLE                                150.625

         4 /u01/app/oracle/oradata/ora9/drsys01.dbf           DRSYS                                       20

         3 /u01/app/oracle/oradata/ora9/cwmlite01.dbf         CWMLITE                                     20

        11 /u01/app/oracle/oradata/ora9/sysaux01.dbf          SYSAUX                                     300

 

11 rows selected.

 

SQL> show parameter sga

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

lock_sga                             boolean     FALSE

pre_page_sga                         boolean     FALSE

sga_max_size                         big integer 356M

sga_target                           big integer 0

SQL> alter system set sga_target=356m;

 

System altered.

 

SQL> show parameter sga

 

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

lock_sga                             boolean     FALSE

pre_page_sga                         boolean     FALSE

sga_max_size                         big integer 356M

sga_target                           big integer 356M

SQL>










本文转自 客居天涯 51CTO博客,原文链接:http://blog.51cto.com/tiany/732237,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
backtrack升级版Kali Linux
http://www.kali.org/downloads/
590 0
Aliyun Linux 2 ,php7.0升级到7.4版本
在Aliyun Linux 2 部署LNMP时,系统源为php5.4,官方文档安装的版本为php7.0,现需要升级到7.4版本可使用如下方法。
745 0
android 标准OTA升级流程
标准的OTA升级流程包括一下几个步骤: 1.Android设备首先会与OTA服务器进行交互,如果有更新会推送给客户。推送的信息常常会包含OTA更新包的下载地址和一些版本信息。 2.Update程序会将更新包下载到cache分区下,并提醒用户安装更新。
1802 0
+关注
20382
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
《2021云上架构与运维峰会演讲合集》
立即下载
《零基础CSS入门教程》
立即下载
《零基础HTML入门教程》
立即下载