Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Can't open database

Re: Can't open database

From: David Fitzjarrell <oratune_at_aol.com>
Date: Tue, 12 Dec 2000 20:09:24 GMT
Message-ID: <9160ld$35$1@nnrp1.deja.com>

In our last gripping episode philly_at_ousd.k12.ca.us wrote:
> I am a newbie to Oracle. I created a database and the scott/tiger
 will
> not open it up. I have a supicion that Oracle is not running. How
 can
> I tell if it is running and if it is not running how can i make it
 run?
>
> Sent via Deja.com
> http://www.deja.com/
>

You have asked for a great deal of information and yet have not provided sufficient detail on your system to effect a proper response. Therefore I shall cover as many bases as come to mind. Hopefully one will apply.

If you are running Window$ NT/95/98/2000 you will need to check the available services. Do this by going to Start->Settings->Control Panel-
>Services (in NT/95/98) or Start->Settings->Control Panel-
>Administrative Tools->Services and check for OracleServiceORCL (I
shall presume you have created the default database). This should be running; if not, you will need to be an Administrator and you will need to click on the service and then click on the Start button. There may also be an OracleStartORCL service; if there is start this service instead of OracleServiceORCL. The OracleStartORCL service will start both services. Once started you should be able to connect to the database as Scott/Tiger.

If you are running UNIX/Linux the following command:

 ps -ef | grep oracle

will list all of the processes "owned" by oracle. The database will be a number of these (at least 5). If there are no processes with pmon or smon in the process name the database is not running. Logging in to the system as oracle and using svrmgrl you may start the database:

$ svrmgrl
...
SVRMGR> connect internal
Connected.
SVRMGR> startup
...

This may take a couple of minutes, and various numbers will be displayed indicating the size of the SGA, buffers and the like. The database is ready when 'Database opened' is displayed and the SVRMGR> prompt returns. You may now connect to the database as Scott/Tiger.

As I have not recently had occasion to work on VMS I cannot be certain as to what will be required to start the instance. I shall presume that the svrmgrl command would be the choice to start Oracle. I am not familiar with the method of process examination on VMS, however you should be able to invoke svrmgrl, connect internal and issue a startup command. If Oracle is running you will receive a message:

Cannot start already running Oracle. Shut it down first.

This will indicate that ORACLE is, indeed, running.

Let us presume that ORACLE is running, and, yet, you still cannot connect. Most likely you haven't set the environment variables, such as ORACLE_HOME, ORACLE_BASE, ORACLE_SID and PATH. On UNIX/Linux there is a file, in /etc, named oratab. This file will contain the location of ORACLE_HOME in the second field (each field is delimited by a ':'). A sample /etc/oratab entry might look like this:

ORCL:/u1/oracle/product/8.1.6:Y

ORACLE_HOME is the second value in the line -- /u1/oracle/product/8.1.6. Presuming you are using ksh, sh or bash you set ORACLE_HOME in this manner:

ORACLE_HOME=.....; export ORACLE_HOME

where ..... is the value you found in /etc/oratab, in this case /u1/oracle/product/8.1.6. Also found in /etc/oratab is the

ORACLE_SID, the first field in line.  In the example above the
ORACLE_SID would be ORCL.  Set the ORACLE_SID in the same manner as
ORACLE_HOME:

ORACLE_SID=.....; export ORACLE_SID

Finally you will need to ammend your path to include $ORACLE_HOME/bin:

PATH=$PATH:$ORACLE_HOME/bin; export PATH

This ensures you can find the Oracle executables.

On NT/95/98/2000 you will likely find a directory name orant, although it may also be named Ora81. This, and the drive letter this directory is found on, is your ORACLE_HOME:

C:\ORANT

C:\Ora81

Most Windows shortcuts to Oracle executables -- SQL*Plus, etc. -- will already be set properly so you probably won't need to set this. Your ORACLE_SID, however, will need to be set:

set ORACLE_SID=ORCL

This will point you to the database. You will probably want to set this from the Control Panel:

Start->Settings->Control Panel->System->Environment

Follow the fairly intuitive dialogues and you should have no trouble. Once set you should be able to invoke SQL*Plus and connect as Scott/Tiger. If you are using the Windows version of SQL*Plus (Plus80w.exe) a dialogue box will appear, asking for username, password and host string. Again presuming the default database your responses would be:

scott
tiger
orcl

Voila'! You should be connected.

Setting environment variables in VMS is an area of knowledge I have not exercised in quite some time. You should be able to consult on-line documentation, your Sys Admin or an application programmer for advice.

I hope this is helpful to you.

--
David Fitzjarrell
Oracle Certified DBA


Sent via Deja.com
http://www.deja.com/
Received on Tue Dec 12 2000 - 14:09:24 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US