Oracle Study之案例--在RAW上controlfile多元化

Oracle Study之案例--在RAW上controlfile多元化

系统环境:

操作系统: AIX 5300-08

数据库:   Oracle 10.2.0.1

在通过dbca建库后,有两个控制文件,再添加一个控制文件


1、查看controlfile信息

[[email protected]:/home/oracle]$sqlplus ‘/as sysdba‘
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 19 11:15:45 2014
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> show parameter control
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      /u01/app/oracle/oradata/prod/c
                                                 ontrol01.ctl, /u01/app/oracle/
                                                 oradata/prod/control02.ctl

2、添加新的控制文件

文件存储采用的是raw,建立符号链接文件,易于管理。

[[email protected]:/home/oracle]$ls -l /u01/app/oracle/oradata/prod
total 0
lrwxrwxrwx    1 oracle   oinstall         16 Nov 18 16:14 control01.ctl -> /dev/rcontrol1_1
lrwxrwxrwx    1 oracle   oinstall         16 Nov 18 16:14 control02.ctl -> /dev/rcontrol2_2
lrwxrwxrwx    1 oracle   oinstall         16 Nov 18 16:14 control03.ctl -> /dev/rcontrol3_3
lrwxrwxrwx    1 oracle   oinstall         13 Nov 18 16:14 example01.dbf -> /dev/rexample
lrwxrwxrwx    1 oracle   oinstall         11 Nov 18 16:14 index01.dbf -> /dev/rindex
lrwxrwxrwx    1 oracle   oinstall         13 Nov 18 16:14 log11.log -> /dev/rredo1_1
lrwxrwxrwx    1 oracle   oinstall         13 Nov 18 16:14 log12.log -> /dev/rredo1_2
lrwxrwxrwx    1 oracle   oinstall         12 Nov 18 16:14 spfile01 -> /dev/rspfile
lrwxrwxrwx    1 oracle   oinstall         12 Nov 18 16:14 sysaux01.dbf -> /dev/rsysaux
lrwxrwxrwx    1 oracle   oinstall         12 Nov 18 16:14 system01.dbf -> /dev/rsystem
lrwxrwxrwx    1 oracle   oinstall         10 Nov 18 16:14 temp01.dbf -> /dev/rtemp
lrwxrwxrwx    1 oracle   oinstall         14 Nov 18 16:14 undotbs01.dbf -> /dev/rundotbs1
lrwxrwxrwx    1 oracle   oinstall         11 Nov 18 16:14 users01.dbf -> /dev/rusers
SQL> show parameter spfile;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string      /u01/app/oracle/oradata/prod/s
                                                 pfile01
SQL> alter system set control_files=
  2  ‘/u01/app/oracle/oradata/prod/control01.ctl‘,‘/u01/app/oracle/oradata/prod/control02.ctl‘,‘/u01/app/oracle/oradata/prod/control03.ctl‘ scope=spfile;
System altered.

SQL> startup force nomount;
ORACLE instance started.
Total System Global Area  977272832 bytes
Fixed Size                  2025592 bytes
Variable Size             255854472 bytes
Database Buffers          713031680 bytes
Redo Buffers                6361088 bytes

SQL> show parameter control
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      /u01/app/oracle/oradata/prod/c
                                                 ontrol01.ctl, /u01/app/oracle/
                                                 oradata/prod/control02.ctl, /u
                                                 01/app/oracle/oradata/prod/con
                                                 trol03.ctl
                                                 
SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-00205: error in identifying control file, check alert log for more info
查看告警日志,无法识别control03.ctl文件!

3、复制RAW(controlfile)

SQL> shutdown abort;
ORACLE instance shut down.

[[email protected]:/home/oracle]$dd if=/dev/rcontrol1_1 of=/dev/rcontrol3_3 bs=1024k
64+0 records in
64+0 records out

4、重新启动数据库

[[email protected]:/home/oracle]$sqlplus ‘/as sysdba‘
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Nov 19 11:26:21 2014
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.
Total System Global Area  977272832 bytes
Fixed Size                  2025592 bytes
Variable Size             255854472 bytes
Database Buffers          713031680 bytes
Redo Buffers                6361088 bytes
Database mounted.

SQL> select name from v$controlfile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/prod/control01.ctl
/u01/app/oracle/oradata/prod/control02.ctl
/u01/app/oracle/oradata/prod/control03.ctl

SQL> alter database open;
Database altered.

@至此,contolfile多元化成功!

时间: 2024-08-29 23:20:35

Oracle Study之案例--在RAW上controlfile多元化的相关文章

Oracle Study之案例--RMAN备份配置参数

Oracle Study之案例--RMAN备份配置参数 1.PARALLELISM  我们还可以通过parallelism参数来指定同时"自动"创建多少个通道:RMAN > configure device type disk parallelism 3 ; 表示启动三个通道,可以加快备份恢复的速度. 案例分析: RMAN> show all; using target database control file instead of recovery catalog CO

Oracle Study之案例--异构平台传输表空间(Linux至AIX)

Oracle Study之案例--异构平台传输表空间(Linux至AIX) 系统架构: 可                   源    库               目标库 操作系统 Linux RH6    AIX 5.3-09 主机名 rh6(192.168.8.245) aix211(192.168.8.211) 数据版本 Oracle 11gR2 Oracle 11gR2 数据库名 prod orcl 表空间 test1 test1    可传输表空间概述 Oracle 的可传输表空

Oracle Study之案例--数据恢复神器Flashback(1)

Oracle Study之案例--数据恢复神器Flashback(1) Flashback: Flashback 技术是以Undo segment中的内容为基础的, 因此受限于UNDO_RETENTON参数.要使用flashback 的特性,必须启用自动撤销管理表空间. 在Oracle 11g里又出了一个新特性:Oracle Flashback Data Archive. FDA通过将变化数据另外存储到创建的闪回归档区(Flashback Archive)中,以和undo区别开来,这样就可以为闪

Oracle Study之案例--Oracle ASSM管理方式下的BITMAP

Oracle Study之案例--Oracle ASSM管理方式下的Bitmap      在基于此在LMT(Extent Local Management)下Oracle建议我们使用ASSM(Automatic Segment-Space Management),看看 Oracle doc是如何来解释ASSM的: This keyword tells Oracle that you want to use bitmaps to manage the free space with in seg

Oracle Study之案例--重建数据库控制文件

Oracle Study之案例--重建数据库控制文件 系统环境: 操作系统: Linux RH6 数据库:   Oracle 11gR2    案例分析:           数据库中所有的控制文件被意外破坏,非归档的库,在有trace备份的情况下,重建控制文件. 1.控制文件trace脚本 [[email protected] ~]$ cat crctr.sql  CREATE CONTROLFILE REUSE DATABASE "TEST3" NORESETLOGS  NOARC

Oracle Study之案例--AIX安装RAC错误之(rootpre)

Oracle Study之案例--AIX安装RAC错误之(rootpre) Oracle 10g for AIX 5309 rootpre执行时报以下错误: # ./rootpre.sh Required file ./pw-syscall32 is missing. 解决办法: 1.下载补丁号2896876,上传至服务端重新执行即可 2.以下方法没有尝试(仅作参考) Copy the "rootpre" sub-directory to a temporary location an

Oracle Study之案例--Oracle 11g DataGuard Snapshot Standby

Oracle Study之案例--Oracle 11g  DataGuard Snapshot Standby Oracle 11g的Data Guard不仅仅带给我们的是Active Data Guard实时查询特性,同时还带来了另外一个新特性,这便是Snapshot Standby数据库功能,此项功能可将备库置身于"可读写状态"用于不方便在生产环境主库中测试的内容,比如模拟上线测试等任务.当备库读写状态下任务完成后,可以非常轻松的完成Snapshot Standby数据库角色切换回

Oracle Study之案例--安装Oracle内核参数配置

Oracle Study之案例--安装Oracle内核参数配置 在Linux系统下,安装Oracle之前,除了检查操作系统的硬件和软件是否满足安装需要之外,一个重点就是修改内核参数,其中最主要的是和内存相关的参数设置. 案例分析: 查看当前系统的内核参数配置: [[email protected] ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.acce

Oracle Study之案例--Oracle 数据块地址(Block Address)

Oracle Study之案例--Oracle 数据块地址(Block Address) Oracle访问数据是以block为单位,本文简单介绍了如何通过Block Address在内存中获取所需要的block. DBA(data block address): A DBA is the address of an oracle data block for access purposes. RDBA (Tablespace relative database block address): R