Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle10g asm replication control file

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

How to copy control files under ASM

Environment:

OS:Red Hat Linux As 5

DB:11.2.0.1 (ASM)

1. View the current control file

SQL > select name from v$controlfile

NAME

+ DATA/oracl/controlfile/current.260.794393131

two。 View parameter file

SQL > show parameters control_files

NAME TYPE VALUE

-

Control_files string + DATA/oracl/controlfile/curren

T.260.794393131

3. Shut down the database

Shutdowm immediate

4. Use RMAN to copy control files

[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. Use ASMCMD to view the name of the control file

ASMCMD > pwd

+ recdata/oracl/CONTROLFILE

ASMCMD > ls

Current.265.794560115

The new control file is as follows:

+ RECDATA/oracl/controlfile/current.265.794560115

6. Modify 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. View the modified parameters

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--

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report