Skip to Main Content

Oracle Database Discussions

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!

Automatically Shutdown Database During VMware Server 'Shut Down Guest'

brianrayApr 15 2009 — edited May 27 2009
I have 10g Enterprise Edition Release 10.2.0.4.0 running on Windows Server 2003 R2 under VMware Server version 2.0.0.

I 'Power On' the VM and the OS/database start normally. I don't even open the guest OS console from VMware. I use TOAD and SQLPlus from the host machine to access my database.

I'm trying to set up the database to do a clean shutdown when I use the VMware console to 'Shut Down Guest'.

I've used the Group Policy Object Editor (gpedit.msc) to create a shutdown script under 'Local Computer Policy/Computer Configuration/Windows Settings/Scripts (Startup/Shutdown)/Shutdown'.

The shutdown script is called Shutdown.bat and contains:

rem adding the first two lines didn't affect anything, so I REMed them
rem set ORACLE_SID=mysid
rem set ORACLE_HOME=c:\oracle\product\10.2.0\db_1
C:\oracle\product\10.2.0\db_1\bin\oradim -shutdown -sid mysid -shutmode immediate -log C:\oracle\product\10.2.0\db_1\database\oradim.log
exit

I get this in the oradim.log:

Wed Apr 15 13:16:50 2009
C:\oracle\product\10.2.0\db_1\bin\oradim -shutdown -sid mysid -shutmode immediate -log C:\oracle\product\10.2.0\db_1\database\oradim.log
Wed Apr 15 13:16:51 2009
ORA-12560: TNS:protocol adapter error

I get this in sqlnet.log:

Fatal NI connect error 12560, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=BEQ)(PROGRAM=oracle)(ARGV0=oraclemysid)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))'))(CONNECT_DATA=(SID=mysid)(CID=(PROGRAM=C:\oracle\product\10.2.0\db_1\bin\oradim.exe)(HOST=myserver)(USER=OraUser))))

VERSION INFORMATION:
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 10.2.0.4.0 - Production
Time: 15-APR-2009 13:16:51
Tracing not turned on.
Tns error struct:
ns main err code: 12560
TNS-12560: TNS:protocol adapter error
ns secondary err code: 0
nt main err code: 530
TNS-00530: Protocol adapter error
nt secondary err code: 2
nt OS err code: 0

Note: If I open the guest OS console and execute the Shutdown.bat file as myself (I'm in the administrator and ora_dba groups), it works perfectly ... as does opening SQLPlus and issuing 'shutdown immediate'.

I'm stuck. Any ideas?

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 24 2009
Added on Apr 15 2009
3 comments
992 views