Database Reference
In-Depth Information
We then start up SQL*Plus (Oracle's command-line interface) and connect as sysdba (the account that is allowed
to do virtually anything in the database). Initially, assuming you haven't yet set the environment variable ORACLE_SID ,
you'll see the following:
[ora12cr1@dellpe dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Mon Sep 2 14:35:52 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
This error occurs because the database software has no idea what to try to connect to. When you connect, the
Oracle software will look for a TNS connect string (a network connection). If, as in our example, the connect string
is not supplied, the Oracle software will look at the environment for a variable named ORACLE_SID (on Windows, it
would look also in the registry for the ORACLE_SID variable). The ORACLE_SID is the Oracle “site identifier;” it is sort of a
key to gain access to an instance. If we set our ORACLE_SID :
[ora12cr1@dellpe dbs]$ export ORACLE_SID=ora12c
the connection is successful and SQL*Plus reports we are connected to an idle instance:
[ora12cr1@dellpe dbs]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Mon Sep 2 14:36:54 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
Our “instance” right now consists solely of the Oracle server process shown in bold in the following output. There
is no shared memory allocated yet and no other processes.
SQL> !ps -aef | grep ora12cr1
root 18392 15416 0 14:31 pts/1 00:00:00 su - ora12cr1
ora12cr1 18401 18392 0 14:31 pts/1 00:00:00 -bash
ora12cr1 18474 18473 0 14:36 pts/0 00:00:00 .../dbhome_1/bin/sqlplus as sysdba
ora12cr1 18475 18474 0 14:36 ? 00:00:00 oracleora12c (DESCRIPTION=(LOCAL=YES)
(ADDRESS=(PROTOCOL=beq)))
ora12cr1 18482 18474 0 14:38 pts/0 00:00:00 /bin/bash -c ps -aef | grep ora12cr1
ora12cr1 18483 18482 0 14:38 pts/0 00:00:00 ps -aef
ora12cr1 18484 18482 0 14:38 pts/0 00:00:00 grep ora12cr1
 
Search WWH ::




Custom Search