Tag: Oracle

Simpana 10 – Specifying the media parameters for RMAN command line operations – Example

An recent addition to Simpana 10 Oracle iDA over Simpana 9 was the ability to specify Media Parameters for RMAN Command Line Operations, which wasn’t possible in Simpana 9.

Below is an example on its use, and the documentation links from Commvault are 1, 2 an 3.

The client in this example is “jwora1” running Windows 2008 R2 x64 and an Oracle 11gR2 64bit release. Simpana 10 with a SP4 is installed on client and Commserve – “jwcs”.

RMAN Script:

run {
allocate channel ch1 type 'sbt_tape' PARMS="BLKSIZE=262144,ENV=(CVOraSbtParams=C:p.txt,CvClientName=jwora1,CvInstanceName=Instance001)" trace 2;
backup current controlfile;
}

Contents of p.txt file below;

[sp]
SP_Main-jwma1

[mediaagent]
jwma1

Below is a look at the GUI configuration for the Oracle instance “orcl” on client “jwora1” which shows that third party command line backups should use Storage Policy (SP) – “SP_Main-jwcs”. However as you will not by the running of the job using the Media Parameters it will use a different SP and MediaAgent, as defined by the p.txt file I passed.

subclient not configured with any SP
subclient not configured with any SP
orcl properties showing command line backup should use SP - SP_Main-jwcs by default.
orcl properties showing command line backup should use SP – SP_Main-jwcs by default.
orcl properties showing log backups would use SP - SP_Main_jwcs by default
orcl properties showing log backups would use SP – SP_Main_jwcs by default.
sample execution of my rman backup script - current control file backup
sample execution of my rman backup script – current control file backup
Commserve Job Controller showing the running job. Note which MediaAgent is used and SP.
Commserve Job Controller showing the running job. Note which MediaAgent is used and SP.

If you find my posts of value, please send me some feedback. Especially if you find this post and it helps you in your travels.

UPDATE: And to follow on from the example above, the following is also possible too. If you don’t pass the CvClientName and CvInstanceName on the channel allocation, you can pull those too from the parameters file. Sample below of alternative backup script syntax and parameters file contents. All documented on the documentation link provided top of post.

RMAN Script:

run {
allocate channel ch1 type 'sbt_tape' PARMS="BLKSIZE=262144,ENV=(CVOraSbtParams=C:p2.txt)" trace 2;
backup current controlfile;
}

Contents of p2.txt file:

[sp]
SP_Main-jwma1
[mediaagent]
jwma1
[CvClientName]
jwora1
[CvInstanceName]
Instance001

The parameter file can have spaces between the definitions like in the top example, which I prefer, as it makes the file easier to read. Where as the p2.txt file has no extra spaces, which also works but makes it harder to read personally.

Enjoy.

Simpana 10 – Oracle iDA – Backup current controlfile via RMAN command line

Quick demo on how you can backup from command line using RMAN and still have this backup go via Simpana 10 and the Oracle iDA. This backup is a control file only backup, follow on from the GUI based example in my last post.

Simpana 10 documentation link covering this can be found here.

Contents of my backup.txt from screen cast on this post.

run {
allocate channel ch1 type 'sbt_tape'
PARMS="SBT_LIBRARY=/opt/simpana/Base/libobk.so,
ENV=(CvClientName=lcosx86v56-1,CvInstanceName=Instance001)";
backup current controlfile;
release channel ch1;
}

 

Simpana 10 Oracle iDA installation onto Linux client

Demo deployment of Simpana 10 Oracle iDA installation onto Linux client.

You’ll note I first check to see which user is running the pmon process for our database, in this case it’s “oracle”.

Next I change to the user oracle and determine the users primary group. As this group will be used for the installation. In this example it’s “oinstall”.

I’ll be posting another part to this, as the installation is merely the first step. Once installed you have to do some configuration from the Simpana console. i.e. create the oracle instance etc.

Commvault documentation covering the install above can be found here.

Simpana 10 – SAP for Oracle backup failure

Came across an Simpana 10 SAP for Oracle iDA condition where the job would fail per below;

Error Code: [18:45]
Description: Snap Initialization failed with an error: [Backup Index Initialization failed. Please check the logs.]
Source: clientname, Process: backint_oracle

If you look into the $SAPDATA_HOMEsapbackup directory for the detail file associated with the failed backup you should also see something like below;

Rel 10.0.0(BUILD116) - CS=<commserve> CC=<clientname> retCode=1 bUpgradeFlag=208 upgradeTo9oTime=0
Got Mangled MediaAgent=<ma.libobk.so*ma*8400*8402> from Archive Manager
creating BCD dir=</opt/simpana/iDataAgent/jobResults/2/115/417/> failed with retCode=<-1>

BR0280I BRBACKUP time stamp: 2013-04-30 14.52.41
BR0279E Return code from '/sapmnt/OBK/exe/uc/rs6000_64/backint -u OBK -f backup -i /oracle/OBK/sapbackup/.belcejum.lst -t file -p /oracle/OBK/112_64/dbs/initOBK.utl -c': 2

This failure is indicative of a permissions error. i.e. Simpana installation path and/or jobResults  (if been placed outside of the Simpana installation path) have permissions that restrict the SAP user from writing. Since the SAP for Oracle backups are ran via a Unix SAP user account.

Simpana 9 Oracle or File System SnapProtect Failure via NetApp

Had an interesting condition in the last few days and really thought I would share, as it seemed like something really simple that could be checked by anyone.

Likewise, this could affect Oracle and/or File System SnapProtect jobs via NetApp.

Error: 62:2145

Description: The client machine initiator address is not visible on the file server. Please check the SAN or iSCSI connectivity between the file server and the client.

