Home » RDBMS Server » Server Administration » script (oracle7)
script [message #283049] Mon, 26 November 2007 00:34 Go to next message
dirish
Messages: 205
Registered: November 2006
Senior Member
Hi Friends,

everyday, we have to create a standby control file. Instead I want to create a script and just execute it.

These are the commands I use:
login as oracle
$export ORACLE_SID=pump2
$svrmgrl
srmgrl > connect internal
svrmgrl > alter database create standby controlfile as '/orabkup/pump2/stdbypup2.ctl' reuse;


Can you please help me.



Thank you,
Dirish

Re: script [message #283052 is a reply to message #283049] Mon, 26 November 2007 00:37 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

You can create shell script and schedule through CRONTAB utility.

but why you create daily standby controlfile ?
Re: script [message #283060 is a reply to message #283052] Mon, 26 November 2007 00:59 Go to previous messageGo to next message
dirish
Messages: 205
Registered: November 2006
Senior Member
In fact I will create it once a week when i do my hot backup.

I created a file cr_ctrl.sh (attached) but this does not work.
  • Attachment: cr_ctrl.sh
    (Size: 0.13KB, Downloaded 137 times)
Re: script [message #283063 is a reply to message #283060] Mon, 26 November 2007 01:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
But why a standby control file and not a backup one?

Regards
Michel
Re: script [message #283064 is a reply to message #283060] Mon, 26 November 2007 01:04 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

but this does not work.
Any error message ???

Re: script [message #283067 is a reply to message #283064] Mon, 26 November 2007 01:10 Go to previous messageGo to next message
dirish
Messages: 205
Registered: November 2006
Senior Member
I found a better solution, the user has to log in svrmgrl and then run an sql script.

When cr_ctrl.sh is run, it stops at svrmgrl!

A standby control file as I have servers on standby modes where i will use the hot backup files together.



Thank you,
Dirish
Re: script [message #283515 is a reply to message #283067] Tue, 27 November 2007 06:47 Go to previous message
virtualmorrigan
Messages: 7
Registered: November 2007
Junior Member
try the following in your cr_ctrl.sh:

--snip--
export ORACLE_SID=pup2
svrmgrl <<EOF
connect internal
alter database create standby controlfile as '/orabkup/pup2/stdbypup2.ctl' reuse;
EOF

--snip

and see whether that improves matters.

best,
morrigan
Previous Topic: Oracle table size
Next Topic: Migration of oracle 10gR2 files from one host to a another
Goto Forum:
  


Current Time: Fri Dec 09 09:48:01 CST 2016

Total time taken to generate the page: 0.11736 seconds