OracleXE installation and permission problems - oracle

Reference:
How to connect using PDB userid on Oracle 18c XE?
TNS Protocol adapter error
Product I am trying to install / configure: OracleXE 18c
Problem 1:
Attempting to log in as described in the Installation Guide returns the error shown below:
sqlplus / as sysdba
ORA-12560: TNS:protocol adapter error
Problem 2:
The following command fails immediately before asking for a password:
sqlplus system#localhost:1521/XEPDB1
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: system
Enter password:
ERROR:
ORA-12560: TNS:protocol adapter error
Problem 3:
I tried ALTER PLUGGABLE DATABASE ALL OPEN; as is mentioned in one of the the reference issues cited at the top of this post.
The command completes successfully. However trying run STARTUP as mentioned here
results in an error:
SQL> startup;
ORA-01031: insufficient privileges
ORA-01078: failure in processing system parameters
SQL>
Running whoami at the windows command prompt returns my user name which has admin priviliges and is the same one used to install OracleXE.
Additional Background:
I am able to log in as follows:
sqlplus system#localhost:1521
When I installed Oracle XE it created tnsnames.ora and listner.ora using mymachine.mydomain.com as host. The completion screen of the installer told
me to log in using localhost:1521 which does not work. After several hours of research I discovered that if I change mymachine.mydomin.com to localhost
in tnsnames.ora and listener.ora I could log in as system#localhost:1521. The above three problems remain however.
Running select value from v$parameter where name='service_names' as described in the ticket referenced above returns only one row: XE. Should it also
return a row for XEPDB1?
tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
XEPDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XEPDB1)
)
)
listner.ora
DEFAULT_SERVICE_LISTENER = XE
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\myname\product\18.0.0\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\myname\product\18.0.0\dbhomeXE\bin\oraclr18.dll")
)
(SID_DESC =
(SID_NAME=XE)
(ORACLE_HOME=C:\app\myname\product\18.0.0\dbhomeXE)
(GLOBAL_DBNAME=XE)
)
(SID_DESC =
(SID_NAME=XEPDB1)
(ORACLE_HOME=C:\app\myname\product\18.0.0\dbhomeXE)
(GLOBAL_DBNAME=XEPDB1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
lsnrctl status
LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 23-APR-2021 15:55:00
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
Start Date 23-APR-2021 12:09:44
Uptime 0 days 3 hr. 45 min. 16 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\OracleClient\listener.ora
Listener Log File C:\app\myname\product\18.0.0\diag\tnslsnr\mymachine\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s).
Instance "XE", status UNKNOWN, has 1 handler(s) for this service...
Service "XEPDB1" has 1 instance(s).
Instance "XEPDB1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
sqlnet.ora
# sqlnet.ora Network Configuration File: C:\OracleClient\sqlnet.ora
# Generated by Oracle configuration tools.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

Problem 1:
To use OS authentication on Windows your user should be in ORA_DBA group and sqlnet.ora must contain
SQLNET.AUTHENTICATION_SERVICES= (NTS)
updated: I see NTS was configured already, so just check if you are in the ORA_DBA group
Problem 2:
EZCONNECT: try this syntax with //
sqlplus system#//localhost:1521/XEPDB1
Problem 3:
You need to check the alert.log. You can save init parameters and post your parameter here:
alter system create pfile='c:/temp/init.ora' from spfile;
and then just post this file and startup errors from alert.log

If you omit password when connecting through sqlplus you need escaping.
This was my experience when I used WindowsOS. I just tried Easy Connect on my MacOS where it works with or without escaping.
REM password in clear text.
C:\>sqlplus user/password#host:port/SERVICE_NAME
REM you will be prompted for password
C:\>sqlplus user#"\host:port/SERVICE_NAME\"
Best of luck!

Related

Need Help To Resolve ORA-12154

I installed Oracle 12cR2.
Everything is fine.
Connected as SYS, Successful.
Now, what I did is changed my Container DB i.e. CDB$ROOT to ORCLPDB (Using Alter Session). And Created a User Called demo with password. Granted necessary permissions. Successful.
In that same session, I tried to connect to demo User, but unable to connect to it.
Error Shows as Follow:
ORA-12154: TNS:could not resolve the connect identifier specified.
How can I resolve this issue?
(Note: The user is in PDB)
tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
you are trying to connect to Demo/Password#ORCLPDB
there is no alias ORCLPDB in your tnsnames.ora, so Oracle complains that it can't find it
therefore:
connect to Demo/Password#ORCL (as you have ORCL in tnsnames.ora), or
modify the file and
add the new database alias (ORCLPDB) if it is a different database, or
add yet another alias for the same database, e.g. ORCL, ORCLPDB = ...

Oracle Listener stopped working

I have an issue with my Oracle listener. I am running on RHEL6 and all of a sudden Listener stopped working. I am able to sqlplus / as syadmin and it works fine from terminal.
Whenever I run command lsnrctl status, lsnrctl start, lsnrctl stop it gives below error.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dev32018)(PORT=1521)))
TNS-12538: TNS:no such protocol adapter
TNS-12560: TNS:protocol adapter error
TNS-00508: No such protocol adapter..
I can ping dev32018 and it is successful. And in the log file below message is shown.
type=UNKNOWN level=16 host_id=dev32018
host_addr=10.68.11.186
TNS-01150: The address of the specified listener name is incorrect
TNS-01153: Failed to process string: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dev32018)(PORT=1521)))
Everything was working fine and no modifications was made on listener.ora or any configuration file, the issue happened all of a sudden, we restarted the machine , restarted the network and still no use.
Anybody who can help in resolving issue.?
I have an issue with my Oracle listener. I am running on RHEL6 and all of a sudden Listener stopped working. I am able to sqlplus / as syadmin and it works fine from terminal.
Whenever I run command lsnrctl status, lsnrctl start, lsnrctl stop it gives below error.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dev32018)(PORT=1521)))
TNS-12538: TNS:no such protocol adapter
TNS-12560: TNS:protocol adapter error
TNS-00508: No such protocol adapter..
I can ping dev32018 and it is successful. And in the log file below message is shown.
type=UNKNOWN level=16 host_id=dev32018
host_addr=10.68.11.186
TNS-01150: The address of the specified listener name is incorrect
TNS-01153: Failed to process string: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dev32018)(PORT=1521)))
Everything was working fine and no modifications was made on listener.ora or any configuration file, the issue happened all of a sudden, we restarted the machine , restarted the network and still no use.
Anybody who can help in resolving issue.?
Updated as requested in comments
tnsnames.ora Network Configuration File: /app1/oracle/product/11.2.0.4/db_1/network/admin/tnsnames.ora
Generated by Oracle configuration tools.
DEV32018 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dev32018)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dev32018.corp.ae)
)
)
DEV3DB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dev32018)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dev32018.corp.ae)
)
)
Listener.ora
listener.ora Network Configuration File: /app1/oracle/product/11.2.0.4/db_1/network/admin/listener.ora
Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dev32018)(PORT = 1521))
)
)
LISTENER2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = dev32018)(PORT = 1522))
)
)
ADR_BASE_LISTENER = /app1/oracle
---------------------------------nslookup 10.68.11.186------------
oracle#dev32018 admin]$ nslookup 10.68.11.186
Server: 10.51.156.161
Address: 10.51.156.161#53
** server can't find 186.11.68.10.in-addr.arpa.: NXDOMAIN
--------------------------------nslookup dev32018---------------------------
[root#dev32018 etc]# nslookup dev32018
;; Got SERVFAIL reply from 10.51.156.161, trying next server
;; Got SERVFAIL reply from 10.55.155.32, trying next server
Server: 10.37.164.207
Address: 10.37.164.207#53
** server can't find dev32018: SERVFAIL
-------Telnet
[root#dev32018 etc]# telnet dev32018 1521
Trying 10.68.11.186...
telnet: connect to address 10.68.11.186: Connection refused
I have solved the problem by running the script "relink " in oracle home/bin directory
$ORACLE_HOME/bin
relink all
It took some 30 seconds to complete and afer that the listener command started working.
I am not sure what was the problem and what this script has corrected.
Thank you for all
Make you sure that you are running lsnrctl status in Oracle user if not.
Please try in terminal or log as Oracle USER.
$ su
# su - oracle
$ whoami
In this point whoami should give you back Oracle and you can run lsnrctl status
And the listener will be start now :D
You can do a sh file and add this to etc/init.d to autorun that when you start again the machine.
Update
You will need to run the next comand in Oracle user.
. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
This is for Oracle XE, you can find this specific comand in the documentation of installation of you Oracle Version. And next you will be able to run lsnrctl status

How to write sqlnet.ora and tnsnames.ora for new database connection

I just created a new database connection from Oracle SQL Developer called BATCHINSERT. But when I try to tnsping it I get the following error.
TNS Ping Utility for 64-bit Windows: Version 11.2.0.2.0 - Production on 27-APR-2016 15:28:37
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora
TNS-03505: Failed to resolve name
This is my sqlnet.ora
# sqlnet.ora network configuration file in
# /opt/oracle/product/11.2.0/network/admin
NAMES.DIRECTORY_PATH=(TNSNAMES)
NAMES.DEFAULT_DOMAIN=WORLD
SQLNET.AUTHENTICATION_SERVICES = (NTS)
And this is my tnsnames.ora
BatchInsert=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = XE)
))
How to write the entry for it so I can run it from .bat file?
Your sqlnet.ora sets a default domain name of WORLD, so your tnsnames entry needs to have that too:
BatchInsert.WORLD=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SID = XE)
))
You should then be able to tnsping and connect using either batchinsert or batchinsert.world.
Alternatively you can remove the NAMES.DEFAULT_DOMAIN=WORLD line from your sqlnet.ora, but you may have other things already that expect that to be set.
This has nothing to do with SQL Developer unless you want to use that TNS alias in a connection definition, rather than using a Basic connection. If you already have a TNS entry for XE you can just use that, without defining a new entry pointing to the same service/SID.
SQL Developer doesn't by default read SQLNet.ORA
Easy fix, in Preferences, point to the directory for your TNSNames files.
If you enable THICK Driver connections and have your $ORACLE_HOME os var set, then SQLDev should see and use your SQLNet.ORA file for connectivity stuff.

