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
Related
I'm trying to make a simple distributed database with Oracle Database 11g. I've created 2 virtual machines, both windows 7 and I've set up static ip for everyone and then I've modified the listener.ora. For exmaple the listener.ora for first VM looks like this:
I've check from my PC with ping to see if I get a reply and it works.
Then I've modified the tnsnames.ora from my PC as shown:
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)
)
)
SERVER1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.75.131)(PORT = 1521))
(CONNECT_DATA =
(SID = XE)
)
)
SERVER2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.75.130)(PORT = 1521))
(CONNECT_DATA =
(SID = XE)
)
)
When I try to create a connection with hostname: 192.168.75.131(first VM) I'm getting the follow error: Status : Failure -Test failed: ORA-01017: invalid username/password; logon denied.
The username and password are correct.
Try to connect utilizing sqlplus on Server1 - the devops way - repeatable
C:\>set LOCAL=192.168.75.131/XE
C:\>sqlplus system/system_password
SQL>connect admin/admin_password
You can also try:
C:\>set LOCAL=localhost/XE
C:\>sqlplus system/system_password
SQL>connect admin/admin_password
Best of luck!
Is your database set to use case-sensitive passwords?
That could be the issue.
I am trying connect the oracle database using SQL Developer tools but It showing me:
IO ERRORS: Network adapter Could Not Established The Connection
I Started the OracleXETNSListner service from service.msc: it's running.
I also used the lsnrctl start command, which couldn't start the listener either.
And one more thing: I used sqlplus command prompt: it works fine (also gets connected database)
Thanks in advance...
this is my Tnsname.ora file
my tnsname file located at C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = HP-PC)(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)
)
)
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.
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?