-
We don't have a DBA in our company and I am asked to do a simple shut down/start up script for backup purposes. With my limited DBA knowledge and a bit of reading, I came up with:
Shutdown:
sqlplus
connect sys/password
shutdown transactional
exit
Startup:
sqlplus
connect sys/password
startup
exit
Will this work? Or am I totally naive? This is a development database by the way and there is only two developers currently.
Also, when I issue: connect sys/password, I got a protocol error. Can someone tell me why? Thanks!
-
You need to set the Oracle_sid for which you are starting and shutting down
Set the SID then do your sqlplus, then connect sys/password
For our shutdowns we use shutdown immediate rather than transactional. If someone is logged in to the database with a transaction started and not commited the database will set and wait for the transaction to commit before it shutsdown. If theis person is gone for the night the db will never shut down
-
Can anyone tell me what is the command to set the SID? Thanks!
-
The Command to set The ORACLE_SID is
SET ORACLE_SID=
Then you can verify the ORACLE_SID you just set
Unix
echo $ORACLE_SID
NT
echo %ORACLE_SID%
Ravi