Net8 Getting Started Release 8.0.4 for Windows NT and Windows 95 A55913-01 |
|
This chapter describes how to connect to a database from a client machine.
Specific topics discussed are:
Client workstations and other servers connect to a network listener with a service name when logging onto an Oracle server. The appropriate Oracle Protocol Adapter is used when the database alias (or service name) used to request a connection specifies that protocol in the configuration file.
If you configured Oracle Names, start the Oracle Names Server on the machine where the Oracle Names Server resides.
To start an Oracle Names Server:
From the command line, enter:
If the
The Services window appears. Look for the OracleORACLE_HOMENamesService80 service. A blank in the Status column indicates that the service is not running. If the service is already running, close the window and go to the section "Step 2: Start the Network Listener".
The service starts.
Use the control utility NAMESCTL80...
Use the Windows NT Control Panel...
C:\> NAMESCTL80
NAMESCTL> STATUS
STATUS
command indicates the Oracle Names Server is running, go to Step 3. If the Oracle Names Server is not running, go to Step 2.
NAMESCTL> START
NAMESCTL> EXIT
For Net8 to accept connections on the server, a network listener must be started on the server. If you have started an Oracle Names Server, the network listener upon startup automatically registers the databases specified in the SID_LIST_LISTENER_NAME section of the LISTENER.ORA file with the well-known Oracle Names Servers.
To start the network listener:
where LISTENER_NAME is the name of the network listener defined in the LISTENER.ORA file with the alias LISTENER. It is not necessary to identify the network listener if you are using the default network listener, named LISTENER.
If the STATUS command indicates the network listener is running, go to Step 2. If the network listener is not running, go to Step 3.
SET PASSWORD is only required if the password is set in the LISTENER.ORA file. The password defaults to ORACLE.
OracleORACLE_HOMETNSListenerLSNR is created if this command is run for the first time against a non-default network listener name.
The Services window appears. Look for OracleHOME_NAMETNSListener80 (the service name if you are using the default network listener name LISTENER) or OracleHOME_NAMETNSListener80LSNR (where LSNR is the non-default network listener name). OracleHOME_NAMETNSListener80LSNR is only created if the following command has been run:
A blank in the Status column indicates that the service is not running. If the service is already running, close the window and go to the section "Step 3: Start Oracle Connection Manager(s)".
The service starts.
Use the control utility LSNRCTL80...
Use the Windows NT Control Panel...
C:\> LSNRCTL80
LSNRCTL> STATUS
LISTENER_NAME
LSNRCTL> SET PASSWORD PASSWORD
LSNRCTL> STOP LISTENER_NAME
LSNRCTL> START
LISTENER_NAME
LSNRCTL> EXIT
LSNRCTL80 START
LISTENER_NAME
If you configured Oracle Connection Manager, start it on the machine where it resides:
To start an Oracle Connection Manager:
If you are using Oracle Names, you may start the OracleHOME_NAMEClientCache80 service on all of the clients in order for the SDNS.ORA file to be updated with the new Oracle Names Server information. If you do not want to update the SDNS.ORA file, it is not necessary to start this service.
To start the OracleHOME_NAMEClientCache80 service:
Two ways to make database connections are to:
To connect to a database using Server Manager:
For... | Enter... |
---|---|
Host Naming method |
|
Local Naming method |
|
Oracle Names method |
SVRMGR> CONNECT SYSTEM/MANAGER@GLOBAL_DBNAME GLOBAL_DBNAME is the global database name you defined in the LISTENER.ORA for the Oracle Names Server. |
Bequeath Protocol Adapter |
SVRMGR> CONNECT SYSTEM/MANAGER |
1
If you cannot make a connection to the database, verify that the GLOBAL_DBNAME parameter in the LISTENER.ORA file specifies a complete name, including domain, for the server machine. |
Server Manager returns a "Connected" message to the screen.
SELECT * FROM DUAL;
SVRMGR> EXIT
Exiting Server Manager closes the database connection.
To connect to a remote database using SQL*Plus:
A Log On dialog box appears.
User Name |
SYSTEM |
Password |
MANAGER |
Host String |
The Oracle SQL*Plus window appears with a SQL> prompt.
SELECT * FROM DUAL;
SQL> EXIT
Exiting SQL*Plus closes the database connection.