Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

rman script for Windows Platform !!!

shipon_97Nov 7 2015 — edited Nov 21 2015

Dear Friends ,

I wanna to create a rman backup script on windows . With the script , I need the following requirements :

- create a data folder

- store all backup (datafile,control,spfile) on that dated folder

-store log wile with date mentioned ,

Hence I create two files :

1) rman.bat :

set oracle_home=D:\app\win\product\11.2.0\dbhome_2

set oracle_sid=orcl

rman target / @inc0.rcv


2)  inc0.rcv :

run{

host 'SET date=%Date:~10,4%-%Date:~4,2%-%Date:~7,2%';

host 'MKDIR D:\rmanback\RMAN_orcl_%date%';

allocate channel d1  device type disk format 'D:\rmanback\%date%\%t_%s_%r.dbf';

allocate channel d2  device type disk format 'D:\rmanback\%date%\%t_%s_%r.dbf';

backup incremental level 0 database;

backup format 'D:\rmanback\%date%\spfile.spbak'

  (spfile);

backup archivelog all;

backup format 'D:\rmanback\%date%\controlfile.ctlbk'

  (current controlfile);

delete noprompt archivelog until time 'sysdate -1';

release channel d1;

release channel d2;

}

=====Error Output ============

DBF

channel d2: starting piece 1 at 07-NOV-15

RMAN-03009: failure of backup command on d1 channel at 11/07/2015 12:07:36

ORA-19504: failed to create file "D:\RMANBACK\ORCLATE%\895147656_23_%R.DBF"

ORA-27040: file create error, unable to create file

OSD-04002: unable to open file

O/S-Error: (OS 3) The system cannot find the path specified.

channel d1 disabled, job failed on it will be run on another channel

released channel: d1

released channel: d2

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03009: failure of backup command on d2 channel at 11/07/2015 12:07:36

ORA-19504: failed to create file "D:\RMANBACK\ORCLATE%\895147656_24_%R.DBF"

ORA-27040: file create error, unable to create file

OSD-04002: unable to open file

O/S-Error: (OS 3) The system cannot find the path specified.

Recovery Manager complete.

--------------

Would anybody help me to create/share the script  for windows platform in this case ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 19 2015
Added on Nov 7 2015
3 comments
2,404 views