Oracle SQL Developer: Failure - Test failed: The Network Adapter could not establish the connection?

Problem
Please note that I changed details for security purposes. However, the problem remains intact.
I installed an Oracle 11g database on a server at location, say, herp-devDV.derp.edu.
Now I have another Oracle 11g database on a server at location, say, derp-db.derp.edu.
I entered the connection name, username, password, hostname, and service name in Oracle SQL developer for both herp-devDV.derp.edu and derp-db.derp.edu. I can connect to schema in derp-db.derp.edu, but not herp-devDV.derp.edu. It gives me this message:
Failure - Test failed: The Network Adapter could not establish the connection
Details
I have the following information:
Port 1521 is not open for either server when I telnet
My listener is up and running for both.
I can access derp-db.derp.edu on Oracle SQL Developer.
Oracle client is on my local machine + Oracle SQL Developer
I can remote desktop to both servers
What I have done
Googled
Stackoverflow
Ran stop and start lnrctl commands
On herp-devDB.derp.edu I ran lsnrctl status
I received the following output
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date 03-JUN-2014 13:37:22
Uptime 6 days 0 hr. 53 min. 4 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\oracle\product\11.2.0\dbhome_1\network\admin\listener.ora
Listener Log File d:\oracle\diag\tnslsnr\HERP-DEVDB\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HERP-DEVDB.derp.edu)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "HERPDEVDBXDB" has 1 instance(s).
Instance "herpdevdb", status READY, has 1 handler(s) for this service...
Service "herpdevdb" has 1 instance(s).
Instance "herpdevdb", status READY, has 1 handler(s) for this service...
The command completed successfully
I then check out my listener.ora and find
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\oracle\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\oracle\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = HERP-DEVDB.derp.edu)(PORT = 1521))
)
)
At this point, I confess I am scratching my head as I don't see anything sticking out and telling me why this should not be working.
The only clue is when I check derp-db.derp.edu and run the command lsnrctl status. Please
see excerpt below:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DERP-DB.edu)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.3.0 - Production
Start Date 18-MAY-2014 02:19:01
Uptime 22 days 12 hr. 23 min. 18 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
---etc----
So I am still scratching my head. Why would derp-db be connecting to the DERP-DB.edu but herp-devDB is connecting to EXTPROC1521? How do I fix this? The listener.ora and other files between these two servers are almost identical except for the name of the instances.
Hmmm.
EDIT1: I changed the listener.ora in herp. This didn't fix it.
EDIT2: I cannot telnet into derp-db.derp.edu on port 1521. But I can still connect to it with SQL Developer? Wth?
EDIT3 I cannot telnet into herp-devdb.derp.edu on port 1521 either.
EDIT4 I cannot ping IP addresses of either server.
Anyway assistance would be greatly appreciated. Thanks
Regards,
Geeky
I am answering this for the benefit of future community users. There were multiple issues. If you encounter this problem, I suggest you look for the following:
Make sure your tnsnames.ora is complete and has the databases you wish to connect to
Make sure you can tnsping the server you wish to connect to
On the server, make sure it will be open on the port you desire with the specific application you are using.
Once I did these three things, I solved my problem.
I had a similar issue where I also continuously got the same error. I tried many things like changing the listener port number, turning off the firewall etc. Finally I was able to resolve the issue by changing listener.ora file. I changed the following line:
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
to
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
I also added an entry in the /etc/hosts file.
you can use Oracle net manager to change the above line in listener.ora file. See Oracle Net Services Administrator's Guide for more information on how to do it using net manager.
Also you can use the service name (database_name.domain_name) instead of SID while making the connnection.
I Hope it helps.
I just had same issue when I installed the oracle 11g and then creating the database.
I don't even know that the listener has to create manually.
Hence, I open Net Configuration Assistant and manually create the listener.
And I can connect the database that I created locally through sql developer.
I solved this by writing the explicit IP address defined in the Listener.ora file as the hostname.
So, instead of "localhost", I wrote "192.168.1.2" as the "Hostname" in the SQL Developer field.
In the below picture I highlighted the input boxes that I've modified:
I solved just by: given correct host and port
so:
Open oracle net manager
Local
Listener
in Listener on address 2 then copy host to Oracle Developer
finally connect to oracle
You can locate a file named listener.ora under the installation folder oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
It contains the following entries
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = Codemaker-PC)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
You should verify the HOST (Here it is Codemaker-PC) should be the computer name. If it's not correct the change it as computer name.
then try the following command on the command prompt run as administrator,
lsnrctl start
Curiously, I was able to solve the same issue by doing the exact opposite move to svc's ! I had to :
1) replace the FQDN hostname in my tnsnames.ora / listener.ora files with localhost, and restart the listener service, and
2) two, I had to use "SYS as SYSDBA" as the username in the SQL Developer input textbox
to finally be able to have SQL Developer hook to my local instance.
only start listner then u can connect with database.
command run on editor:
lsnrctl start
its work fine.
I faced the same problem.
I had to turn off my firewall, then it worked.
You could also open the port:
http://windows.microsoft.com/en-in/windows/open-port-windows-firewall#1TC=windows-7
This worked for me. may help some one. Turn off firewall. on RHEL 7
systemctl stop firewalld
For me, the HOST was set differently in tnsnames.ora and listener.ora.
One was set to the full name of the computer and the other was set to IP address.
I synchronized them to the full name of the computer and it worked. Don't forget to restart the oracle services.
I still don't understand exactly why this caused problem because I think IP address and computer name are ultimately same in my understanding.

