Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nsrnmo.bat doesn't work

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I can backup data via command line,but when using autostart to do the job,the nsrnmo.bat doesn't work.pls give me some advice.

thx a lot

Frank
 
To help you, I think more Information is needed.

Stefan Bartels
 
The batch file has to be in the NSR\BIN directory, autostart only looks in this directory.
 
The most common reason for this not working is the enviroment not being setup properly, or a TNS issue.
 
Are you sure it's not a issue with the path name, seen some strange things when the path has spaces in i.e. c:\program files\nsr\bin

Just a thought. Regards
KeefB

[lightsaber]
 
The nsrnmo.bat file and the whole scheduled backup for oracle is very complicated. I have finally gotten 3 Oracle database backing up every day via this process. The nsrnmo.bat should look like this (I took out the REM lines)

SETLOCAL
SET ORACLE_SID=ORACLE_SID
SET ORACLE_HOME=C:\oracle\ora81
SET PATH=c:\progra~1\nsr\bin
SET NSR_RMAN_ARGUMENTS="msglog 'c:\TEMP\msglog.log' append"
SET NSR_SB_DEBUG_FILE=c:\TEMP\nsrnmo2.log
SET PRECMD=
SET POSTCMD=

SHIFT
SET args=%0
:argloop
SHIFT
IF %0.==. GOTO do_command
SET args=%args% %0GOTO argloop

:do_command
nsrnmostart %args%ILE=c:\TEMP\nsrnmo2.log

ENDLOCALMD=

please note that you need to use the DOS short name for Program Files because Legato was originally written for VMS and UNIX, it detests spaces.

Next, create your rman script

#
# RMAN Script Name: full.rcv
#
# Function: Full, on-line backup of DBNAME database
###############################################################
connect target user/password
connect rcvcat user/password@rmancatalogsid

run
{
allocate channel ch10 type 'SBT_TAPE' parms 'ENV=(NSR_DATA_VOLUME_POOL=DBDAILY)';

allocate channel ch11 type 'SBT_TAPE' parms 'ENV=(NSR_DATA_VOLUME_POOL=DBDAILY)';


allocate channel ch12 type 'SBT_TAPE' parms 'ENV=(NSR_DATA_VOLUME_POOL=DBDAILY)';

allocate channel ch13 type 'SBT_TAPE' parms 'ENV=(NSR_DATA_VOLUME_POOL=DBDAILY)';

allocate channel ch14 type 'SBT_TAPE' parms 'ENV=(NSR_DATA_VOLUME_POOL=DBDAILY)';

sql "ALTER DATABASE BACKUP CONTROLFILE TO TRACE";

sql "ALTER SYSTEM ARCHIVE LOG CURRENT";

backup
full
format '%d_DB_%s_%t_%p'
tag 'HRPRD_TBL'
(database include current controlfile);

release channel ch10;
release channel ch11;
release channel ch12;
release channel ch13;
release channel ch14;

allocate channel ch15 type 'SBT_TAPE' parms 'ENV=(NSR_DATA_VOLUME_POOL=DBDAILY)';

sql 'alter system archive log current';
resync catalog;
change archivelog all validate;

backup
format '%d_AL_%s_%t_%p'
(archivelog all delete input);

release channel ch15;


Please note the pool must be mentioned or Legato will pick a pool at random. Also note that you have to connect to the target database seperatly from the RMAN catalog instance.

Then create your client and in the saveset put the path to your RMAN script e.g C:/ORACLE/ADMIN/SCRIPTS/DAILY_FULL.RCV

THAT SHOULD DO IT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top