Oracle RMAN backup completing succesfully with No KB & no child streams

Hello All,

Oracle RMAN backup completing succesfully with No KB in activity monitor & no child streams.

Required permission have been set to logs directries and sub-directories.

bpdbclient & bpcd logs are not generating.

 

bphdb log:

17:28:50.545 [31875] <2> logparams: -sb -rdbms oracle -S master.domina.com -to 300 -c E_Test_ORA_UNX_Full_TBS -s Full -clnt Client.domain.com -FULL
-kl 28 -b Client.domain.com_1444685325 -jobid 2123
17:28:50.546 [31875] <4> bphdb: INF - setenv NB_ORA_POLICY=E_Test_ORA_UNX_Full_TBS
17:28:50.546 [31875] <4> bphdb: INF - setenv NB_ORA_CLIENT=Client.domain.com
17:28:50.546 [31875] <4> bphdb: INF - setenv NB_ORA_MODE=B
17:28:50.546 [31875] <4> bphdb: INF - NB_ORA_POLICY=E_Test_ORA_UNX_Full_TBS
17:28:50.546 [31875] <4> bphdb: INF - NB_ORA_SCHED not defined.
17:28:50.546 [31875] <4> bphdb: INF - NB_ORA_PC_SCHED=Full
17:28:50.546 [31875] <4> bphdb: INF - NB_ORA_SERV=master.domina.com
17:28:50.546 [31875] <4> bphdb: INF - NB_ORA_PC_BTYPE not set
17:28:50.546 [31875] <4> bphdb: INF - setenv NB_ORA_FULL=1
17:28:50.546 [31875] <4> bphdb: INF - setenv NB_ORA_INCR=0
17:28:50.547 [31875] <4> bphdb: INF - setenv NB_ORA_CINC=0
17:28:50.547 [31875] <4> bphdb: INF - setenv NB_ORA_SCHEDULED=1
17:28:50.547 [31875] <4> bphdb: INF - setenv NB_ORA_PARENT_JOBID=2123
17:28:50.547 [31875] <4> bphdb: INF - BACKUP START 31875
17:28:50.617 [31875] <4> bphdb: INF - CONTINUE BACKUP message received

17:28:50.617 [31875] <4> bphdb: INF - Processing /oracle/tbsbin/rman_full_nb.sh
17:28:50.618 [31876] <4> bphdb: INF - Child executing /oracle/tbsbin/rman_full_nb.sh
17:28:50.619 [31875] <4> bphdb: INF - Waiting for the child status
17:28:53.622 [31875] <4> bphdb: INF - Script exited with status = 0 <the requested operation was successfully completed>
17:28:53.623 [31875] <4> bphdb: INF - bphdb exit normal

17:28:53.623 [31875] <4> bphdb: INF - EXIT STATUS 0: the requested operation was successfully completed

 

 

 

Plese help.

1 Solution

Accepted Solutions
Accepted Solution!

Please have a look at the

Please have a look at the sample scripts as suggested before.

When triggered from the master server, the script is run by root user. root user does not have oracle db rights. There needs to be a test for username, if not oracle, then 'su - oracle' to run rman commands.

Extract from sample script (which is missing in your backup script):

# Determine the user which is executing this script.
# ---------------------------------------------------------------------------
CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`
....
...

# Initiate the command string
 
if [ "$CUSER" = "root" ]
then
    su - $ORACLE_USER -c "$CMD_STR" >> $RMAN_LOG_FILE
    RSTAT=$?
else
    /usr/bin/sh -c "$CMD_STR" >> $RMAN_LOG_FILE
    RSTAT=$?
fi

View solution in original post

16 Replies

Check the output of the rman

Check the output of the rman script. It should be located in /oracle/tbsbin/ unless you've specified a non-default value for logs. You can also log into the client and run the script manually. That would show what's happening.

I suspect something wrong

I suspect something wrong with the script. Did the Oracle dba use the sample script or provided own script? I am no Oracle expert, but we know from the NBU sample scripts what it should look like. Please copy the script and the output file to .txt files and upload as File attachments.

chmod -R 755

chmod -R 755 /usr/openv/netbackup/logs

provide your RMAN script as text file. Is it standalone DB or RAC DB ?

chmod needs to be run as

chmod needs to be run as root, so, changing permissions to 755 will only give root write permission to log folders and backups will fail when folders exist and oracle user cannot write to the folders.
755 is already the default.

Log folders need to be changed to 777 or else owinership of log folder need to be changed to oracle user, but NOT bpcd log. This log needs to be written to by root.

Highlighted

PFA RMAN script and output

PFA RMAN script and output and knidly help.

 

 

I am surprised that the

I am surprised that the script reported success when it actually failed. Did your dba look at the output? It did not get past the 'send' statement: "RMAN-03002: failure of send command at 10/13/2015 09:57:46 ORA-19559: error sending device command: NB_ORA_SERV=master.domain.com,NB_ORA_POLICYt=E_Test_ORA_UNX_Full_AAA ORA-19557: device error, device type: SBT_TAPE, device name: ORA-27194: skgfdvcmd: sbtcommand returned error ORA-19511: Error received from media manager layer, error text: Unknown command key " Your dba will need to fix the syntax issue in the script. I am not close to a system to compare with the sample scripts, but your dba should be able to spot the mistake.

Hello, it looks that return

Hello,

 

it looks that return code management is missing in the script, so parent job did not get proper error code. Refer to script templates in samples subdirectory.

Michal

I am surpraised too, Backup

I am surpraised too, Backup should fail instead of success.

I have modified your backup script as below, Use below script and let me know the result

NOTE : Change NB_ORA_SERV and NB_ORA_POLICY according to your environment.

run

{

   allocate channel ch00 type 'SBT_TAPE';
   allocate channel ch02 type 'SBT_TAPE';
   send 'NB_ORA_SERV=master.domain.com,NB_ORA_POLICY=E_Test_ORA_UNX_Full_AAA';
   crosscheck backup;
   crosscheck archivelog all;
   backup current controlfile;
   backup as COMPRESSED BACKUPSET database plus archivelog;
   release channel ch00;
   release channel ch02;

}

Hi, Please use the sample

Hi,

 

Please use the sample scripts. If the DBA wants to change them then he'll be responsible for the script.

 

 

the issue is still not

the issue is still not resolved, we are working with DB team.

Hi Bharath, How the issue

Hi Bharath,


How the issue will be resolved..? Please use the sample netbackup scripts.. Ask your DBA to compare the script and write new one... 

The script you provided seems a different one.

 

It's been 3 days since the

It's been 3 days since the opening post.... What is taking your dba's so long? One would think that a knowledgeable dba would look at the output and fix the script error in 30 seconds flat....

Hi All, When backup

Hi All,

 

When backup triggered from DBAs (User backup), it generates child streams & its shows KBs backed up.

However if we manually try triggering from Netbckup, its completing with status 0 & no child streams.

 

Please help.

Accepted Solution!

Please have a look at the

Please have a look at the sample scripts as suggested before.

When triggered from the master server, the script is run by root user. root user does not have oracle db rights. There needs to be a test for username, if not oracle, then 'su - oracle' to run rman commands.

Extract from sample script (which is missing in your backup script):

# Determine the user which is executing this script.
# ---------------------------------------------------------------------------
CUSER=`id |cut -d"(" -f2 | cut -d ")" -f1`
....
...

# Initiate the command string
 
if [ "$CUSER" = "root" ]
then
    su - $ORACLE_USER -c "$CMD_STR" >> $RMAN_LOG_FILE
    RSTAT=$?
else
    /usr/bin/sh -c "$CMD_STR" >> $RMAN_LOG_FILE
    RSTAT=$?
fi

View solution in original post

Hello, got resolved? There

Hello,

 

got resolved? There are many useful pieces of advice here.

Michal

 

Re: Oracle RMAN backup completing succesfully with No KB & no child streams

This is pointless... Did you manage to use the sample scripts..? Your replies doesnt make any sense...