select name from v$controlfile;NAME..."/>
溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

oracle10g asm復(fù)制控制文件

發(fā)布時間:2020-06-20 00:58:23 來源:網(wǎng)絡(luò) 閱讀:569 作者:199001040018 欄目:關(guān)系型數(shù)據(jù)庫

ASM下如何復(fù)制控制文件

環(huán)境:

OS:Red Hat Linux As 5

DB:11.2.0.1(ASM)

 

1.查看當(dāng)前控制文件

SQL> select name from v$controlfile;

NAME

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

+DATA/oracl/controlfile/current.260.794393131


2.查看參數(shù)文件

SQL> show parameters control_files;

NAME                                 TYPE        VALUE

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

control_files                        string      +DATA/oracl/controlfile/curren

                                                 t.260.794393131


3.關(guān)閉數(shù)據(jù)庫

shutdowm immediate

 

4.使用RMAN復(fù)制控制文件

[hxl.com::/]$rman target /

RMAN> startup nomount

Oracle instance started

Total System Global Area     338968576 bytes

Fixed Size                     1336400 bytes

Variable Size                276827056 bytes

Database Buffers              54525952 bytes

Redo Buffers                   6279168 bytes

RMAN> restore controlfile to '+RECDATA'  from '+DATA/oracl/controlfile/current.260.794393131';

Starting restore at 2012-09-21 06:53:56

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=23 device type=DISK

channel ORA_DISK_1: copied control file copy

Finished restore at 2012-09-21 06:54:01

 

5.使用ASMCMD查看控制文件的名字

ASMCMD> pwd

+recdata/oracl/CONTROLFILE

ASMCMD> ls

current.265.794560115


新建的控制文件如下:

+RECDATA/oracl/controlfile/current.265.794560115

 

6.修改spfile

[hxl.com::/]$echo $ORACLE_SID

[hxl.com::/]$sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 21 06:57:42 2012

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

SQL> connect / as sysdba

Connected.

SQL> alter system setcontrol_files='+DATA/oracl/controlfile/current.260.794393131','+RECDATA/oracl/controlfile/current.265.794560115' scope=spfile;

System altered.

SQL> shutdown immediate

ORA-01507: database not mounted


ORACLE instance shut down.

SQL> startup

ORACLE instance started.

Total System Global Area  338968576 bytes

Fixed Size                  1336400 bytes

Variable Size             276827056 bytes

Database Buffers           54525952 bytes

Redo Buffers                6279168 bytes

Database mounted.

Database opened.

 

7.查看修改后的參數(shù)

SQL> show parameters control_files;

NAME                                 TYPE        VALUE

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

control_files                        string      +DATA/oracl/controlfile/curren

                                                 t.260.794393131, +RECDATA/orac

                                                 l/controlfile/current.265.7945

                                                 60115

 

-- The End --


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI