cancel
Showing results for 
Search instead for 
Did you mean: 

Getting nbucode 6

bselby
Level 3

We are trying to run a RMAN hot_backup.sh script from NetBackup and are getting a nbucode 6. We have other jobs that run successfully on Netbackup. The RMAN script runs successfully on the command line. It does not being called from NetBackup. The oracle_link script was ran and the link is created on the database server.

The Oracle alert.log doesn't show any errors for today while we have been testing. I don't believe that the NetBackup application is connecting to RMAN. I don't see anything that indicates a connection from NetBackup in the V$RMAN_OUTPUT view. The NetBackup session just indicates and error 6.

What else should I be looking for to see if NetBackup is connecting at all to RMAN? Any solutions/advise would be appreciated.

Have to have this working before noon tomorrow.

Thanks.

Bev

 

13 REPLIES 13

bselby
Level 3

We ran the jbpSA and our Oracle connection is not active. What are we missing? The NetBackup job is executed as root. We don't seem to get past NetBackup. We do not have any RMAN templates. We created a script from the samples in RMAN and after modifying to fit our environment, it works fine when executed from the command line but get nbucode 6 when ran from NetBackup.

Marianne
Level 6
Partner    VIP    Accredited Certified

You need to ensure that the 'hot_backup.sh' script contains 'su - <oracle-user>'.
So, if rman backup is successful when you run rman backups manually as <oracle-user>, the next step is to run 'hot_backup.sh' script as root and check screen for errors.

Create log folders for troubleshooting:

mkdir /usr/openv/netbackup/logs/bpcd
mkdir /usr/openv/netbackup/logs/dbclient
chmod 777 /usr/openv/netbackup/logs/dbclient

Post these logs as well as rman output file (should be specified in the script).
Please post logs as attacment (rename them to reflect process name, e.g. dbclient.txt).

bselby
Level 3

Thank you for replying.

1) NetBackup is on a different server than the Database Server

2) In NetBackup we kick off the script as root. However we discovered that the Oracle Database Server does not know of a root user. This is where we are failing. We can run the script as root from the NetBackup box only if we force another su - Oracle User so that it recognizes that we are not root. What should be do since the database server does not know recognize a root user?

In the script we do su - to the Oracle User when we are running the RMAN script.

Thanks,

bselby

Marianne
Level 6
Partner    VIP    Accredited Certified

It sounds as if the 'su - <oracle-user>' in the script is not working. It might be in the wrong place or incorrect syntax.

Please compare your script with the sample scripts (hot_database_backup.sh) in /usr/openv/netbackup/ext/db_ext/oracle/samples/rman folder.

*** EDIT ***

About this statement:

1) NetBackup is on a different server than the Database Server

I guess you mean NetBackup server is installed on a different server?
I assume that you have NetBackup Client software installed on the Database server?

bselby
Level 3

On the database server in /usr/openv/netbackup/logs/user_ops/nbjlogs/<>.log we have a message, "Could not connect to vnetd over PBX. Trying connection directly to vnetd service on port = ######."

Thanks,

bselby

Marianne
Level 6
Partner    VIP    Accredited Certified

Please tell us which OS on NBU master server
which OS on Database server (NBU client)
which NBU version on master and client.
Frirewall between server and client?

You said in your opening post that 'The RMAN script runs successfully on the command line.'

This says to me that connection from client to master should not be a problem. I would like to see a full set of logs, please.
Since version 7.0.1, NBU will first attempt to connect on port 1556 (pbx). If unsuccessful it will try 13734 (vnetd).

Please do the following:

Create log folders on the client (Database server) for troubleshooting:

mkdir /usr/openv/netbackup/logs/bpcd
mkdir /usr/openv/netbackup/logs/dbclient
chmod 777 /usr/openv/netbackup/logs/dbclient

Try another backup.

Please post the following as attachments:

dbclient log (rename to dbclient.txt)
bpcd log (rename to bpcd.txt)
the log in user_ops produced by latest backup attempt.
RMAN output file.

bselby
Level 3

Linux 86-64 OS on both Database Server and NBU Master Server. Database is Oracle 11gR2.

We do not get a log file in the dbclient folder. We can not send the log file for security reasons. Can you tell us what we are looking for within the log file?

Thank you for your replies. We are out of the lab currently but will be working the issue again tomorrow. If there is anything that you can tell us what to look for in the log files we would appreciate it.

 

 bselby

 

Will_Restore
Level 6

 

Verifying the RMAN script on UNIX and Linux

The following procedure describes how to verify that the RMAN script works

correctly.

To verify the RMAN script

1 Use RMAN to make a backup directly to disk. Do not use NetBackup.

  (sounds like you have done this already)

 

2 Use RMAN with NetBackup to create a backup.

3 Check the /usr/openv/netbackup/logs/dbclient directory permissions.

  They should be set to 777.

4 Look for a log file in /usr/openv/netbackup/logs/dbclient

  If no log file exists, libobk is not linked into Oracle properly.

 

 

Please ensure you have correctly licensed and installed Netbackup for Oracle and successfully run the oracle_link script.

I know you said as much in your first post but I recommend recheck everything.

js88699
Level 5
Partner

Something you are saying does not sound right to me.  The script should be running on the DATABASE server, not the NetBackup master/media server, unless that is also the DB server.  As a simple test can you run a simple OS backup to make sure the master/media are talking to this client sucessfully?  If that works you know the that part of the connection is working.

If that is the case you should be able to manually run the script as ROOT on the DATABASE server and see what it's doing.  Marianne is correct that there needs to be an su - <oracle user> as root will not have all the necessary environment variables to run RMAN and connect to the database.

bselby
Level 3

Thanks again for all the support. I appreciate it.

Okay, I can see the link to the directory that the oracle_link script is linking to, and the privileges on the directory have been opened up with 777 and we still are not seeing logs being written into the dbclient directory.

When we run the backup script as root, we will need to source the /home/<oracle user?/.ora_<ORACLE_SID> file that sets the Oracle environment variables. Then we set the ORACLE_USER=<oracle_user name> that has dba privileges in the call to execute the backup it does the su - $ORACLE_USER before executing the backup. Does this sound correct?

I'm concerned because we still are not seeing any logs being written to the dbclient directory.

 

Thanks,

bselby

Marianne
Level 6
Partner    VIP    Accredited Certified

Have you seen my advice above (27 April)?

It sounds as if the 'su - <oracle-user>' in the script is not working. It might be in the wrong place or incorrect syntax.

Please compare your script with the sample scripts (hot_database_backup.sh) in /usr/openv/netbackup/ext/db_ext/oracle/samples/rman folder.

 

PLEASE try the sample script - it contains comments about what you need to change for your environment.

If the 'su' part is not working correctly, the script will fail because the rman commands cannot run. This explains why nothing is written to dbclient log.

bselby
Level 3

Thank you to all of you for your assistance on this. We had to create a .bsh script on the Database Server that was owned by root that contained the su - <oracle user> -c "<policy name>". It would not work in NetBackup typing in the su - <oracle user> because it was going from a server that didn't know anything about an oracle user (NetBackup server) to the database server that does have the oracle user. It works now. Thanks again.

bselby

Marianne
Level 6
Partner    VIP    Accredited Certified

That is correct - Oracle, RMAN, and Oracle user all 'live' on the database server. That is the only place where the script will work. This is what we've been trying to tell you all along.
I see we have never given you the link to the NBU for Oracle manual - please download and keep for future reference: http://www.symantec.com/docs/DOC3672

Please select the post that has helped you most and Mark As Solution.