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

Add a copy of the control file file on asm after Oracle 11g rac installation

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Oracle 11g rac uses ASM storage when building the library. However, rac only creates a control file on asm by default when building the library. If you want to add more control files,

You need to add it manually, many people may ignore this detail, but we still want to create a few more control files to increase the stability of the database.

Here are the specific steps:

1, before the operation to keep a control file and parameter files, in case of failure to recover.

Note: Modifications are made on only one database instance.

SQL> create pfile='/home/oracle/pfile0531.ora' from spfile;

File created.

SQL> alter database backup controlfile to '/home/oracle/cntrl_20180531.ctl';

Database altered.

SQL> col name for a50

SQL> select * from gv$controlfile;

INST_ID STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS

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

2 +DATA/crmdb/controlfile/current.282.873504505 NO 16384 1152

1 +DATA/crmdb/controlfile/current.282.873504505 NO 16384 1152

2. Modify the control file parameters in spfile

SQL> alter system set control_files='+DATA/crmdb/controlfile/current.256.977420629','+DATA','+DATA' scope=spfile sid='*';

System altered.

Close the database instance.

crmdb1:/home/oracle@db> srvctl stop database -d crmdb

Create a copy of the control file

crmdb1:/home/oracle@db> rman target/

Recovery Manager: Release 11.2.0.4.0 - Production on Friday 6 Feb 15:50:12 2015

Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to target database (not started)

RMAN> startup nomount

Oracle instance started

Total System Global Area 68412682240 bytes

Fixed Size 2263488 bytes

Variable Size 31675385408 bytes

Database Buffers 36507222016 bytes

Redo Buffers 227811328 bytes

RMAN> restore controlfile from '+DATA/crmdb/controlfile/current.256.977420629';

Starting restore at 06-Feb-15

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=4086 instance=crmdb device type=DISK

channel ORA_DISK_1: copied control file copy

output file name=+DATA/crmdb/controlfile/current.256.870194351

output file name=+DATA/crmdb/controlfile/current.426.870969063

output file name=+DATA/crmdb/controlfile/current.427.870969063

Finished restore at 06-Feb-15

RMAN> sql ' alter database mount';

sql statement: alter database mount

released channel: ORA_DISK_1

RMAN> sql ' alter database open';

sql statement: alter database open

5. Login database verification

SQL> select name from gv$controlfile;

NAME

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

+DATA/crmdb/controlfile/current.256.977420629

+DATA/crmdb/controlfile/current.276.977568423

+DATA/crmdb/controlfile/current.277.977568423

6. Modify the newly added control file parameters in spfile

SQL> alter system set control_files='+DATA/crmdb/controlfile/current.256.977420629','+DATA/crmdb/controlfile/current.276.977568423','+DATA/crmdb/controlfile/current.277.977568423' scope=spfile sid='*';

System altered.

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

7. Open the database for final validation

crmdb1:/home/oracle@db> srvctl start database -d crmdb

SQL> select * from gv$controlfile;

INST_ID STATUS NAME IS_ BLOCK_SIZE FILE_SIZE_BLKS

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

1 +DATA/crmdb/controlfile/current.256.977420629 NO 16384 1512

1 +DATA/crmdb/controlfile/current.276.977568423 NO 16384 1512

1 +DATA/crmdb/controlfile/current.277.977568423 NO 16384 1512

2 +DATA/crmdb/controlfile/current.256.977420629 NO 16384 1512

2 +DATA/crmdb/controlfile/current.276.977568423 NO 16384 1512

2 +DATA/crmdb/controlfile/current.277.977568423 NO 16384 1512

6 rows selected.

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