Net8 Getting Started Release 8.0.6 for Windows NT and Windows 95/98 A70007-01 |
|
This chapter describes how to connect to a database from a client computer.
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 are using Oracle Names, start an Oracle Names Server on the computer where Oracle Names Server is installed and configured with the NAMESCTL80 control utility or the Control Panel:
Use the control utility NAMESCTL80... | Use the Windows NT Control Panel... |
---|---|
From the command line, enter:C:\> NAMESCTL80 NAMESCTL> STATUS If the 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 |
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 "Step 2: Start the Network Listener". The service starts. |
For Net8 to accept connections on the server, a network listener must be started. 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 ORACLE_HOME\NET80\ADMIN\LISTENER.ORA file with the well-known Oracle Names Servers.
Note: Start Oracle SNMP support (if needed) after starting the network listener. See Chapter 9, "Using the Oracle SNMP Agent". |
On the server, start the listener with the LSNRCTL80 control utility or the Control Panel:
Use the control utility LSNRCTL80... | Use the Windows NT Control Panel... |
---|---|
C:\> LSNRCTL80 LSNRCTL> STATUS LISTENER_NAMEwhere 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.
LSNRCTL> SET PASSWORD PASSWORDLSNRCTL> STOP LISTENER_NAMESET PASSWORD is only required if the password is set in the LISTENER.ORA file. The password defaults to ORACLE .
LSNRCTL> START LISTENER_NAMEOracleORACLE_HOMETNSListenerLSNR is created if this command is run for the first time against a non-default network listener name.
LSNRCTL> EXIT |
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:LSNRCTL80 START LISTENER_NAMEA blank in the Status column indicates that the service is not running. If the service is already running, close the window and go to "Step 3: Start Oracle Connection Manager(s)".
The service starts.
|
If you are using Oracle Connection Manager, start it on the computer where Oracle Connection Manager is installed and configured with the CMCTL80 control utility or the Control Panel:
If you are using Oracle Names, you may enable client caching on clients with the NAMESCTL80 control utility or the Control Panel (for Windows NT only). Client caching will update the SDNS.ORA file 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.
Two ways to make database connections are to:
To connect to a database using Server Manager:
C:\>SVRMGR30
The SVRMGR> prompt appears.
For... | Enter... |
---|---|
Host Naming method |
|
Local Naming method |
|
Oracle Names method |
GLOBAL_DBNAME is the global database name and domain you defined in the LISTENER.ORA for the Oracle Names Server. |
Bequeath Protocol Adapter |
SVRMGR> CONNECT SYSTEM/MANAGER2 |
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 |
USERNAME |
Password |
PASSWORD |
Host String |
The Oracle SQL*Plus window appears with a SQL> prompt.
SQL> SELECT * FROM DUAL;
SQL> EXIT
Exiting SQL*Plus closes the database connection.
|
Copyright © 1999 Oracle Corporation. All Rights Reserved. |
|