Yesterday I restarted my machine and now my DB is unavailable.
I had already some difficulties to run it the first time because there were two different installations of Oracle DB.
The windows services that I suppose they should run:
OracleJobSchedulerFOOBAR
OracleOraDB12Home3MTSRecoveryService
OracleOraDB12Home3TNSListener : OracleOraDB12Home3TNSListener service on your local computer start and stopped. Some service stop automatically if they are not in use by other services or programs.
OracleServiceFOOBAR
OracleVssWriterFOOBAR
So as you can see : I can not start the OracleOraDB12Home3TNSListener service.
I changed the file tnsnames.ora :
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
FOOBAR=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myurl.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = FOOBAR)
)
)
And my listener.ora is
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\OracleDB\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\OracleDB\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = myurl.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
I already try a lot of things like :
sqlplus / as sysdba and startup but I got
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_FOOBAR'
alter system set local_listener='FOOBAR'; scope=spflile; but I got
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
When I check I the Oracle Administration Assistance for the OracleDB12Home3 :
ORACLE_SDI = FOOBAR
ORACLE_HOME = C:\OracleDB\product\12.1.0\dbhome_1
Does someone has any idea on how to help me?
After long investigations, thanks the help of a colleague, it's working.
To sum up how we did to solve it :
So to fix my first issue 'OracleOraDB12Home3TNSListener can not start' was due to that I had a new IP. So I changed it in my config (...\NETWORK\ADMIN
): https://community.oracle.com/thread/855326
when I was trying to connect with sql developer (after the restart of my computer). I had the error: ORA-01034: ORACLE not available ORA-27101: shared memory realm does not exist. That was meaning that my DB was not started (http://www.dba-oracle.com/sf_ora_01034_oracle_not_available.htm).
So I try start the db manually sqlplus / as sysdba and startup but I had always this output :
SQL> startup
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
ORA-00132: syntax error or unresolved network name 'LISTENER_FOOBAR'
To fix I tried to work on the LISTENER.ORA and TNSNAMES.ORA files :
LISTENER.ORA
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\OracleDB\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\OracleDB\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
(SID_DESC =
(GLOBAL_DBNAME=FOOBAR)
(ORACLE_HOME = C:\OracleDB\product\12.1.0\dbhome_1)
(SID_NAME = FOOBAR)
)
)
LISTENER_FOOBAR =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
TNSNAMES.ORA
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
FOOBAR =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = FOOBAR)
)
)
I try to restart the right windows service several times : OracleServiceFOOBAR but nothing was changing. I had always the same issue. I remember that I did pfile configuration.
So I decided to change the pfile configuration with something like alter system set LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' scope=both;. Right but I can't apply any command line because the database don't start...
so i created a pfile called init.ora with *.local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' trick from ORA-00119: invalid specification ORA-00132: syntax error. And I started the DB wit this file in parameter SQL> startup pfile=c:\oracledb\admin\XXX\pfile\init.ora
And then it was working.
Related
while I am login to sqlplus using command prompt getting protocol adapter error.
But, if I login using SQLPlus of oracle then it will login successfully.
Because of this issue, even i am not able to access TOAD.
Can anyone help me for to resolve the issue.
CHECK THE SCREENSHOT HERE
Copying text of LISTENER.ORA and TNSNAMES.ORA
LISTENER.ORA
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\ProgramFiles\oracle12c\app\oracle\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\ProgramFiles\oracle12c\app\oracle\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = XXXXX-pc)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
TNSNAMES.ORA
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
If you are ensure your configration is true,
Maybe, the notepad which you edit your tnsnames.ora, listener.ora files can put '....'(dots) front of each newline.
For example:
ORACLR_CONNECTION_DATA =
...(DESCRIPTION =
.....(ADDRESS_LIST =
.......(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
....)
....(CONNECT_DATA =
....(SID = CLRExtProc)
........(PRESENTATION = RO)
....)
..)
you can check this case with notepad++ selecting 'Show All Charecters'.
I have two computers, Computer A has IP (10.11.11.2) which contain oracle database 11g R2 and Computer B has IP (10.11.11.18). I searched alot and make some changes in Tnsnames.ora and listener.ora files but cannot connect. But when I tnsping 10.11.11.2 from client it gives me OK output. That's mean database is accessible from client but I am unable to connect database using Toad or Sqldeveloper.
Error is given :
tns does not currently know of service requested
My Computer A (10.11.11.2) tnsname.ora and listener.ora files paste below:
Tnsnames.ora file
# tnsnames.ora Network Configuration File: D:\app\Mobilityusr\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
listener.ora file
# listener.ora Network Configuration File: D:\app\Mobilityusr\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\Mobilityusr\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\Mobilityusr\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.11.11.2)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:\app\Mobilityusr
My Computer B (10.11.11.18) tnsname.ora and listener.ora files paste below:
tnsnames.ora file
# tnsnames.ora Network Configuration File: D:\app\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
listener.ora
# listener.ora Network Configuration File: D:\app\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:\app
Image of tnsping from computer B to oracle database (installed on Comupter A) is also attached:
Error image also attached
After a lot of research I solved the problem.And I must share it with you too so that any one who have this problem can solve it easily.
Listener.ora file is used to listen requests. We must add two entries(one for SID and other for machine IP address) in listener.ora if we want to access database from another computer.
Computer A files(listener.ora and tnsnames.ora) setting are given below:
Listener.ora
# listener.ora Network Configuration File: D:\app\Mobilityusr\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\Mobilityusr\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\Mobilityusr\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = D:\app\Mobilityusr\product\11.2.0\dbhome_1)
(SID_NAME = orcl)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.11.11.2)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:\app\Mobilityusr
SID_LIST_LISTENER contains two entries first SID_DESC is by default entry and we must add 2nd SID_DESC in order to identify orcl SID otherwise following error will be given by Sqldeveloper or toad or sqlplus when connecting database from other machine:
error: sid does not currently know
Now Listener contain two entries one by default for localhost and we must add 2nd entry which contain server machine IP. By this entry database on server machine can listen coming connections which contain this IP address will be connected to server database.Otherwise database will not be connected.
Note: You can use these configurations but don't forget to change IPs and oracle_home path
and tnsnames.ora file is used to define alias of any database parameters(SID,PORT,HOST). But it is not compulsory to change tnsnames.ora to connect server and client so I am not modifying tnsnames.ora located at server machine.
Computer B tnsnames.ora is same as above mentioned in question.
Computer B listener.ora is same as above mentioned in question.
Summary:
You only need to change listener.ora file located at server machine (Oracle_home/network/admin/).and add two entries one in SID_LIST_LISTENER to add SID detail and 2nd in LISTENER to add machine IP description.
Also check environment variables (ORACLE_UNQNAME,ORACLE_SID,ORACLE_HOME,TNS_ADMIN etc)
One more important thing You must check that Listener service is up and running
use these commands(Open CMD and type) :
**lsnrctl status **
**lsnrctl start **
**lsnrctl stop **
and when you change listener.ora file you must stop and then start lsnrctl service in order to changes effect.
In SQLDeveloper, instead of specifying SID, choose Service Name.
I had lots of trouble with same problem but with Oracle 12C. Finally got it working with almost similar solution.
My database server is on 192.168.1.165 with port 1526.
Also had to open port 1526 in Windows server firewall.
# listener.ora Network Configuration File: G:\app\db12\product\12.1.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = G:\app\db12\product\12.1.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:G:\app\db12\product\12.1.0\dbhome_1\bin\oraclr12.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1526))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1526))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.165)(PORT = 1526))
)
)
I am not able to connect Oracle 11g in Windows 7. Could somebody please help me.
Below is the error message that I am getting :
SQL> connect system
Enter password:
ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Process ID: 0
Session ID: 0 Serial number: 0
My tnsnames.ora file :
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(ORACLE_SID = XE)
(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 have started the listener service but still getting same error. Could somebody please help me in resolving this issue.
You need to start the oracle instance first.
set up oracle_home and oracle_sid.
export ORACLE_HOME=/u01/app/oracle/product/11.2/dbhome_1/ (choose per env)
export ORACLE_SID=dev
$ lsnrctl start
$ sqlplus '/ as sysdba'
SQL> startup
I have installed Oracle 11g Release 2 Express edition on CentOS 7 machine. The installation process is completed successfully saying below.
Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.
When I do tnsping to the service I am getting below error.
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = i2b2)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
TNS-12541: TNS:no listener
I then tried to start the listener and it's failing with below error.
TNSLSNR for Linux: Version 11.2.0.2.0 - Production
NL-00280: error creating log stream /u01/app/oracle/product/11.2.0/xe/network/log/listener.log
NL-00278: cannot open log file
SNL-00016: snlfohd: error opening file
Linux Error: 13: Permission denied
I searched a lot on forums and tried the given solutions there but could not solve the issue. What can be the issue in this case ?
Any help is really appreciated.
Edit:
Here is my tnsnames.ora file.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = i2b2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
And listener.ora file.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = i2b2)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
Environmental variables:
ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_HOME
ORACLE_SID=XE
export ORACLE_SID
export TNS_ADMIN=/u01/app/oracle/product/11.2.0/xe/network/admin
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
JAVA_HOME=/usr/java/jdk1.7.0_65
export JAVA_HOME
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/apache-ant-1.8.4/bin:$JAVA_HOME/bin
export PATH
I installed Oracle 11 XE on a 64bit Windows 2008R2. This is a development machine, therefore I have also installed Oracle Developer Tools for .NET (32bit). Both these installations come with their own version of SQLplus.
I have set up the tnsnames.ora and sqlnet.ora to be identical for both these oracle products, but I cannot connect to the local XE from either SQLplus. I get ORA-12560 everytime. the Oracle 11 XE home page also doesn't start.
---TNSNAmes.ora ----
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DDSAP236.asxdev.asx.com.au)(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)
)
)
----END TNSNAMEs.ora---
---Listener.Ora ---
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\Oracle\11Express\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\Oracle\11Express\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = DMACHINE.MyDomain.com)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
--End listener.ora----
In services.msc and lsntctrl both shows the XElistener service have started.
I am wondering what else I can check?
Can I run XE (32bit) on Win2008R2?
Can I run XE together with ODTODAC32 on Win2008R2?
How do I resolve ORA-12560 so I can connect to the XE database?
Additional Info
In the registry of this machine under HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Note\Oracle I have 5 folders - can someone confirm if this is correct?
The folders are:
KEY_ (not sure if this is correct)
KEY_OracleClient11g_HOME (the Oracle ODT client install's home)
KEY_EX (11g EX install's home)
ODP.Net (part of ODP install )
OracleMTSRecoveryService (part of ODP install)
If that's indeed your TNSNAMES.ORA, your syntax is broken - you have extra spaces in front of the connection aliases (first line of each entry), which might cause your problems. Your TNSNAMES.ORA should look like this:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DDSAP236.asxdev.asx.com.au)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
If your "real" TNSNAMES.ORA is correct, however:
what is the output of lsnrctl status?
what does your listener log contain?
does sqlplus / as sysdba work?