oracle 10g 升级

本文详细介绍了Oracle 10g数据库从版本2升级的过程,包括查看当前版本、停用数据库和服务、关闭监听及ASM实例。在升级过程中需要注意停用Oracle Enterprise Manager Console、设置Grid Control的计划维护以及确保正确关闭ASM实例和Oracle Cluster Synchronization Services。在升级中可能遇到图形界面启动问题和先决条件检查问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看原来的版本号
SQL> select version from v$timezone_file;
   VERSION
----------
         2

SQL> select version from v$instance;

VERSION
-----------------
10.2.0.1.0

停用数据库和所有服务,监听,如下
8.8.1 Stopping All Processes for a Single Instance Installation

Shut down the following Oracle Database 10g processes in the order specified before installing the patch set:

  1. Shut down all processes in the Oracle home that might be accessing a database; for example, Oracle Enterprise Manager Database Control:

    $ emctl stop dbconsole
    $ lsnrctl stop
    

    Note:

    Before you shut down all processes that are monitored by Oracle Enterprise Manager Grid Control, set a blackout in Grid Control for the processes that you intend to shut down. This is necessary so that the availability records for these processes indicate that the shutdown was planned downtime rather than an unplanned system outage.
  2. Shut down all database instances running in the Oracle home directory, where you need to install the patch set.

  3. Shut down all listeners running in the Oracle home directory, where you need to install the patch set.

  4. If there is an Automatic Storage Management instance present, then enter the following command to set the values for the environment variables$ORACLE_HOME and$ORACLE_SID:

    • Bourne, Bash, or Korn shell:

      $ export ORACLE_SID=+ASM
      $ export ORACLE_HOME=ASM_HOME
      
    • C shell:

      % setenv ORACLE_SID +ASM
      % setenv ORACLE_HOME ASM_HOME
      

    Enter the following command to shut down the Automatic Storage Management instance:

    cd $ORACLE_HOME/bin
    $ ./sqlplus /NOLOG
    SQL> CONNECT SYS AS SYSDBA
    Enter password:SYS_password
    SQL> SHUTDOWN IMMEDIATE
    
  5. For Automatic Storage Management, as the root user enter the following command to shut down the Oracle Cluster Synchronization Services daemon:

    # $ORACLE_HOME/bin/crsctl stop crs
 修改升级包的用户和组
[root@localhost oracle]# chown -R oracle:oinstall p8202632_10205_LINUX.zip
进入oracle用户解压
[oracle@localhost ~]$ unzip p8202632_10205_LINUX.zip
执行
[oracle@localhost Disk1]$ ./runInstaller
进入图形界面进行升级
 
 
 
附录:官方说明

9.1 Installing the Oracle Database 10g Patch Set Interactively

Note:

If you attempt to install this patch set in an Oracle home directory that does not contain an Oracle10 g release 10.2.0.1 or higher installation, Oracle Universal Installer displays a warning dialog with the following error:
OUI-10091: There are no patches that need to be applied from the patch set Oracle Database 10g Release 2 Patch Set 4 10.2.0.5

Oracle Universal Installer does not allow the installation to proceed. Click OK, then click Cancel to end the installation.

To install the Oracle Database 10g patch set interactively:

  1. Log in as the oracle user.

  2. If you are not installing the software on the local computer, then run the following command on remote machine:

    • Bourne, Bash, or Korn shell:

      $ export DISPLAY=localhost:0.0
      
    • C shell:

      % setenv DISPLAY local_host:0.0
      

    In this example, local_host is the host name or IP address of the computer that you want to use to display Oracle Universal Installer.

    Now to enable X applications, run the following command on the machine that you want to use to display Oracle Universal Installer:

    $ xhost + [fully_qualified_remote_host_name]
    
  3. Enter the following commands to start Oracle Universal Installer, where patchset_directory is the directory where you unpacked the patch set software:

    % cd patchset_directory/Disk1
    % ./runInstaller
    
  4. On the Welcome screen, click Next.

  5. On the Specify Home Details screen, select the name of the Oracle home that you want to update, or select the Path that you want to update from the list, then click Next.

  6. Enter your e-mail address and password for your My Oracle Support account to be informed of security issues, then click Next.

    Note:

    The registration and configuration can also be done manually after patch set installation.

    The OCM registration page appears only while applying 10.2.0.5 patch over existing Database instances alone.

  7. If you are installing the patch set on an Oracle RAC cluster, click Next when the Selected Nodes screen appears.

  8. On the Product-specific Prerequisite Checks screen, correct any reported errors, and click Next.

  9. On the Summary screen, click Install.

    This screen lists all of the patches available for installation.

  10. When prompted, run the $ORACLE_HOME/root.sh script as the root user. If you are applying the patch set to an Oracle RAC installation, then run the root.sh script on each node of the cluster.

  11. On the End of Installation screen, click Exit, then click Yes to exit from Oracle Universal Installer.

