Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Facing Problem When I want tor perform Backup using Forms' HOST command
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