Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Facing Problem When I want tor perform Backup using Forms' HOST command

Facing Problem When I want tor perform Backup using Forms' HOST command

From: Martin <bush_90002000_at_yahoo.com>
Date: 30 Dec 2003 04:38:14 -0800
Message-ID: <f5db949f.0312300438.4c317e41@posting.google.com>


HEllO,

 Now I am successfully perform the rman backup via command line .With regards to this now I am using forms 6i Host command to pass the parameters to this batch file for backup purpose. I wrote the following code on When Button Press. But on run time when I try to perform the backup operation and press the button it did not work and gave the error bad command.
Below you also find the code of batch file.

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

However when I explicitly run the command via the command line it works and runs successfully.
Could anyone please give the solultion.

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

WHEN BUTTON PRESS TRIGGER DECLARE
        output VARCHAR2(900);

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

Host(output);  

END; 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 @ c:\Rman2\tbs.rman

 :end

Thanks

Martin Received on Tue Dec 30 2003 - 06:38:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US