Note:

If you are applying this patch set to an Oracle Clusterware installation, then complete all of the steps displayed on the Oracle Universal Installer screen.

The Oracle Clusterware installation instructions displayed on the Oracle Universal Installer screen are also available in the CRS_home/install/readme.txt file.

When applying this patch set on an Oracle Clusterware home, Oracle Universal Installer prompts you to run the root102.sh script from $ORACLE_HOME/install. You must run this script as the root user on all nodes.

 
注意,升级的过程中要关闭sqlplus,否则在安装的过程中会报错!如在安装的过程中弹出错误对话框,检查sqlplus是否关闭!
 
完成升级安装后执行如下的步骤:
After you install the patch set, you must perform the following steps on every database associated with the upgraded Oracle home:

Note:

If you do not run the catupgrd.sql script as described in this section and you start up a database for normal operation, then ORA-01092: ORACLE instance terminated. Disconnection forced errors will occur and the error ORA-39700: database must be opened with UPGRADE option will be in the alert log.
 
  1. Log in as the Oracle software owner user.

  2. For Oracle RAC installations, start listener on each node of the cluster as follows:

    $ srvctl start listener -n node
    
  3. If you are using Automatic Storage Management, start the Automatic Storage Management instance.

  4. For single-instance installations, start the listener as follows:

    $ lsnrctl start
    
  5. For single-instance installations, use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:

    $ sqlplus /nolog 
    SQL> CONNECT SYS AS SYSDBA
    Enter password:SYS_password
    

    Users of single-instance implementations should now bypass steps that apply to Oracle RAC installations.

  6. For Oracle RAC installations:

    1. Use SQL*Plus to log in to the database as the SYS user with SYSDBA privileges:

      $ sqlplus /nolog 
      SQL> CONNECT SYS AS SYSDBA
      Enter password: SYS_password
      SQL> STARTUP NOMOUNT
      
    2. Set the CLUSTER_DATABASE initialization parameter to FALSE:

      SQL> ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=spfile; 
      
    3. Shut down the database:

      SQL> SHUTDOWN
      
  7. Enter the following SQL*Plus commands:

    SQL> STARTUP UPGRADE
    SQL> SPOOL patch.log
    SQL> @?/rdbms/admin/catupgrd.sql
    SQL> SPOOL OFF
    
  8. Review the patch.log file for errors and inspect the list of components that is displayed at the end of catupgrd.sql script.

    This list provides the version and status of each SERVER component in the database.

  9. If necessary, rerun the catupgrd.sql script after correcting any problems.

  10. Restart the database:

    SQL> SHUTDOWN IMMEDIATE
    SQL> STARTUP
    
  11. Run the utlrp.sql script to recompile all invalid PL/SQL packages now instead of when the packages are accessed for the first time. This step is optional but recommended.

    SQL> @?/rdbms/admin/utlrp.sql
    

    Note:

    When the 10.2.0.5 patch set is applied to an Oracle10 g Standard Edition database, there may be 54 invalid objects after the utlrp.sql script runs. These objects belong to the unsupported components and do not affect the database operation.

    Ignore any messages indicating that the database contains invalid recycle bin objects similar to the following:

    BIN$4lzljWIt9gfgMFeM2hVSoA==$0
    

    This issue is tracked with Oracle bug 9386364.

  12. Run the following command to check the status of all the components after the upgrade:

    SQL> SELECT COMP_NAME, VERSION, STATUS FROM SYS.DBA_REGISTRY;
    

    In the output of the preceding command, the status of all the components should be VALID for a successful upgrade.

  13. If you are using the Oracle Recovery Manager catalog, enter the following command:

    $ rman catalog username/password@alias 
    RMAN> UPGRADE CATALOG;
    
    1. For Oracle RAC installations:
      1. Set the CLUSTER_DATABASE initialization parameter to TRUE:
      SQL> ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=spfile; 
      
    2. Restart the database:

      SQL> SHUTDOWN IMMEDIATE
      SQL> STARTUP
      
    3. Start any database services that you want to use:

      $ srvctl start service -d db_name -s service_name
      
      1. To configure and secure Enterprise Manager follow these steps:
      2. Ensure the database and Listener are operational.
        1. In the case of a single instance, execute
        emca -upgrade db
        
      • In the case of Oracle RAC, execute

        emca -upgrade db -cluster
        
      1. Note:
      2. If you are upgrading a database where Oracle Database Control is configured in non-secure mode, then Oracle Database Control will run in secure mode after upgrade.

