Problém 19:
Může se vám stát, že nemáte službu registrovanou v listeneru a proto nejste schopni se připojit přes connect string. sqlplus uzivatel@service. K napravení této chyby můžete buď upravit soubor listner.ora, tak aby věděl o vaší bežící službě a nebo službu zaregistrujete přímo z sqlplus.
oracle@server:~> lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 – Production on 18-MAY-2010 19:01:13
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /opt/oracle/product/11gR1/db/bin/tnslsnr: please wait…
TNSLSNR for Linux: Version 11.2.0.1.0 – Production
System parameter file is /opt/oracle/product/11gR1/db/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/server/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=server)(PORT=15 21)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 – Production
Start Date 18-MAY-2010 19:01:13
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/11gR1/db/network/admin/listener.or a
Listener Log File /opt/oracle/diag/tnslsnr/server/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=server)(PORT=1521)))
The listener supports no services
The command completed successfully
Řešení:
Přihlaste se do sqlplus jako uživatel s oprávněním SYSDBA a zaregistrujte službu pomocí příkazu ALTER SYSTEM REGISTER.
oracle@server:~> sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Tue May 18 19:01:27 2010
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter system register;
System altered.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options oracle@server:~> lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 – Production on 18-MAY-2010 19:02:27
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 – Production
Start Date 18-MAY-2010 19:01:13
Uptime 0 days 0 hr. 1 min. 14 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File
/opt/oracle/product/11gR1/db/network/admin/listener.or a Listener Log File /opt/oracle/diag/tnslsnr/server/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=server)(PORT=1521)))
Services Summary…
Service „test.tomas-solar.com“ has 1 instance(s).
Instance „test“, status READY, has 1 handler(s) for this service…
Service „testXDB.netsafe.cz“ has 1 instance(s).
Instance „test“, status READY, has 1 handler(s) for this service…
The command completed successfully