Db_name error in "ORACLE" DG Build-up Library

Source: Internet
Author: User
Tags file copy reserved

Because the db_name is SBCD in the storehouse when the DG is built, it should be the PROD1 of the main library db_name

Therefore, when the " Main Library" executes the following Rman operation command, it will error the control file record database name is not the same as the actual copy of the database name

Rman> duplicate target database for standby from active database;

Starting Duplicate Db at 01-MAY-17
Using target database control file instead of recovery catalog
Allocated Channel:ora_aux_disk_1
Channel ora_aux_disk_1:sid=10 Device Type=disk

Contents of Memory Script:
{
Backup as Copy Reuse
TargetFile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwprod1 ' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapwsbdb ';
}
Executing Memory Script

Starting backup at 01-MAY-17
Allocated Channel:ora_disk_1
Channel ora_disk_1:sid=37 Device Type=disk
Finished backup at 01-MAY-17

contents of Memory Script:
{
Span style= "font-size:16px" > Backup as copy current controlfile for standby auxiliary format '/U01/APP/ORACLE/ORADATA/SBD B/control01.ctl ';
restore clone controlfile to '/u01/app/oracle/oradata/sbdb/control02.ctl ' from
'/u01/app/oracle/oradata/sbdb/control01.ctl ';
}
executing Memory Script

Starting backup at 01-MAY-17
Using channel Ora_disk_1
Channel ora_disk_1:starting datafile Copy
Copying standby control File
Output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_prod1.f tag=tag20170501t171334 RECID=2 STAMP= 942858814
Channel ora_disk_1:datafile copy complete, elapsed time:00:00:01
Finished backup at 01-MAY-17

Starting restore at 01-MAY-17
Using channel Ora_aux_disk_1

Channel ora_aux_disk_1:copied control File copy
Finished restore at 01-MAY-17

Contents of Memory Script:
{
SQL clone ' ALTER DATABASE mount standby database ';
}
Executing Memory Script

SQL Statement:alter Database mount standby Database
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE, STACK follows ===============
RMAN-00571: ===========================================================
rman-03002:failure of Duplicate Db command at 05/01/2017 17:13:40
rman-05501:aborting Duplication of target database
rman-03015:error occurred in stored script Memory script
rman-03009:failure of SQL command on Clone_default channel at 05/01/2017 17:13:40
rman-11003:failure during parse/execution of SQL statement:alter database mount standby Database
ora-01103:database name ' PROD1 ' in control file was not ' sbdb '

The control file is generated in the repository and is changed as follows:

1, change the db_name in the repository, close the database generated SPFile file, in the boot to Nomount state

[email protected] sbdb]$ cd/u01/app/oracle/product/11.2.0/db_1/dbs/
[email protected] dbs]$ VI initsbdb.ora
sbdb.__db_cache_size=419430400
sbdb.__java_pool_size=4194304
sbdb.__large_pool_size=4194304
sbdb.__oracle_base= '/u01/app/oracle ' #ORACLE_BASE set from environment
sbdb.__pga_aggregate_target=377487360
sbdb.__sga_target=566231040
sbdb.__shared_io_pool_size=0
sbdb.__shared_pool_size=130023424
sbdb.__streams_pool_size=0
*.audit_file_dest= '/u01/app/oracle/admin/sbdb/adump '
*.audit_trail= ' db '
*.compatible= ' 11.2.0.0.0 '
*.control_files= '/u01/app/oracle/oradata/sbdb/control01.ctl ', '/u01/app/oracle/oradata/sbdb/control02.ctl '
*.db_block_size=8192
*.db_domain= "
*. Db_file_name_convert= ' PROD1 ', ' sbdb '
*.db_name= ' PROD1 '
*. Db_unique_name= ' Sbdb '
*.diagnostic_dest= '/u01/app/oracle '
*.dispatchers= ' (protocol=tcp) (service=sbdbxdb) '
*. Fal_server= ' PROD1 '
"Initsbdb.ora" 40L, 1380C written
[email protected] dbs]$ Sqlplus/as sysdba

Sql*plus:release 11.2.0.3.0 Production on Mon 1 17:29:34 2017

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

sql> Shutdown Abort
ORACLE instance shut down.
Sql> create SPFile from Pfile;

File created.

Sql> Startup Nomount

ORACLE instance started.

Total System Global area 941600768 bytes
Fixed Size 1348860 bytes
Variable Size 515902212 bytes
Database buffers 419430400 bytes
Redo buffers 4919296 bytes

2. Delete the generated control file under the path of the control file

[Email protected] dbs]$ cd/u01/app/oracle/oradata/sbdb/
[[email protected] sbdb]$ ls
Control01.ctl Control02.ctl
[Email protected] sbdb]$ RM-RF *

3. Re-connect Rman to the main library and execute the Rman command again

Rman> quit

Recovery Manager complete.
[[email protected] admin]$ Rman target/auxiliary sys/[email protected]

Recovery manager:release 11.2.0.3.0-production on Mon 1 17:30:29 2017

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

Connected to target DATABASE:PROD1 (dbid=2082231315)
Connected to auxiliary database:prod1 (not mounted)

Rman> duplicate target database for standby from active database;

Starting Duplicate Db at 01-MAY-17
Using target database control file instead of recovery catalog
Allocated Channel:ora_aux_disk_1
Channel ora_aux_disk_1:sid=10 Device Type=disk

Contents of Memory Script:
{
Backup as Copy Reuse
TargetFile '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwprod1 ' auxiliary format
'/u01/app/oracle/product/11.2.0/db_1/dbs/orapwsbdb ';
}
Executing Memory Script