ORA-12154: TNS:could not resolve the connect identifier specified

I am trying to connect to oracle 11g installed on Linux EL 5 and and getting the following error
SQL> connect sys/password#ud06 as sysdba
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
my listener.ora under network/admin is as follows
LISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=ud06)(PORT=1521))
(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=orcl)
(ORACLE_HOME=/home/oracle/app/oracle/product/11g)
(SID_NAME=orcl))
(SID_DESC=
(SID_NAME=plsextproc)
(ORACLE_HOME=/home/oracle/app/oracle/product/11g)
(PROGRAM=extproc)))
MY tnsnames.ora is as follows
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
UD06=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ud06)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
MY lsnrctl status shows as follows:
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ud06.us.server.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 17-FEB-2010 16:23:06
Uptime 0 days 0 hr. 12 min. 33 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/app/oracle/product/11g/network/admin/listener.ora
Listener Log File /home/oracle/app/oracle/product/11g/log/diag/tnslsnr/ud06/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ud06.us.server.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=extproc)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
Service "plsextproc" has 1 instance(s).
Instance "plsextproc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
The answer to this problem is very simple. Do not worry about the .ora files or any other configuration. Oracle does all these just perfect.
Only while connecting via command line, it gets confused with passwords that have a # symbol in them.
Therefore while connecting through command line SQL, do not use a password with a '#' in it. Just use the web interface to create an account having a password without an '#' symbol in it.
That is!! Problem solved. I had been breaking my head for quite a few days, and now my problem is solved!!
Can you ping ud06 successfully (as ud06, not ud06.us.server.com)?
What does the command
lsnrctl services
show?
EDIT:
It sounds to me like maybe the database instance name isn't actually "orcl"? What the lsnrctl services output tells me is that the "orcl" service, although defined in the listener.ora file, is not actually running.
Can you log on with a direct connection on the server? If so, what do you use as the ORACLE_SID environment variable value? Log in as the SYS user and issue the command:
ALTER SYSTEM REGISTER;
Then issue the lsnrctl services command again and see if an additional instance doesn't show up.
Also, as Alex points out, the tnsping command is reporting a fully qualified service name. Edit the sqlnet.ora file and set the NAMES.DEFAULT_DOMAIN value to NULL if it has a value.
EDIT 2: Does tnsping ud06 on the server work? Or is my assumption that client and server are on different systems wrong?
The SERVICE_NAME in the tnsping output doesn't match the entry in tnsnames.ora; is that file from the Windows box or the Linux box? It looks like you don't have a local (Windows) tnsnames.ora entry for u06 and it's guessing what the service name should be expanding it - I think that's what the reference to the hostname adapter means.
I also run into ORA-12154: TNS:could not resolve the connect identifier specified, and adding the user trying to connect to the oinstall group of oracle fixed it.
first try whether the oracle instance is started :
for windows:
start->configuration panel-> administration touls->Services->ORACLESERVICEORCL(my instance by the way)->start
Provide the connection string like this:
ServerName:port/ServiceName;User Name;Password
I was also facing the same error, try this code:
SQL> conn hr/hr #pdborcl;
and if you find same error, it means that you have a different pluggable database name.
Check the pluggable database name by just writing the following command in sqlplus
sql> SELECT name, con_id FROM v$pdbs;
I fixed this problem using this steps.
First of all, this error occured , if you didn't install same directory or drive.
But the answer is here.
Login windows as a Adminstrator.
Go to Control Panel.
System Properties and click Enviroment
Find the OS variable and change name as a "TNS_ADMIN"
And change the value as a "tnsnames's directory address"
Restart the system.
Congrulations.

Resources