connecting with asp.net
i am using asp.net to create a project and i need a connection string to connect it with an oracle server which is on a lan network.
i know its ip address and port no i will arrange if required.
i saw all the connection string for oracle but i got confused as to which one to chose.
please help.
thanks in advance.
i know its ip address and port no i will arrange if required.
i saw all the connection string for oracle but i got confused as to which one to chose.
please help.
thanks in advance.
Try using the ones for the ".NET Framework Data Provider for Oracle" if youre using asp.net.
please provide the whole connection string and values for the parameter also..
thank you
i got the connection string but my problem is that the database is on a server.
i have the ip address and port number for it.
so where will i integrate these 2 parameters in the connection string??
i got the connection string but my problem is that the database is on a server.
i have the ip address and port number for it.
so where will i integrate these 2 parameters in the connection string??
Hi
Either in tnsnames.ora or if you want you can use a string like this one...
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;
Change MyHost and MyPort with serveraddress and port.
Let me know if its working.
Either in tnsnames.ora or if you want you can use a string like this one...
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;
Change MyHost and MyPort with serveraddress and port.
Let me know if its working.
thanks..
i will try it as soon as i can and will let you know..
i will try it as soon as i can and will let you know..
I tried all this options--
---------------------------------------------------------
Dim myConnection As New OleDbConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostip)(PORT=1521))));Provider=msdaora;User Id=user;Password=pass;")
at first i didnt put the provider then it resulted into an error [An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;]
so i placed th provider as msdaora and then it started showing a different error as["ORA-12154: TNS:could not resolve the connect identifier specified"]
---------------------------------------------------------
then i tried this---
Dim myConnection As New OleDbConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostip)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));Provider=msdaora;User Id=user;Password=pass;")
and got this error [ORA-12514: TNS:listener does not currently know of service requested in connect descriptor].
---------------------------------------------------------
another option i tried was
---------------------------------------------------------
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)
Dim myConnection As New OleDbConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.5.12)(PORT=1521))((CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID);Provider=msdaora;User Id=trainee;Password=trainee;")
and got this--
ORA-12154: TNS:could not resolve the connect identifier specified
----------------------------------------------------
please provide me a solution..
---------------------------------------------------------
Dim myConnection As New OleDbConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostip)(PORT=1521))));Provider=msdaora;User Id=user;Password=pass;")
at first i didnt put the provider then it resulted into an error [An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;]
so i placed th provider as msdaora and then it started showing a different error as["ORA-12154: TNS:could not resolve the connect identifier specified"]
---------------------------------------------------------
then i tried this---
Dim myConnection As New OleDbConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostip)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));Provider=msdaora;User Id=user;Password=pass;")
and got this error [ORA-12514: TNS:listener does not currently know of service requested in connect descriptor].
---------------------------------------------------------
another option i tried was
---------------------------------------------------------
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)
Dim myConnection As New OleDbConnection("Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.5.12)(PORT=1521))((CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID);Provider=msdaora;User Id=trainee;Password=trainee;")
and got this--
ORA-12154: TNS:could not resolve the connect identifier specified
----------------------------------------------------
please provide me a solution..
You are using the wrong provider.
Use this one with the connection string instead.
http://www.connectionstrings.com/Providers/net-framework-data-provider-for-oracle
Use this one with the connection string instead.
http://www.connectionstrings.com/Providers/net-framework-data-provider-for-oracle
i did this today
Dim myConnection As OracleConnection = New OracleConnection()
myConnection.ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=myport))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=user;Password=password;"
myConnection.Open()
MsgBox("reading")
myConnection.Close()
and got this error --
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
my guess is that the server does not understands this "MyOracleSID" cos server is the listner and the error msg says that it does not know of service requested in connect descriptor.
what could be wrong..
i tried one more thing..
Dim myConnection As OracleConnection = New OracleConnection()
myConnection.ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=port))(CONNECT_DATA=(SID="db")));User Id=user;Password=pass;"
myConnection.Open()
MsgBox("reading")
myConnection.Close()
it is giving this error--
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
whats wrong?
plz tell me complete connection string and how to use it in asp.net
Dim myConnection As OracleConnection = New OracleConnection()
myConnection.ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=myhost)(PORT=myport))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=user;Password=password;"
myConnection.Open()
MsgBox("reading")
myConnection.Close()
and got this error --
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
my guess is that the server does not understands this "MyOracleSID" cos server is the listner and the error msg says that it does not know of service requested in connect descriptor.
what could be wrong..
i tried one more thing..
Dim myConnection As OracleConnection = New OracleConnection()
myConnection.ConnectionString = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host)(PORT=port))(CONNECT_DATA=(SID="db")));User Id=user;Password=pass;"
myConnection.Open()
MsgBox("reading")
myConnection.Close()
it is giving this error--
ORA-12505: TNS:listener does not currently know of SID given in connect descriptor
whats wrong?
plz tell me complete connection string and how to use it in asp.net
Hi
The values in the string is just example values. You must alter these values to the ones for your server.
For instance you must change the "user" (user id) to a valid user name at your oracle server.
The values that you should change in the example is,
myhost
myport
MyOracleSID
user
password
The values in the string is just example values. You must alter these values to the ones for your server.
For instance you must change the "user" (user id) to a valid user name at your oracle server.
The values that you should change in the example is,
myhost
myport
MyOracleSID
user
password
of cource i did changed those values i changed the ip to the one i have to use and changed the port to "1521" thats the one we r using here.
but still it didn work the same error comes up again and again
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
plz find a way out of it..
but still it didn work the same error comes up again and again
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
plz find a way out of it..
IS MYOracleSID the name of the database..??
i think i have tried that 2 but i think i will give it another go
i think i have tried that 2 but i think i will give it another go
Yes, it means "System ID", but the SID is unique per database.
viki,
did u manage to resolve your error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I have exactly the same problem and I have tried the options suggested in the previous responses.
Regards
did u manage to resolve your error: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
I have exactly the same problem and I have tried the options suggested in the previous responses.
Regards
Viki,
I was finally able to get the connection thru
Data Source=IP:PORT/ServiceName.XXX
XXX is a reference within your serviceName for an example others use world
Hope this works out for you also.
Regards
I was finally able to get the connection thru
Data Source=IP:PORT/ServiceName.XXX
XXX is a reference within your serviceName for an example others use world
Hope this works out for you also.
Regards
Lungisa Duna,
thanks... i will try that....
:)
thanks... i will try that....
:)
Thank you, Lungisa Duna.
I have succeeded connecting oracle11g database in ASP.NET 4.0.
But I have only succeeded in my localhost.
Oracle 11g is installed in localhost.
After succeeding in localhost, I was tried to connect oracle 10g db in other machine.
just here, I failed to do.
I have installed oracle client 11g home2 in my localhost.
why can't I connect the oracle 10g db in other machine?
is the reason the oracle client 11g home2 in my local machine?
What about it?
I will look forward to your correct reply.
Regard . . .
I have succeeded connecting oracle11g database in ASP.NET 4.0.
But I have only succeeded in my localhost.
Oracle 11g is installed in localhost.
After succeeding in localhost, I was tried to connect oracle 10g db in other machine.
just here, I failed to do.
I have installed oracle client 11g home2 in my localhost.
why can't I connect the oracle 10g db in other machine?
is the reason the oracle client 11g home2 in my local machine?
What about it?
I will look forward to your correct reply.
Regard . . .
I want to develope a software and in which i want to connect oracle data base with asp.net
can u please tell me how can i connect oracle database with asp.net.
Thanx in advance.
can u please tell me how can i connect oracle database with asp.net.
Thanx in advance.
my front end is c# asp.net and backend is oracle 9i.
How can i able to connect this two??
please send me step by step solution.
thankyou!
How can i able to connect this two??
please send me step by step solution.
thankyou!
I went round and round trying to get a connections through VBScript. Im running the scripts on Win08 x64 servers running 11g and retrieving data from an old Oracle 8 database.
I finally succeeded using the following connection string -
"Driver={Oracle in OraClient11g_home2};Dbq=MyTNSName;Uid=MyUserID;Pwd=MyPassword;"
OraClient11g_home1 would have worked 2. I have 2 drivers listed from attempting to reinstall the 11g ODBC drivers.
I finally succeeded using the following connection string -
"Driver={Oracle in OraClient11g_home2};Dbq=MyTNSName;Uid=MyUserID;Pwd=MyPassword;"
OraClient11g_home1 would have worked 2. I have 2 drivers listed from attempting to reinstall the 11g ODBC drivers.
Selected Articles
