Click here to Skip to main content
15,867,308 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have created an application with vs 2010 and .net framework 4.0
it works fine with localhost. but error occurs when , exe project runs under a local network system.

error is


ORA-12541: TNS:no listener





below show the details

My app.cofig file connection string is

SQL
connectionString="Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Ipadressofmysystem)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));
User Id=system;Password=admin1234;"/>



Tnsname.ora file contains


# tnsnames.ora Network Configuration File: C:\app\Administrator\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)
)
)

Please help me out for the solution... as im new to oracle database.
Thanking you
Posted
Updated 26-Jun-14 22:45pm
v2
Comments
DamithSL 27-Jun-14 5:08am    
is this web application? are you testing and developing on same PC? have you tried with some other account with high privileges like admin account?
Sidharth R 27-Jun-14 5:10am    
nope it is an exe project in which oracle is installed in one of the local LAN Network which ip is 192.16X.XX.XX

1 solution

The specific problem is that "localhost" will only access server instances on the computer that is running the software that tries to access the DB. That works fine in development, when Oracle is loaded on your dev box, but in production you need to connect to a "proper" instance.

Try looking here: http://www.connectionstrings.com/oracle/[^] it may help you decide what you need to have in your connection details.
 
Share this answer
 
Comments
Sidharth R 27-Jun-14 5:13am    
i have checked the site before itself .. but i was not able to get a solution.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900