Oracle connect without listener file
oracle@apt-amd-02:~> sql / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Sun May 15 05:56:12 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show parameter name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string orcl
db_unique_name string orcl
global_names boolean FALSE
instance_name string orcl <<<<<----
lock_name_space string
log_file_name_convert string
service_names string orcl.aptus.co.uk <<<<-----
instance_name,service_names should set properly .
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-MAY-2011 05:58:47
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
The command completed successfully
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> mv listener.ora listener.ora20110515-1
moved the file . so no listener file now
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> ls -ltr listener.ora
ls: cannot access listener.ora: No such file or directory
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> lsnrctl start
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> lsnrctl stat
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-MAY-2011 06:10:07
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 15-MAY-2011 06:00:11
Uptime 0 days 0 hr. 9 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /opt/app/oracle/diag/tnslsnr/apt-amd-02/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
Services Summary...
Service "orcl.aptus.co.uk" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.aptus.co.uk" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
********************************************************************************
In this case PMON(process monitor ) process automatically register the service to SERVICE_NAMES and INSTANCE_NAME ,if these parameter set properly in init.ora file
*********************************************************************************
sqlplus [user]/[password]@//[database_host]:[port]/[service_name]
Enter user-name: oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> sqlplus scott/tiger@apt-amd-02.aptus.co.uk:1521/orcl.aptus.co.uk
SQL*Plus: Release 11.2.0.1.0 Production on Sun May 15 06:03:41 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> sqlplus scott/tiger@anuj
SQL*Plus: Release 11.2.0.1.0 Production on Sun May 15 06:04:46 2011
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
sqlplus [user]/[password]@//[database_host]:[port]/[service_name]
sqlplus scott/tiger@apt-amd-02.aptus.co.uk:1521/orcl.aptus.co.uk
LISTENER with different name, LISTENER default name is "LISTENER"
============================
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> cat listener.ora20110515
# listener.ora Network Configuration File: /opt/app/oracle/product/11.2/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = apt-amd-02.aptus.co.uk)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /opt/app/oracle
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> cp listener.ora20110515 listener.ora
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> lsnrctl start LISTENER1
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-MAY-2011 15:14:44
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /opt/app/oracle/product/11.2/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /opt/app/oracle/product/11.2/network/admin/listener.ora
Log messages written to /opt/app/oracle/diag/tnslsnr/apt-amd-02/listener1/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER1
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 16-MAY-2011 15:14:47
Uptime 0 days 0 hr. 0 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/oracle/product/11.2/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/apt-amd-02/listener1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=apt-amd-02.aptus.co.uk)(PORT=1521)))
The listener supports no services
The command completed successfully
oracle@apt-amd-02:/opt/app/oracle/product/11.2/network/admin> ps -ef|grep LIST
oracle 20618 1 0 15:14 ? 00:00:00 /opt/app/oracle/product/11.2/bin/tnslsnr LISTENER1 -inherit
oracle 20629 26430 0 15:14 pts/13 00:00:00 grep LIST
Search This Blog
Total Pageviews
Sunday, 15 May 2011
Subscribe to:
Post Comments (Atom)
Oracle DBA
anuj blog Archive
- ▼ 2011 (362)
No comments:
Post a Comment