完成升级如下:

 

升级过程中遇到的问题:

1,启动不了图形界面,修改了/etc/redhat-release中的版本也不行

详见这里

./runinstaller -ignoreSysPrereqs

使用ignoreSysPrereqs标记会跳过对先决条件的检查

2.出现如下错误

解决办法:就如Error中所说,关闭sqlplus,监听,服务即可
内容概要:本文从关键概念、核心技巧、应用场景、代码案例分析及未来发展趋势五个维度探讨了Python编程语言的进阶之路。关键概念涵盖装饰器、生成器、上下文管理器、元类和异步编程,这些概念有助于开发者突破基础认知的核心壁垒。核心技巧方面,介绍了内存优化、性能加速、代码复用和异步处理的方法,例如使用生成器处理大数据流、numba库加速计算密集型任务等。应用场景展示了Python在大数据处理、Web开发、人工智能和自动化运维等多个领域的广泛运用,特别是在FastAPI框架中构建异步API服务的实战案例,详细分析了装饰器日志记录、异步数据库查询和性能优化技巧。最后展望了Python的未来发展趋势,包括异步编程的普及、类型提示的强化、AI框架的深度整合以及多语言协同。 适合人群:已经掌握Python基础语法,希望进一步提升编程技能的开发者,特别是有意向从事数据科学、Web开发或AI相关工作的技术人员。 使用场景及目标:①掌握Python进阶概念和技术,如装饰器、生成器、异步编程等,提升代码质量和效率;②学习如何在实际项目中应用这些技术,如通过FastAPI构建高效的异步API服务;③了解Python在未来编程领域的潜在发展方向,为职业规划提供参考。 阅读建议:本文不仅提供了理论知识,还包含了丰富的实战案例,建议读者在学习过程中结合实际项目进行练习,特别是尝试构建自己的异步API服务,并通过调试代码加深理解。同时关注Python社区的发展动态,及时掌握最新的技术和工具。
内容概要:本文档《Rust系统编程实战》详细介绍了Rust在系统编程领域的应用,强调了其内存安全、零成本抽象和高性能的特点。文档分为三个主要部分:核心实战方向、典型项目案例和技术关键点。在核心实战方向中,重点讲解了unsafe编程、FFI(外部函数接口)和底层API调用,涉及操作系统组件开发、网络编程、设备驱动开发、系统工具开发和嵌入式开发等多个领域,并列出了每个方向所需的技术栈和前置知识。典型项目案例部分以Linux字符设备驱动为例,详细描述了从环境搭建到核心代码实现的具体步骤,包括使用bindgen生成Linux内核API的Rust绑定,定义设备结构体,以及实现驱动核心函数。 适合人群:对系统编程有兴趣并有一定编程基础的开发者,尤其是那些希望深入了解操作系统底层机制、网络协议栈或嵌入式系统的工程师。 使用场景及目标:①掌握Rust在不同系统编程场景下的应用,如操作系统组件开发、网络编程、设备驱动开发等;②通过实际项目(如Linux字符设备驱动)的学习,理解Rust与操作系统内核的交互逻辑;③提高对unsafe编程、FFI和底层API调用的理解和运用能力。 阅读建议:由于文档内容较为深入且涉及多个复杂概念,建议读者在学习过程中结合实际操作进行练习,特别是在尝试实现Linux字符设备驱动时,务必按照文档提供的步骤逐步进行,并多加调试和测试。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值