Sunday, May 30, 2010

Start or Stop a database Using Command in Windows

There are two methods to start a database service in windows Environment.

1. Go the run prompt and type, services.msc

This will open the services window. Choose the database service you want to start or stop.

2. Using the command.

Let our database name as "TEST"

Start a Database service

Oradim -startup -sid test

Stop a database service

Oradim -shudown -sid test


Start or Stop a Windows service using command.

To start a database service, Use any one of the below commands,

SC START ORACLESERVICETEST

NET START ORACLESERVICETEST

To Stop a database service, Use any one of the below commands,

SC STOP ORACLESERVICETEST

NET STOP ORACLESERVICETEST


Note:

The above commands just starts the service. The database still needs to be opened.

To find the status of a service.

SC QUERY ORACLESERVICETEST

OUTPUT:


C:\SEENU>SC QUERY ORACLESERVICETEST

SERVICE_NAME: ORACLESERVICETEST
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

No comments: