RE: Automated shut down on 9i

RE: Automated shut down on 9i

 

  

You didn't mention platform. Are you on Windows? If so, I use the Oradim
command rather than invoking an SQLPlus session. It used to work more
reliably in 8i on NT, and I just continue using it in 9i/W3K.

Here's my shutdown script for cold backup

REM ***SCRIPT BACKS UP CONTROLFILE, GLOBAL CHECKPOINT, ETC. SEE BELOW ***
SQLPLUS /NOLOG @D:\ORA92\ADMIN\DFOI5\BACKUP\PRESHUT.SQL

D:\<ORAHOME>\BIN\ORADIM -SHUTDOWN -SID <YOUR SID> -SHUTTYPE SRVC,INST
-SHUTMODE I

XCOPY <YOUR SOURCE DBF FILES> <YOUR DESTINATION> /S/Y
XCOPY <ORAHOME>\ADMIN\*.* <YOUR BACKUP DESTINATION> /S/Y
XCOPY <ORAHOME>\DATABASE\*.* <YOUR BACKUP DESTINATION> /S/Y

D:\<ORAHOME>\BIN\ORADIM -STARTUP -SID <YOUR SID> -STARTTYPE SRVC,INST

*********************************
--PRESHUT.SQL
SPOOL <YOUR DESTINATION AND FILENAME>
set instance <YOUR SID>
connect <USER>/<PW>@<SID>

ALTER DATABASE BACKUP CONTROLFILE TO 'CONTROL.BKP' REUSE;
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
ALTER SYSTEM CHECKPOINT GLOBAL;
ALTER SYSTEM ARCHIVE LOG CURRENT;

SPOOL

EXIT





-----Original Message-----
From: Miles Flint
[mailto:oracledba-ezmlmshield-x68572688.[Email address protected]
Sent: Thursday, September 30, 2004 9:04 AM
To: LazyDBA Discussion
Subject: Automated shut down on 9i



Hi I had a very nice script written years ago to shutdown a DB and take a
cold back up and restart the DB
This used Svrmgr connect internal which fell away with 9i.

Does anyone know of a work around , am trying sqlplus xxx/xxxx 'as sysdba'
but not getting far, just frustrated.
I also tried net stop oracleservice but this times out and the copy starts
before the db is shutdown


Any ideas would be welcome

Many Thanks
Miles




--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html

Oracle LazyDBA home page