Home » RDBMS Server » Backup & Recovery » Control file Autobackup (oracle 9i, windows xp)
Control file Autobackup [message #436671] Fri, 25 December 2009 01:31 Go to next message
zahidbashir
Messages: 34
Registered: September 2009
Member
Hi,
I am configuring control file auto backup using RMAN.
I connected to RMAN and wrote this
RMAN> configure controlfile autobackup
2> format for device type disk
3> to '$HOME/BACKUP/RMAN/%F.bck';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$HOME/BACKUP/RM
AN/%F.bck';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete


Before that i created the BACKUP>RMAN folders in oracle > Ora92

Again using RMAN i wanted to make a backup of the current control file and the response was...
RMAN> backup current controlfile;

Starting backup at 25-DEC-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
channel ORA_DISK_1: starting piece 1 at 25-DEC-09
channel ORA_DISK_1: finished piece 1 at 25-DEC-09
piece handle=D:\ORACLE\ORA92\DATABASE\0HL1PPD0_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 25-DEC-09

Starting Control File and SPFILE Autobackup at 25-DEC-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1
channel at 12/25/2009 12:14:27
ORA-19504: failed to create file "$HOME/BACKUP/RMAN/c-2298047733-20091225-02.bck
"
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.


why does it fail to create the file in the specified directory..
Please help coz em newbie...

Regards

Re: Control file Autobackup [message #436672 is a reply to message #436671] Fri, 25 December 2009 02:35 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>>CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$HOME/BACKUP/RMAN/%F.bck';
Your env is not properly set with $HOME.
To make it simple,
I would rather just use the full path in CONFIGURE controlfile command and make sure the OS user Oracle has full rights to it.
Re: Control file Autobackup [message #436679 is a reply to message #436672] Fri, 25 December 2009 04:54 Go to previous messageGo to next message
zahidbashir
Messages: 34
Registered: September 2009
Member
Tnx Smile
But would you please tell me how to use this '$HOME'. Always confuse about this and never get desired results due to this variable. How can i config it or use it.
Re: Control file Autobackup [message #436685 is a reply to message #436679] Fri, 25 December 2009 08:16 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Well, $HOME can be anything here.
You have to set it first in OS.
>>'$HOME/BACKUP/RMAN/%F.bck'
Above is for unix filesystem.
For windows, use the backslash '\'.
See here for example
http://www.orafaq.com/wiki/ORACLE_HOME
Re: Control file Autobackup [message #436686 is a reply to message #436685] Fri, 25 December 2009 09:36 Go to previous messageGo to next message
zahidbashir
Messages: 34
Registered: September 2009
Member
Backslash!! oh i missed that Smile
Anyways i did like this
I set the ORACLE_HOME
C:\Documents and Settings\xahid>set ORACLE_HOME=D:\oracle\ora92

C:\Documents and Settings\xahid>echo %ORACLE_HOME%
D:\oracle\ora92

Then i did the following things

RMAN> configure controlfile autobackup
2> format for device type disk
3> to '$HOME\BACKUP\RMAN\%F.bck';

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$ORACLE_HOME\BA
CKUP\RMAN\%F.bck';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$HOME\BACKUP\RM
AN\%F.bck';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN> backup current controlfile;

Starting backup at 25-DEC-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
channel ORA_DISK_1: starting piece 1 at 25-DEC-09
channel ORA_DISK_1: finished piece 1 at 25-DEC-09
piece handle=D:\ORACLE\ORA92\DATABASE\0RL1QMKH_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 25-DEC-09

Starting Control File and SPFILE Autobackup at 25-DEC-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1
channel at 12/25/2009 20:33:24
ORA-19504: failed to create file "$HOME\BACKUP\RMAN\c-2298047733-20091225-07.bck
"
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.

I changed the $Home thing as $ORACLE_HOME as

RMAN> configure controlfile autobackup
2> format for device type disk
3> to '$ORACLE_HOME\BACKUP\RMAN\%F.bck';

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'ORACLE_HOME\BAC
KUP\RMAN\%F.bck';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$ORACLE_HOME\BA
CKUP\RMAN\%F.bck';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN> backup current controlfile;

Starting backup at 25-DEC-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
channel ORA_DISK_1: starting piece 1 at 25-DEC-09
channel ORA_DISK_1: finished piece 1 at 25-DEC-09
piece handle=D:\ORACLE\ORA92\DATABASE\0PL1QMAD_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 25-DEC-09

Starting Control File and SPFILE Autobackup at 25-DEC-09
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ORA_DISK_1
channel at 12/25/2009 20:28:00
ORA-19504: failed to create file "$ORACLE_HOME\BACKUP\RMAN\c-2298047733-20091225
-06.bck"
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.

Same results... further i removed the $ sign from $ORACLE_HOME and tried but same results... Sad


Re: Control file Autobackup [message #436687 is a reply to message #436686] Fri, 25 December 2009 09:40 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
In first case, you defined only $ORACLE_HOME. Not $HOME.
In second case, make sure you have a directory 'BACKUP\RMAN'
in $ORACLE_HOME.
Re: Control file Autobackup [message #436688 is a reply to message #436686] Fri, 25 December 2009 09:41 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Same results... further i removed the $ sign from $ORACLE_HOME and tried but same results..
Do not get fancy.
Do not use environmental variables.
hardcode fully qualified pathname.
Re: Control file Autobackup [message #436689 is a reply to message #436687] Fri, 25 December 2009 09:46 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
And I am not sure how folks call ORACLE_HOME in windows.
Never been a windows user.
Try these.

-- ? is $ORACLE_HOME shortcut
?\your_path

-- or this
%ORACLE_HOME%\your_path

[Updated on: Fri, 25 December 2009 09:47]

Report message to a moderator

Re: Control file Autobackup [message #436690 is a reply to message #436689] Fri, 25 December 2009 09:53 Go to previous messageGo to next message
zahidbashir
Messages: 34
Registered: September 2009
Member
Thanks Mahesh Smile
Its done.. tnx alot for the help.
RMAN> configure controlfile autobackup
2> format for device type disk
3> to '%ORACLE_HOME%\BACKUP\RMAN\%F.bck';

old RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '$HOME\BACKUP\RM
AN\%F.bck';
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%ORACLE_HOME%\B
ACKUP\RMAN\%F.bck';
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete

RMAN> backup current controlfile;

Starting backup at 25-DEC-09
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current controlfile in backupset
channel ORA_DISK_1: starting piece 1 at 25-DEC-09
channel ORA_DISK_1: finished piece 1 at 25-DEC-09
piece handle=D:\ORACLE\ORA92\DATABASE\0TL1QNLJ_1_1 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 25-DEC-09

Starting Control File and SPFILE Autobackup at 25-DEC-09
piece handle=D:\ORACLE\ORA92\BACKUP\RMAN\C-2298047733-20091225-08.BCK comment=NO
NE
Finished Control File and SPFILE Autobackup at 25-DEC-09

[Updated on: Fri, 25 December 2009 09:57] by Moderator

Report message to a moderator

Re: Control file Autobackup [message #436691 is a reply to message #436690] Fri, 25 December 2009 09:57 Go to previous message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Next time, please use CODE tags to post your code.
I have edited your last message. See the difference in readability from your previous posts.
Previous Topic: backup and restore after insert&update table and create&replace VIEW in oracle 9
Next Topic: Export
Goto Forum:
  


Current Time: Sat Dec 14 13:32:58 CST 2024