I am using Mobile Terminal which is connected to database.
I am able to successfully log in to the database with my Mobile Terminal. But while scanning the barcode, I am getting ORA-12154 issue.
I have checked all the configuration files related to this issue, everything looks good.
Not sure why I am getting this issue while using some functionality in between but while I am successfully able to connect to the database.
What log files or configuration files do I need to check?.
EDIT:
tnsnames.ora
DEV = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = DEVMC)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DEV) ) )
sqlnet.ora :
SQLNET.AUTHENTICATION_SERVICES= (NTS) NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
listener.ora
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = DEVMC)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) )
and I have all these files under TNSADMIN directory
Related
i have install oracle 11g and apex 18.2 in my desktop computer, apex is running successfully in this computer with 'localhost' and '127.0.0.1' but unable to run in this desktop ip say 192.168.0.1. i have validate listener i.e
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST= HOSTNAME)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
my listener in listener.ora is
LISTENER = (DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = HOSTNAME)(PORT = 1521))
) )
DEFAULT_SERVICE_LISTENER = (XE)
apex fail to load and raise 'This site can’t be
reached192.168.0.1 refused to connect.'
i change the host with ip 192.168.0.1. with;
LOCAL_LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.1)(PORT = 1521))
)
)
listener stat is
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HOSTNAME)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8080))(Presentation=HTTP)(Session=RAW))
but still it say;
apex fail to load when and raise 'This site can’t be
reached192.168.0.1 refused to connect.'
please guide.
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
above statement solve my issue.
refere https://docs.oracle.com/cd/E17781_01/server.112/e18804/network.htm#ADMQS171
I have already set up an Oracle Database but I am facing a connectivity problem in the below manner:
sqlplus CISADM/CISADM#<IP>:1521/PSRM
sqlplus CISADM#PSRM
With the above two options I successfully connect to the database. Although, when I try to connect as:
sqlplus CISADM#<IP>:1521/PSRM
I get the following error :
ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA
I can perform ping either with IP, or hostname, tnsping with IP and hostname successfully.
My tnsnames.ora file:
PSRM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP>)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PSRM)
)
)
My sqlnet.ora file:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
I am connecting from client PC to a Database which is located in a VM. The above files are from client
Files from VM, where Database is hosted:
tnsnames.ora:
PSRM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP>)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PSRM)
)
)
listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <IP>)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
Any ideas?
You should run it like this :
sqlplus CISADM#\"<IP>:1521/PSRM\"
Important: The \" in the beginning and end of the server:port/service is part of the syntax.
I created two databases one called test and one that is called archivio. The SID is equals to name. I also created a listener for SID test that responds on port 1521 and one for the SID archivio that should answer on port 1522.
I have verified that the services are active
the first listener works properly. The second, reported to the archivio database, does not work. I perform the test using net manager. The error message is:
the listener is not currently aware of the service requested in connect descriptor
with oracle sql developer i can connect to db archivio if i use local instead of base type connection
Other info:
windows 7 ultimate oracle 12c
LISTNER.ORA
# listener.ora Network Configuration File: C:\Program Files (x86)\Common Files\Quest Shared\instantclient-basic-windows.x64-11.2.0.4.0\listener.ora
# Generated by Oracle configuration tools.
LISTENER1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-PC)(PORT = 1522))
)
ADR_BASE_LISTENER1 = C:\app\cirom
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-PC)(PORT = 1521))
)
ADR_BASE_LISTENER = C:\app\cirom
ADR_BASE_LISTENER1 = C:\app\cirom
TNSNAMES.ORA
# tnsnames.ora Network Configuration File: C:\Program Files (x86)\Common Files\Quest Shared\instantclient-basic-windows.x64-11.2.0.4.0\tnsnames.ora
# Generated by Oracle configuration tools.
ARCHIVIO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-pc)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = archivio)
)
)
LISTENER_TEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
LISTENER_ARCHIVIO =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-pc)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
In order to get an Oracle instance registered on a listener running on not default port (not TCP 1521) you have to configure the LOCAL_LISTENER parameter, for example:
(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1522))
The command is:
alter system set local_listener='(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1522))' scope=both;
Change hostname with you hostname.
Then restart you database or issue the command:
alter system register;
Giovanni
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 need to develop in PL SQL using PL/SQL developer but I don't have idea how to make both oracle 11g and pl/sql developer work in the same machine because pl/sql developer need 32 bit oracle client installed when oracle did not require client when we work in local machine.
This is what I did:
1) I installed oracle 11g 64 bit Enterprise on drive d:\
2) Then I installed oracle client 32 bit on drive c:(pl/sql developer can work only with 32 bit version of oci.dll)
3) After I went to the client_home%->Network->Admin folder and corrected tnsname.ora file and wrote there my connection setting which was copied from my oracle 11 g home_dir..tnsnames.ora
MyOracle =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
After I installed PL/SQL developer in c:\plsqldev\ and rebooted my machine.
So now I can connect to my database with sql*plus located in my oracle database directory , but when I try to connect to my oracle with my client sql*plus it says tns protocol error when I try to connect using pl/sql developer it says could not resolve the connection identifier specified. What should I do? Could you help me please
Added:
I erased TNSNAMES parameter from NAMES.DIRECTORY_PATH (in both - server and client sqlnet.ora files) and now when i login it says: ora-12154 tns could not resolve the connect identifier specified , but it still sucessfully connecting to DB when i try to connect with SERVER - s sql*plus.
Here is my config files:
**servers listener.ora **
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\Light\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\Light\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\Light
servers sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (NONE)
NAMES.DIRECTORY_PATH= (HOSTNAME)
servers tnsname.ora
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)
)
)
Clients sqlnet.ora
SQLNET.AUTHENTICATION_SERVICES= (NONE)
NAMES.DIRECTORY_PATH= (HOSTNAME)
Clients tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
ADD:
Yess!)) Finally i found the solution: :)
We need to use server's config file instead of clients one - but the oci.dll(32bit) must be taken from clients directory. I will describe the basic steps - how i made pl/sql developer 10.0.2 work with locally installed Oracle 11.2 x64:
1) Fist we need to install Oracle (I installed it to d:\app)
2)Then wee need to download and install oracle instant client (i founded that there are not any config files (not even network->admin directory) in the instant client , just needed dll's like oci.dll and etc.. note: the first time i've choosen "administrator" one which have it's own config file inside, seems this kind of client is needed only for remote access to Oracle). I installed(unpacked) my instant client to c:\app\ ;
3) Open PL/SQL developer , go to tools->preferences->connection and set the "Oracle Home" filed to the home directory of your instant client (I puted c:\app), but usually it already exist in the drop down list and we just need to click the drop down list and choose OraClient11g_home1_32bit , by this way i set the oci library path(choosen from drop down list). Click apply and exit from pl/sql developer;
4) Now we need to create two environment variables(the fist one will show the path to folder with connection configs , the second the language(if i'm not right please correct me)) ->
TNS_ADMIN = %SERVER_HOME%\NETWORK\ADMIN\ (i puted D:\app\Light\product\11.2.0\dbhome_1\NETWORK\ADMIN)
TNS_LANG = AMERICAN_CIS.CL8MSWIN1251
5) Reboot (optionally) and then start pl/sql developer - there must be three connection alias , i choosed orcl , entered my login ,password and hiited OK and everything worked )));
Thank's to everyone who answered in this topic, hope it'll help someone
check the port name in tns file it sholud be 1521 and where XE is my local db name
like this E =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Shantu)(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)
)
)