Facing problem to make a backup using FORM’S HOST command via RMAN

From: Martin <bush_90002000_at_yahoo.com>
Date: 30 Dec 2003 20:41:37 -0800
Message-ID: <f5db949f.0312302041.126797e3_at_posting.google.com>



HELLO, I am successfully performs the backup via command line using RMAN. With regards to this, now I am using forms 6i Host command to pass the parameters to the batch file for backup purpose.  I wrote the code on When Button Press, which you can see below. But on run time when I try to perform the backup operation using Forms and press the button it did not work and gave the error bad command.

 Error

D:\winnt\system32\command.com
Bad command.

However when I explicitly run the command via the command line it works and runs successfully.

Host _at_c:\Rman2\rman.cmd SYSTEM/MANAGER_at_test3 C USERS

Could you please give the solution?

WHEN BUTTON PRESS TRIGGER DECLARE
        output VARCHAR2(900);

BEGIN output:='_at_c:\Rman2\rman.cmd SYSTEM/MANAGER_at_test3 C USERS';

Host(output);  

END; Below you also find the code of batch file.

Code of batch file:

set connect_db=%1
 set paths=%2
 set tbs1=%3
 set tbs2=%4

 if not exist %paths%:\Rman_backup mkdir %paths%:\Rman_backup  if not exist %paths%:\Rman_backup\TBS_Backup mkdir
%paths%:\Rman_backup\TBS_Backup

 if exist connect_DB == goto usage

 if exist paths == goto usage
 if exist tbs1 == goto usage
 if exist tbs2 == goto usage
 



 if not "%~4"=="" set tbs2=,%4  

echo run {allocate channel d1 type disk format '%paths%:\Rman_Backup\TBS_Backup\b_%%u_%%s_%%p' ; backup tablespace
%tbs1% %tbs2% %tbs3% include current controlfile channel d1;} >
c:\Rman2\tbs.rman

 rman TARGET %connect_db% nocatalog _at_ c:\Rman2\tbs.rman

 :end

Thanks

MARTIN Received on Wed Dec 31 2003 - 05:41:37 CET

Original text of this message