Solved

Operations performed for Oracle by Commvault

  • 9 November 2021
  • 9 replies
  • 141 views

Userlevel 3
Badge +8

Hello Guys, 

 

At the beginning, I would like to say that I wanted to escalate this case to the Commvault suppot, but I do not know if it will not be closed due to the specific behavior of the Commvault system and possible problems with the Oracle database itself.

 

Jobs performed from CommCell Console finish without errors, but errors appear at the Oracle database level. Oracle 11.2.0.4 database on a linux server (Oracle Linux Enterprise 7.9) in the Oracle Grid 18.3 Standalone environment.

 

There were two problems:

 

  1. Restore an Oracle backup to disk (image_001.png)

The restore job is running correctly and Commvault saves files to the location specified during the job configuration. The next step is the duplication of the database (contained in the copy on disk) to the target database using the RMAN script, ended with an error (status failed).

 


 

oracle@rptest(rpklon)$rman auxiliary /

Recovery Manager: Release 11.2.0.4.0 - Production on Fri Oct 29 14:02:38 2021

Copyright© 1982, 2011, Oracle and/or its affiliates. All rights reserved.

connected to auxiliary database: RPKLON (not mounted)

RMAN> @/home/oracle/scripts/dupl_rpklon.rman

RMAN> run {
2> allocate auxiliary channel ch1 device type 'sbt_tape' PARMS="SBT_LIBRARY=/opt/commvault/Base/libobk.so,ENV=(BACKUP_DIR=/u01/app/oracle/bkp,CV_media=FILE)";
3> set controlfile autobackup format for device type disk to '/u01/app/oracle/bkp/%F';
4> duplicate database to rpklon backup location '/u01/app/oracle/bkp' pfile '/u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/initrpklon.ora'
5> nofilenamecheck
6> ;
7> }
allocated channel: ch1
channel ch1: SIDa5 device type=SBT_TAPE
channel ch1: CommVault Systems for Oracle: Version 11.0.0(BUILD80)

executing command: SET CONTROLFILE AUTOBACKUP FORMAT

Starting Duplicate Db at 29-OCT-21

contents of Memory Script:
{
sql clone "create spfile from memory";
}
executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:
{
shutdown clone immediate;
startup clone nomount;
}
executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 8551575552 bytes

Fixed Size 2270360 bytes
Variable Size 1442843496 bytes
Database Buffers 7096762368 bytes
Redo Buffers 9699328 bytes
allocated channel: ch1
channel ch1: SIDF2 device type=SBT_TAPE
channel ch1: CommVault Systems for Oracle: Version 11.0.0(BUILD80)

contents of Memory Script:
{
sql clone "alter system set control_files ''+DATA/rpklon/controlfile/current.471.1087221811'', ''+FRA/rpklon/controlfile/current.996.1087221811'' comment''Set by RMAN'' scope=spfile";
sql clone "alter system set db_name ''RPPROD'' comment''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set db_unique_name ''RPKLON'' comment''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfile from '/u01/app/oracle/bkp/c-3252878235-20211029-05';
alter clone database mount;
}
executing Memory Script

sql statement: alter system set control_files = ''+DATA/rpklon/controlfile/current.471.1087221811'', ''+FRA/rpklon/controlfile/current.996.1087221811'' comment= ''Set by RMAN'' scope=spfile

sql statement: alter system set db_name = ''RPPROD'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set db_unique_name = ''RPKLON'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area 8551575552 bytes

Fixed Size 2270360 bytes
Variable Size 1442843496 bytes
Database Buffers 7096762368 bytes
Redo Buffers 9699328 bytes
allocated channel: ch1
channel ch1: SIDF2 device type=SBT_TAPE
channel ch1: CommVault Systems for Oracle: Version 11.0.0(BUILD80)

Starting restore at 29-OCT-21

restarting auxiliary database without server parameter file
Oracle instance started

