I had one environment installed Oracle 11g R2 for few months, it was working well for past few months, but this week, I got error when I connect.
My environment:
Windows 7 64 bit with SP1
So I trying to investigate:
Here is my listener.ora
# listener.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1)
(GLOBAL_DBNAME=orcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.100.134)(PORT = 1521))
)
)
)
ADR_BASE_LISTENER = D:\app\Administrator\product\11.2.0\dbhome_1\log
and my tnsnames.ora
# tnsnames.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.100.134)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
(GLOBAL_NAME = orcl)
)
)
Here is my investigate process:
using LSNRCTL to check listener status(sorry I translate from Chinese to English)
LSNRCTL> status
Connect to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
Listener status
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production
Start Date 24-12-2014 11:13:04
Normal operation Time 0 day 0 hour 21 minute 32 second
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener config file D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener log file d:\app\administrator\product\11.2.0\dbhome_1\log\diag\tnslsnr\1300313-PC\listener\alert\log.xml
Listener summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROCipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.1.100.134)(PORT=1521)))
Service Summary...
service "PLSExtProc" has 1 execute process.
execute process "PLSExtProc", status UNKNOWN, has 1 handler for this service...
service "orcl" has 1 execute process.
execute process "orcl", status UNKNOWN, has 1 handler for this service...
command complete
Using TNSPING
D:\app\Administrator\product\11.2.0\dbhome_1\BIN>tnsping orcl
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 24-12-2014 11:39:23
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Config file:
D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
Using TNSNAMES adaptor to parse alias
try connecting (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.100.134)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl) (GLOBAL_NAME = orcl)))
OK (40 msec)
Using SQLPLUS
D:\app\Administrator\product\11.2.0\dbhome_1\BIN>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wednesday 12.24 11:43:17 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connect to idle execution process.
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_ORCL'
SQL> exit
disconnected
D:\app\Administrator\product\11.2.0\dbhome_1\BIN>sqlplus scott/tiger#orcl
SQL*Plus: Release 11.2.0.1.0 Production on Wednesday 12.24 11:44:01 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Process ID: 0
Session ID: 0 Sequence: 0
my environment variable as
D:\app\Administrator\product\11.2.0\dbhome_1\BIN>echo %ORACLE_HOME%
D:\app\Administrator\product\11.2.0\dbhome_1
D:\app\Administrator\product\11.2.0\dbhome_1\BIN>echo %ORACLE_SID%
orcl
Appreciated if any idea.
Sorry, I found wired thing, that oracle init config missing. Thank you very much.
Related
Is it possible to start an enterprise node, using an Oracle 12c backed up
vault configured via Oracle Wallet (i.e., configure the node.conf using only a
dataSource.url="jdbc:oracle:thin:#host:port:#SOME_ORACLE_WALLET_TNS" without
specifying any dataSource.username or dataSource.password parameters ) ?
In this case, please inform which additional oracle .jar files should be
added to the node drivers dir.
Oracle wallet is supported in Corda Enterprise. Below is a working configuration with Oracle Wallet, and has been tested with Oracle 11g and Oracle 12c.
Prerequisites
Oracle wallet is configured with auto login (-auto_login_local) for the node's database
Assuming that the node's database connection URL is configured in tnsnames.ora, with alias "db11g":
$ echo 'For JDBC URL ==> "jdbc:oracle:thin:#localhost:1521/xe" ==> below is an example of tnsnames.ora'
$ cat ~/oracle_experiment/tnsnames.ora
db11g =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = xe)
)
)
Wallet location is configured in sqlnet.ora:
$ cat ~/oracle_experiment/sqlnet.ora
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /Users/corda/oracle_wallet/)
)
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
Sqlplus should be able to login without a password challenge:
sqlplus /#db11g
SQL*Plus: Release 12.2.0.1.0 Production on Tue Nov 27 15:17:00 2018
Copyright (c) 1982, 2017, Oracle. All rights reserved.
Last Successful login time: Tue Nov 27 2018 14:46:09 +08:00
Connected to:
Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
SQL>
Necessary steps
Change the database-specific configuration from:
$ cat dbconfig_oracle11g.conf
dataSourceProperties = {
dataSourceClassName = "oracle.jdbc.pool.OracleDataSource"
dataSource.url = "jdbc:oracle:thin:#localhost:1521/xe"
dataSource.user = corda_es_user
dataSource.password = corda_es_passwd
}
To
$ cat dbconfig_oracle_wallet.conf
dataSourceProperties = {
dataSourceClassName = "oracle.jdbc.pool.OracleDataSource"
dataSource.url = "jdbc:oracle:thin:/#db11g"
dataSource.user=null
dataSource.password=null // user and password can't be ignored and can't be left blank.
}
Download and copy the following JARs into the node's drivers folder:
]$ ls <corda>/drivers/
ojdbc8.jar
osdt_cert.jar
osdt_core.jar
oraclepki.jar
Start the node with the oracle.net.wallet_location and oracle.net.tns_admin options:
]$ java -Doracle.net.wallet_location=/Users/corda/oracle_wallet/ -Doracle.net.tns_admin=/Users/corda/oracle_experiment/ -jar corda.jar
Refer to the SSL with JDBC blog for more details.
I'm having a problem with configuring oracle odbc
the dialog page is blank
when I enter TNS name as : XE
I get the following error:
unable to connect SQLState=08004
my tnsnames file is:
KPI_SERVER=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST =localhost)(PORT =1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
the connection is successful in SQL developer by the following data:
hostname: localhost
port number: 1521
service: XE
and the trns_admin variable is set to: C:\oracle_odbc\tnsnames
Path is set to: C:\oracle_odbc
what did I do wrong?
thank you for your time
We try to make order: open a command prompt,
launch echo %TNS_ADMIN% the result is C:\oracle_odbc\?
launch dir C:\oracle_odbc\, the result is tnsnames.ora?
launch type C:\oracle_odbc\tnsnames.ora the result is the content of "my tnsnames file is" section of your initial post?
If all the response are yes, can you retry to lauch 'sqlplus.exe dbuser/dbpassword#KPI_SERVER
I am not able to connect to an oracle database from my R/Python scripts. Following is the code. TNSPing utility is able to resolve the database using LDAP. I am pasting TNSPING output as well.
TNSPing output
C:\Windows\System32>tnsping UHK00500_SECCOMPAS_APPL
TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 12-APR-2
013 10:26:26
Copyright (c) 1997, 2010, Oracle. All rights reserved.
Used parameter files:
c:\apps\oracle\network\admin\sqlnet.ora
Used LDAP adapter to resolve the alias
Attempting to contact (DESCRIPTION = (SDU = 8192) (TDU = 8192) (ADDRESS_LIST = (
ADDRESS = (PROTOCOL = TCP)(HOST = PHKLOD2002-SCAN.ap.hedani.net)(PORT = 1522)) (
LOAD_BALANCE = on) (FAILOVER = on ) ) (CONNECT_DATA = (SERVICE_NAME = UHK00500_S
ECCOMPAS_APPL.WORLD) (FAILOVER_MODE = (TYPE = session) (METHOD = basic) (RETRIES
= 20) (DELAY = 5))))
OK (60 msec)
R script output
Oracle 11g driver
chan <- odbcDriverConnect("driver=Oracle in OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=**")
Warning messages:
1: In odbcDriverConnect("driver=Oracle in OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=**") :
[RODBC] ERROR: state 08004, code 12154, message [Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve the connect identifier specified
2: In odbcDriverConnect("driver=Oracle in OraHome112_32;DBQ=UHK00500_SECCOMPAS_APPL;UID=toolkit;PWD=**") :
ODBC connection failed
ODBC driver output
chan <- odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=**")
Warning messages:
1: In odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=*") :
[RODBC] ERROR: state 08001, code 12154, message [Microsoft][ODBC driver for Oracle][Oracle]ORA-12154: TNS:could not resolve the connect identifier specified
2: In odbcDriverConnect("Driver={Microsoft ODBC for Oracle};Server=UHK00500_SECCOMPAS_APPL;Uid=toolkit;Pwd=**") :
ODBC connection failed
Can someone please advice what i should check here to correct this issue?
not sure what the issue was, but after restarted my R instance the connection was fine.
Ok everything worked fine till yesterday now i am suddenly getting this error
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
nothing had been modified
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = jainam-2b1c493d)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
I am totally stuck and have no idea what to do.
I tried help from here
http://dba-oracle.com/t_ora_12514_tns_listener_does_not_currently_know_service_requested.htm
but no use.
Thanks
EDIT:
here's the output to lsnrctl service
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 3 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
"ORACLE SERVER" established:0 refused:0 current:0 max:25 state:ready
CLRExtProc
(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\NTN_6B4_641B624E_B22.ORA))
"ORACLE SERVER" established:0 refused:0 current:0 max:25 state:ready
CLRExtProc
(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\NTN_6B4_641B624E_282.ORA))
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "XEXDB" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: JAINAM-2B1C493D, pid: 3708>
(ADDRESS=(PROTOCOL=tcp)(HOST=jainam-2b1c493d)(PORT=2763))
Service "xe" has 1 instance(s).
Instance "xe", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
For me it helped to add the following SID_DESC into the C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora
SID_LIST_LISTENER =
(SID_LIST =
...
(SID_DESC =
(SID_NAME = XE)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
)
)
After restarting listener and database the access worked again.
Thanks to http://grow-n-shine.blogspot.de/2011/11/oracle-11g-xe-issue-ora-12514.html
One of the reasons you get that kind of error is because database instance started before listener did. Listener must always be started first.
Check if a database instance is up and running
Check the output of the lsnrctl service command and see what services are registered.
Check if you have SERVICE_NAME correctly specified when connecting to the instance.
If it happens that database instance stared before listener did, sometimes you just need to wait a little or you can execute alter system register in order to register the instance.
Open SQL Plus and connect to System User:
system/p#ssword
And run two commands:
SQL> alter system set LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' scope=both;
SQL> alter system register;
Im trying to connect to a oracle 11g db on a LAN system in asp.net. But Im getting ORA-12541: TNS:no listener error.
I made following changes in the files .....
sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (BEQ, TCPS, NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
tnsnames.ora
TESTDB =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.50)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TESTDB)
)
)
LISTENER_TESTDB =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.50)(PORT = 1521))
)
)
Please let me know how i can solve this issue....
Thanks...
Did you start the listener? On the server:
lsnrctl status: should tell you if the listener is up
lsnrctl start: should start up the default listener, assuming there are no passwords
EDIT:
Since the listener is running, what does the lsnrctl status command tell you about the databases it's serving?
Can you connect to the database from the command line?
Can you run tnsping testdb and contact the listener?
When you try to connect, are you on the server, or a different host?