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

Card Puncher Data Processing


When you need to install, configure a new software, you need to give a connect descriptor in order to connect to a database. The connect descriptor contains parameters such as hostname, port, service name and/or sid of the database. Below is an how-to on how to retrieve this data.


When you don't know the host, the port and the service, you can ask the listener status with this command :

lsnrctl status

Then in the response, you will see all informations.

C:\Documents and Settings\Nicolas>lsnrctl status

LSNRCTL for 32-bit Windows: Version - Production on 10-JUN-2009 14:12:57

Copyright (c) 1991, 2007, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ngerard)(PORT=1521)))
Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version - Production
Start Date                09-JUN-2009 09:50:02
Uptime                    1 days 4 hr. 22 min. 58 sec
Trace Level               support
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   C:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
Listener Log File         C:\oracle\product\10.2.0\db_1\network\log\listener.log
Listener Trace File       C:\oracle\product\10.2.0\db_1\network\trace\listener.trc
Listening Endpoints Summary...
Services Summary...
Service "orcl.localdomain" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT.localdomain" has 1 instance(s).
  Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully

Host and port

The host NGERARD and the port 1521 can be found on this line :


Service Name

The service name “orcl.localdomain” can be found on this line :

Service "orcl.localdomain" has 1 instance(s).


The Oracle Database - System Identifier (SID) “orcl” can be found on this line :

Instance "orcl", status READY, has 1 handler(s) for this service...

You may have two different names between the service name and the SID

Discover More
Dac Installation Summary
DAC - Installation and Configuration v10. on Windows

Prerequisites for installing the DAC Client and Server on Windows are the following: Installation of Informatica 7.1.4 or 8.1.1 or 8.6.1. Download the file Oracle Business Intelligence Data Warehouse...
Edelivery File
EPM 11g - Windows Installation (Essbase

If you install it on a DHCP computer : clean up environment variable for Essbase (as ) Download the following files from the “Oracle Enterprise Performance Management System” page of the...
Companion Oracle 10g Product
Installation of Oracle Workflow 2.6.4 for Oracle Database 10gR2

Download the Companion CD on OTN : Oracle Database 10g Release 2 ( , File :
Workflow Configuration Assistant
Installation of the Workflow Server 10g/11g

The installation process of the server workflow is the same for the 10g of 11g database. To enable integration with Oracle Workflow: Stop all running OC4J instances. Locate Oracle Workflow installation...
Mapbuilder Preview Nl Gemeente
MapBuilder - Import of a Shapefile Map

When working with Mapviewer, you may face with the need to have map data to begin to work. The demo files come with some data but are really without utility if you work in an other country than the US....
Obiee11g Bip Security Center Roles
OBIEE 11G - Installation Sample Application version 825

edit the “” Save the file. Login to the EM administration screen using the url Expand 'Business Intelligence' > Coreapplication > Deployment > Repository Click...
Obiee 11.1 Internet Explorer 6 Not Supported
OBIEE 11g - Oracle Business Intelligence 11.1 Simple installation steps on Windows and OEL Linux 32 bit

Open the setSOADomainEnv.cmd file, located in your Update the PORT_MEM_ARGS entry as follows: set PORT_MEM_ARGS=-Xms512m -Xmx1024m Save the file and close. ;-) Oracle®...
Odi Topology Create Data Server
ODI - Data Server (Data Source)

Data servers describe connections to your actual physical application servers and databases. They can represent for example: An Oracle Instance, A File System, An XML File, A Desktop database...
Odi Create Master Repository Wizard
ODI - Installation version

LD_LIBRARY_PATH= Master Repository: Data structure containing information on the topology of the company's IT resources, on security and on version management of projects and data models. This repository...
Card Puncher Data Processing
Oracle Database - Easy Connect Method with host, port and service name (EZCONNECT)

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...

Share this page:
Follow us:
Task Runner