Operating System - HP-UX
1753810 Members
8421 Online
108805 Solutions
New Discussion юеВ

problem using parameter in rman within netbackup

 
Sushil Singh_1
Advisor

problem using parameter in rman within netbackup

Hi all,
We are using netbackup to backup our system. Netbackup call the rman scripts to take the backup. I am having problem with the send parameter. Right now if within the rman scripts, if I use the "send" as following, it works fine

send 'NB_ORA_SCHED=Full-OnSite-Policy, NB_ORA_CLIENT=mpc1234';

but if I used a vairable name in place of mpc1234 it doesn't work

send 'NB_ORA_SCHED=Full-OnSite-Policy, NB_ORA_CLIENT=${HOSTNAME}'

It literally put NB_ORA_CLIENT as ${HOSTNAME}
So instead of mcp1234 I see ${HOSTNAME}. Ofcource export HOSTNAME=mcp1234 is set in the parent script.

Please help
Sushil
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: problem using parameter in rman within netbackup

right before send command

echo $HOSTNAME
hostname

DNS could be providing you a fully qualified domain name.

ie
server

could be server.yourdomain.net

Make sure that whatever values are displayed are in /etc/hosts because netbackup does not use dns to resolve hostnames, even if /etc/nsswitch.conf is set to do so.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com

Re: problem using parameter in rman within netbackup

I can't say exactly why this won't work without a bit of context - is this in an RMAN script which is called as in:

rman cmdfile=myrmanscript.rman

or ist it reading commands from stdout in a shell script as in something like:

rman << EOF
connect target blah...
allocate channel bah...
send 'NB_ORA_SCHED=Full-OnSite-Policy, NB_ORA_CLIENT=${HOSTNAME}'
etc...
EOF

If its the first instance then no wonder it doesn't work, the command is in an RMAN script and the syntax ${} for environment variables is for a UNIX shell.

Can you give us some context (like the whole script)

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Sushil Singh_1
Advisor

Re: problem using parameter in rman within netbackup

Thanks Steven and Duncan for the reply.

Duncan, you are right, RMAN is not comfortable with UNIX variable. It literally take the value assigned to the parameter. Below is the rman script that is called by shell script

run(
allocate channel t1 type 'SBT_TAPE';
send 'NB_ORA_SCHED=Full-OnSite-Policy, NB_ORA_CLIENT=${HOSTNAME}'
backup
incremental level 0
skip inaccessible
tag hot_db_bk_level0
and so on

}

I wanted to substitue the ${HOSTNAME} with the machine package name and don't want to hard code it since it may be used on different clusters.

Thanks
Sushil Singh