Starting backup at 01-MAY-17
Allocated Channel:ora_disk_1
Channel ora_disk_1:sid=157 Device Type=disk
Finished backup at 01-MAY-17

contents of Memory Script:
{
Span style= "font-size:16px" > Backup as copy current controlfile for standby auxiliary format '/U01/APP/ORACLE/ORADATA/SBD B/control01.ctl ';
restore clone controlfile to '/u01/app/oracle/oradata/sbdb/control02.ctl ' from
'/u01/app/oracle/oradata/sbdb/control01.ctl ';
}
executing Memory Script

Starting backup at 01-MAY-17
Using channel Ora_disk_1
Channel ora_disk_1:starting datafile Copy
Copying standby control File
Output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_prod1.f tag=tag20170501t173047 RECID=7 STAMP= 942859847
Channel ora_disk_1:datafile copy complete, elapsed time:00:00:01
Finished backup at 01-MAY-17

Starting restore at 01-MAY-17
Using channel Ora_aux_disk_1

Channel ora_aux_disk_1:copied control File copy
Finished restore at 01-MAY-17

Contents of Memory Script:
{
SQL clone ' ALTER DATABASE mount standby database ';
}
Executing Memory Script

SQL Statement:alter Database mount standby database

contents of Memory Script:
{
set newname for Tempfile 1 to
"/U01/APP/ORACLE/ORADATA/SBDB/TEMP01.DBF";
switch clone tempfile all;
set newname for datafile 1 to
"/U01/APP/ORACLE/ORADATA/SBDB/SYSTEM01.DBF";
set newname for datafile 2 to
"/U01/APP/ORACLE/ORADATA/SBDB/SYSAUX01.DBF";
set newname for DataFile 3 to
"/U01/APP/ORACLE/ORADATA/SBDB/UNDOTBS01.DBF";
set newname for datafile 4 to
"/U01/APP/ORACLE/ORADATA/SBDB/USERS01.DBF";
set newname for datafile 5 to
"/U01/APP/ORACLE/ORADATA/SBDB/EXAMPLE01.DBF";
Backup as Copy reuse
datafile 1 Auxiliary format
"/U01/APP/ORACLE/ORADATA/SBDB/SYSTEM01.DBF" DataFile
2 Auxiliary format
"/U01/APP/ORACLE/ORADATA/SBDB/SYSAUX01.DBF" DataFile
3 Auxiliary format
"/U01/APP/ORACLE/ORADATA/SBDB/UNDOTBS01.DBF" DataFile
4 Auxiliary format
"/U01/APP/ORACLE/ORADATA/SBDB/USERS01.DBF" DataFile
5 Auxiliary format
"/U01/APP/ORACLE/ORADATA/SBDB/EXAMPLE01.DBF";
SQL ' alter system archive log current ';
}
Executing Memory Script

Executing Command:set NEWNAME

Renamed Tempfile 1 to/u01/app/oracle/oradata/sbdb/temp01.dbf in control file

Executing Command:set NEWNAME

Executing Command:set NEWNAME

Executing Command:set NEWNAME

Executing Command:set NEWNAME

Executing Command:set NEWNAME

starting backup at 01-MAY-17
using channel Ora_disk_1
channel ora_disk_1:starting datafile copy
input datafile file number=00001 name=/u01/app/oracle/oradata/prod1/system01.dbf
output file name=/u01/app/oracle/oradata/sbdb/system01.dbf tag=tag20170501t173054
channel ora_disk_1:datafile copy complete, elapsed time:00:00:35
channel ora_disk_1:starting datafile copy
input datafile file number=00002 name=/u01/app/oracle/oradata/prod1/sysaux01.dbf
output file name=/u01/app/oracle/oradata/sbdb/sysaux01.dbf tag=tag20170501t173054
channel ora_disk_1:datafile copy complete, elapsed time:00:00:25
channel ora_disk_1:starting datafile copy
input datafile file number=00005 name=/u01/app/oracle/oradata/prod1/example01.dbf
output file name=/u01/app/oracle/oradata/sbdb/example01.dbf tag=tag20170501t173054
channel ora_disk_1:datafile copy complete, elapsed time:00:00:15
channel ora_disk_1:starting datafile copy
input datafile file number=00003 name=/u01/app/oracle/oradata/prod1/undotbs01.dbf
output file name=/u01/app/oracle/oradata/sbdb/undotbs01.dbf tag=tag20170501t173054
channel ora_disk_1:datafile copy complete, elapsed time:00:00:07
channel ora_disk_1:starting datafile copy
input datafile file number=00004 name=/u01/app/oracle/oradata/prod1/users01.dbf
output file name=/u01/app/oracle/oradata/sbdb/users01.dbf tag=tag20170501t173054
channel ora_disk_1:datafile copy complete, elapsed time:00:00:01
finished backup at 01-MAY-17

SQL Statement:alter System Archive log Current

Contents of Memory Script:
{
Switch clone datafile all;
}
Executing Memory Script

datafile 1 switched to datafile copy
input datafile copy recid=7 stamp=942859938 file name=/u01/app/oracle/oradata/sbdb/system01.dbf
datafile 2 switched to datafile copy
input datafile copy recid=8 stamp=942859938 file name=/u01/app/oracle/oradata/sbdb/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy recid=9 stamp=942859938 file name=/u01/app/oracle/oradata/sbdb/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=10 stamp=942859938 file name=/u01/app/oracle/oradata/sbdb/users01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=11 stamp=942859938 file name=/u01/app/oracle/oradata/sbdb/example01.dbf
finished Duplicate Db at 01-MAY-17

Db_name error in "ORACLE" DG Build-up Library

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.