Total System Global Area 8551575552 bytes

Fixed Size 2270360 bytes
Variable Size 1426066280 bytes
Database Buffers 7113539584 bytes
Redo Buffers 9699328 bytes
RMAN-00571: ======================================================RMAN-00569: =========== ERROR MESSAGE STACK FOLLOWS ==========RMAN-00571: ======================================================RMAN-03002: failure of Duplicate Db command at 10/29/2021 14:03:46
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece

RMAN> end-of-file

RMAN>


  1. Oracle database duplication from the active database. (image_002.png)

The Commvault job ends with success, but there is an error in the duplicate Oracle database, the spfile initialization file for the duplicate database is not created and after the database is opened after the task is completed by Commvault, an error appears in the database log:


“ORA-01565: Unable to open Spfile /u01/app/oracle/product/11.2.0.4/dbhome_1/dbs/spfiledevawe2.ora”

 

If you know the answer what could be the cause of the described problem, please help, if not, let me know if the case escalates if it will be closed due to potential problems on the side of the Oracle database.

 

Thanks&Regards,
Kamil

icon

Best answer by Mahender Reddy 15 November 2021, 18:54

View original

9 replies

Userlevel 7
Badge +23

Hi @Kamil , thanks for the post!

I found this solution for a case that should apply to you:

Source backups are not configured to Auto backup control file, due to this, you can't restore a control file with default options.

In this situation, you can still restore the control file but with a specific backup piece name.

To find out which backup piece on that backup has the control file backup, we need to query the commserve database with the process mentioned in below link:

http://documentation.commvault.com/commvault/v11/article?p=20356.htm

To find this out, you’ll need to run below command:

getbackupList -jobid <jobID> -outfile C:\temp\<job ID>.txt -dbjob Where <job ID> is the backup job number for your timeframe.

Userlevel 3
Badge +8

Hello,

 

Thanks @Mike Struening  for the quick reply.

 

I have forwarded your suggestion to the client, I am still waiting for an update on his part. When I get the information, I will let you know here.

 

Regards,
Kamil

Userlevel 3
Badge +8

Hi @Mike Struening,

 

I was informed by a Client that the autobackup of the control file is enabled on all sub-clients. In the attachment I am sending the file of logs / operations when creating a copy of the full Oracle database (data files and archivelogi), restoring the copy to disk (Restore to Disk) and an attempt to duplicate RMAN from the copy (duplicate ... backup location ...) which ended with an error.

 

If there are no ideas how to fix it, I will escalate this thread to Commvault support.

 

Regards,
Kamil

Userlevel 7
Badge +23

Hi @Kamil 

I talked to one of our support experts who will be replying with some information.

edit I deleted out the part about creating a case; was a bit premature.

Userlevel 2
Badge +4

Hi @Kamil,  


Oracle won't support reading SBT backup pieces from a disk location for duplicate database restore procedure.

The disk restore pieces work for regular in-place restore scripts or out of place restores with same database/instance on the destination.


If you have to strictly perform duplicate database restore, you need to read the pieces directly from cv media.

Documentation links:- 
Command line-  https://documentation.commvault.com/commvault/v11_sp20/article?p=20132.htm

GUI:-  https://documentation.commvault.com/commvault/v11_sp20/article?p=20477.htm

 

--
Mahender


 

Userlevel 3
Badge +8

Hello,

 

Thank you @Mike Struening  and @Mahender Reddy for the information. I will forward to the customer, if there are any more questions, I will come back to you.

 

Thanks&Regards,
Kamil

Userlevel 7
Badge +23

Looking forward to a positive response!

Userlevel 3
Badge +8

Hi @Mike Struening and @Mahender Reddy 

 

It turned out that your suggestions solved the problem. I am very grateful to you for this.
I will mark the best answer :)

 

Thanks&Regards,
Kamil

Userlevel 7
Badge +23

Glad to hear it, @Kamil !

Reply