Oracle Database - Easy Connect Method with host, port and service name (EZCONNECT)

Card Puncher Data Processing

About

The easy connect method is one of the naming method to get all the data needed to identified the location of the database.

The easy connect naming method eliminates the need for service name lookup in the tnsnames.ora files for TCP/IP environments; in fact, no naming or directory system is required if you use this method.

This naming method provides out-of-the-box TCP/IP connectivity to databases.

This method allow you to give :

  • the host name
  • the port (optional default 1521)

instead of the net service name to be able to connect to a database.

Syntax

Check your parameters : Oracle Database - How to retrieve the connect descriptor parameters? (host, port, service name and SID)

CONNECT username/password@[//]host[:port][/service_name]

where :

  • is optional. Specify for a URL.
  • host is required. Specify the host name or IP address of the database server computer.
  • port is optional. Specify the listening port. The default is 1521.
  • service name is optional. Specify the service name of the database. The default is the host of the database server computer. Note that this might not be the same value that you entered in the connect string for the host. For example, for the host emp, the service name might be emp.acme.com. If the host does not match the database service name, then enter a valid service name value rather than accepting the default.

Example

Then you can perform a easy connection with sqlplus or with the connect command.

C:\Documents and Settings\Nicolas>sqlplus gerardnico/password@ngerard:1521/orcl

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Jun 10 14:16:13 2009

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

gerardnico@ngerard:1521/orcl>connect gerardnico/password@ngerard:1521/orcl
Connected.

Reference





Discover More
Obiee Connection Pool
OBIEE 10G/11G - Oracle Call Interface (OCI) configuration

This page shows you how to install an OCI driver with OBIEE. To use it you have to install it on the BI Server machine through an Oracle Client installation (for instance an Oracle Database, an...
Card Puncher Data Processing
Oracle Database - Connect Identifier

A connect idenfier is the part of the connect string when a users initiate a connection to designate the service to which they want to connect to. The connect identifier is : a connect descriptor....
Card Puncher Data Processing
Oracle Database - Naming method (naming resolution method)

The Oracle Net Services naming method is resolution method used by a client application to resolve a connect identifier to a connect descriptor when attempting to connect to a database service. They...
Card Puncher Data Processing
Oracle Database - Net Service Name (tnsname)

A simple name for a service that resolves to a connect descriptor. Users initiate a connect request by passing a user name and password, along with a net service name in a connect string, for the service...



Share this page:
Follow us:
Task Runner