User`s guide

Connecting to an Oracle Instance
1-6 Oracle Database User's Guide
$ SQL> connect / as sysdba
1.6 Connecting to an Oracle Instance
You can connect to an Oracle instance in the following ways:
Using Oracle Net Services with the Bequeath adapter (Refer to the "Oracle Net
Services" chapter in Oracle Database Installation and Administration Guide for Fujitsu
BS2000/OSD)
Using Oracle Net Services over TCP/IP or IPC
Check with the database administrator to see whether you can connect to the Oracle
database using the listed methods, as the possibilities available are dependent on how
the system has been configured. Usually, you specify the way you connect to an
Oracle instance as part of the logon string appended to the userid/password, and
separated from it by an at sign (@), as illustrated in the following sections.
1.6.1 Default Connections
If you do not specify a connection string, then the environment variable
DEFAULT_
CONNECTION
, if set, is used to establish the Oracle database connection. Refer to
Appendix B, "Oracle Environment Variables" for more information about the
ORAENV
file and the
DEFAULT_CONNECTION
environment variable.
1.6.2 Accessing an Oracle Instance
Access to a local or remote instance is done through Oracle Net Services. Use the
Oracle Net Services logon string to identify the following for accessing a local or
remote database:
Protocol to be used
Database you want to access
Type of server (whether dedicated or shared) you want to use
The Oracle Net Services logon string has the following structure:
/START-PROGRAM $ORAC1120.SQLPLUS
* userid/password@service_name
where:
service_name
specifies a service name entered in the
TNSNAMES.ORA
file that identifies
the TNS connect descriptor for the desired database. If you are not sure of what you
should enter here, then contact the database administrator.
The following example shows a logon string to connect to a database defined in the
TNSNAMES.ORA
file as
SERVERX
:
HR/HR@SERVERX
For information about connecting to an Oracle Database using the Bequeath adapter,
refer to the "Oracle Net Services" chapter in Oracle Database Installation and
Administration Guide for Fujitsu BS2000/OSD.