Upon reviewing this one, I identified the following conditions;

[ClOraAgent.log]
11502 1   04/16 18:20:07 19593 ManageONTAP::OpenConnection: Trying HTTP on port:[80]
11502 1   04/16 18:20:08 19593 ManageONTAP::OpenConnection: FileServer:[LBnNNNnn-n] Version:[NetApp Release 8.0.2P6 7-Mode: Fri Jan 27 14:48:08 PST 2012]
11502 1   04/16 18:20:09 19593 CVSnapEngineNetApp::cvso_snapDevices Check for snap clone dependences on volume:[volume_boot] on file server:[LBnNNNnn-n] returned success:[true] dependency on:[false]

First connection to the FileServer completes, however…

[CVMA.log]
17401 11  04/16 18:20:23 19593 ManageONTAP::OpenConnection: Trying HTTP on port:[80]
17401 11  04/16 18:20:23 19593 ManageONTAP::OpenConnection: Failed to get HTTP system version for server [LBnNNNnn-n]. Error:[-1][Can't connect to host (err=-8).]. This could be because 1. The server is powered down. 2. The server name is not resolvable from this host 3. Error with HTTP configuration. Please rectify the above errors (if any) and try again.
17401 11  04/16 18:20:23 19593 ManageONTAP::OpenConnection: Trying SSL on port:[443]
17401 11  04/16 18:20:23 19593 ManageONTAP::OpenConnection: Failed to get HTTPS system version for server[LBnNNNnn-n]. Error:[-1][Can't connect to host (err=-8).]. This could be because 1. The server is powered down. 2. The server name is not resolvable from this host 3. Error with HTTPS configuration. Please rectify the above errors (if any) and try again.

As you can see the next attempt fails… The final attempt will be to determine if the HBA’s from the client can be seen against the FileServer. Should we also get failures again connecting to the FileServer it will fall through with the error below.

[CVMA.log]
17401 11  04/16 18:20:49 19593 CvSnapNetApp::detectHBA() - No initiators logged in. Getting all initiators.
17401 11  04/16 18:20:49 19593 CvSnapNetApp::detectHBA() - Returning initiator ID list length:[1] iSCSI:[false] LoggedIn:[false]
17401 11  04/16 18:20:49 19593 CVSnapEngineNetApp::cvso_mapSnaps Initiators on host:[libobk-client] Are not logged into file server:[LBnNNNnn-n]. Please check the SAN or iSCSI connectivity between the file server and the client.
17401 11  04/16 18:20:49 19593 ERROR:60516:Initiators on host:[libobk-client] Are not logged into file server:[LBnNNNnn-n]. Please check the SAN or iSCSI connectivity between the file server and the client.
17401 11  04/16 18:20:49 19593 CVSnapEngineNetApp::cvso_mapSnaps Printing status of clones at the end of map
17401 11  04/16 18:20:49 19593 CVSnapEngineNetApp::cvso_mapSnaps pSnapInfo->SnapDevice: [] status [11]
17401 11  04/16 18:20:49 19593 CVSnapEngineNetApp::cvso_mapSnaps iSnaps=0
17401 11  04/16 18:20:49 19593 CVMASnapHandler::mapSnaps() - From Snap Engine VolSnap:Status-[60500] Err-[60516:Initiators on host:[libobk-client] Are not logged into file server:[LBnNNNnn-n]. Please check the SAN or iSCSI connectivity between the file server and the client.]: [60500:].
17401 11  04/16 18:20:49 19593 CVMASnapHandler::mapSnaps() - Failed to map snaps. Err [60500:Error occurred in Snap Engine Error[]].
17401 11  04/16 18:20:49 19593 CVMASnapHandler::mountVolumes() - Request for mountVolumes Failed. Status [60500].
17401 11  04/16 18:20:49 #####  WORKER   [211977/0/0          ]  Failed to Mount Volume . Err [60516:Initiators on host:[libobk-client] Are not logged into file server:[LBnNNNnn-n]. Please check the SAN or iSCSI connectivity between the file server and the client.].

Things we have learnt, if communication between Client and Fileserver is impacted, it can cause the failure above. So be sure to validate that communication between the client and Fileserver is not affected.

Side note, if you wish to lock down the Simpana to use http vs https for the ManageONTAP communication you can use the registery key below;

s<arrayname>_NETAPPONTAPUSEADMINTRANSPORT

Defined under the iDataAgent branch of the simpana registry. Where the value of the key is http or https.

i.e. Example

vi /etc/CommVaultRegistry/Galaxy/Instance001/iDataAgent/.properties
Add line;

sLBnNNNnn-n_NETAPPONTAPUSEADMINTRANSPORT http

Now our communication will be http to FileServer LBnNNNnn-n, per regkey.

CommVault Simpana 9.0 Oracle Duplicate restore success

Finally, got it to work. Will post a tutorial on what I did to perform it. I have been able to do a restore to a new instance on the same host as the original instance that was backed up using a selective online full. The auxiliary instance I restored to is not known to CommCell Console.

Will post more details in the next few days, and will also attempt the same restore when the instance is already known to CommCell Console.

Not to mention perform on Linux to Linux too. Which would be similar to any other Unix to Unix platform.

CommVault Simpana 9.0 Oracle Duplicate restore

All I am trying to do is a simple restore from one instance to a new instance, and just can’t seem to get it.

I have followed various documents, resolved various problems along the way. Yet it still won’t work. It shouldn’t seriously be this difficult. As I am doing it on the same host which happens to be Windows.

I could pull out my hair and seriously throw the machine across the room. I know I am close, I guess I need to stick at it.

Grrr.

PS. When I do, I will document it in a more simple baby steps type way so anyone can follow it.