Oracle Networking Products Getting Started for Windows Platforms Release 8.0.3 A53746-01 |
|
This chapter describes how to connect to a database from the 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.
To connect to a database from a client machine:
To start server services, perform these tasks:
Note:
See Chapter 5, "Administration Tasks" for detailed instructions on how to perform these tasks. |
Net8 provides different methods of connecting to a database from the client machine:
To connect to a database using Server Manager:
SVRMGR30
The SVRMGR> prompt appears:
SVRMGR>CONNECT SYSTEM/MANAGER@
service_name
or
SVRMGR>CONNECT SYSTEM/MANAGER@global_dbname
The service_name is the database alias you defined earlier and the global_dbname is the global database name you defined in the LISTENER.ORA for the Oracle Names Server.
Server Manager returns a Connected
message to the screen.
SVRMGR>EXIT
Exiting Server Manager closes the database connection.
To connect to a remote database using SQL*Plus:
From the Start menu, select Programs > Oracle for Windows NT or Windows 95 > SQL*Plus 8.0.
A Log On dialog box appears.
User Name |
SYSTEM |
Password |
MANAGER |
Host String |
(database alias from TNSNAMES.ORA or global database name from LISTENER.ORA) |
The Oracle SQL*Plus window appears with a SQL> prompt.
SQL>EXIT
Exiting SQL*Plus closes the database connection.
Use the Oracle Net8 Assistant to specify the use and order of naming methods in your profile. The naming methods available are:
Note:
See Net8 Administrator's Guide for a detailed discussion of name resolution. |
Host Naming can only be used in a TCP/IP network environment. No client configuration is necessary for using the Host Name Adapter. This naming method is enabled by default. You can disable (or enable it again) using Oracle Net8 Assistant. See the section in Chapter 4, "Configuring the Network" for instructions on how to enable or disable Host Naming.
The parameter GLOBAL_DBNAME="HOSTNAME" is specified in the LISTENER.ORA configuration file on the server, where HOSTNAME is the TCP/IP host name or alias of the server system. During the installation of Net8, the GLOBAL_DBNAME of the default database is set to the system name. To establish a client session using host naming, the client needs only to specify the system name of the server when the connect string, database name, or service name is requested.
If you need to support multiple SIDs on the same server, or you want to change the GLOBAL_DBNAME
Note:
You must use the default listener port 1521 in order to use host naming. |
Local naming resolves a service name by using information configured and stored on each client. The local configuration file is called TNSNAMES.ORA.
Use Oracle Net8 Assistant to enable local naming. See the section in Chapter 4, "Configuring the Network" for more information.
Centralized naming uses Oracle Names to resolve service names. Oracle Names stores names and addresses of all database services on a network on a Names Server. Connection requests are routed through the Names Server, which resolves the service name to a network address. The information is then returned to the client.
Use Oracle Net8 Assistant to enable Oracle Names. See the section in Chapter 4, "Configuring the Network" for more information.
External naming refers to service name resolution by using a supported third-party naming service. Oracle Native Naming Adapters resolve service names stored in a native naming service. Net8 provides these external naming methods:
Note:
These Native Naming Adapters were previously included as part of the Oracle Advanced Networking Option (a separately available option of Oracle Networking Products). |
Note:
DCE CDS is shipped as part of Oracle Advanced Networking Option. For information about DCE CDS, see Chapter 7, "Using the Advanced Networking Option". |
The Windows NT Networking Authentication Adapter allows clients connecting to an Oracle database on a Windows NT server to be authenticated at the operating system level. The database maps Windows NT user accounts to Oracle database accounts. By default, the authentication adapter does not perform any additional checks once it obtains the operating system user name. A user logged into a Windows NT server is automatically authenticated to use that database without entering an additional username and password.
To connect with the Windows NT Authentication Adapter:
The Windows NT Authentication Adapter is automatically installed with Net8 on both the clients and server.
SQLNET.AUTHENTICATIONS_SERVICES = (NTS)
If qualification of all domain user accounts with their Windows NT domain name is necessary, continue to Step 5. Otherwise, go to Step 6.
Additional Information:
See Appendix A, "Modifying Configurations" for instructions on how to modify the Windows NT registry. |
SQL>CONNECT SYSTEM/MANAGER; SQL>CREATE USER ``OPS$[DOMAIN]\USERNAME IDENTIFIED EXTERNALLY'';
if the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\OSAUTH_PREFIX_DOMAIN
is set to TRUE, or
SQL>CREATE USER ``OPS$USERNAME IDENTIFIED EXTERNALLY'';
if the registry entry is not set to TRUE (set to FALSE or not present in the registry).
DOMAIN and USERNAME must be specified in uppercase.
SQL>GRANT role to ``OPS$[DOMAIN]\USERNAME''; SQL>GRANT CONNECT to ``OPS$[DOMAIN]\USERNAME'';
CONNECT /@service_name
where service_name identifies the database alias.
The NDS Authentication Adapter enables client applications and users access a multi-server and multi-database network. A user logged into an NDS directory tree can be automatically authenticated to use an Oracle database in the same NDS directory tree, thus allowing a user access an Oracle Server without entering an additional username and password.
If the NDS Naming Adapter is also used, an NDS user can view the entire network under a single NDS directory tree.
Additional Information:
See:
|
Note:
To use the NDS Authentication Adapter, you must run NetWare 4.1 or above with NDS. |
To connect with the NDS Authentication Adapter:
SQLNET.AUTHENTICATIONS_SERVICE = (NDS)
CONNECT /@service_name
where service_name identifies the database alias.
If you use Named Pipes Protocol Adapter with Oracle Names Server or Connection Manager, set up the proper security permissions.
To set up the Named Pipes permissions:
The Services dialog box appears.
The Service dialog box appears.
The Add User dialog box appears.
The user ID appears in the Add Name field.
The Services dialog box appears with the user ID displayed in the This Account field.