.net - Oracle ODP.NET connection string: what goes in Data Source? -


This is ODP. Netting stitching of Net is dot straight, great, but what is the data source?

data source = TORCL; User ID = Some users; Password = son 28dnn;

Is it a DSN in Control Panel?

A server name?

Name of a TNS name service?

thanks

Luke

If you use OndP.NET There are none of an adapter to connect to the Oracle database, which are experimenting with TNS. File to maintain TNS entries Tnsnames.Ora

A sample entry in tnsnames.ora (path for file normally looks like the ORACLE_HOME \ NETWORK \ ADMIN) sample entry below

  TORCL = (DESCRIPTION = (ADDRESS = (ADDRESS = (PROTOCOL = TCP) (HOST = MyHost) (PORT = MyPort))) (CONNECT_DATA = (server = defined) (SERVICE_NAME = MyOracleSID))) < / Code>  

Here is a nickname for the TORCL data source, MyHost is your database server name or IP address, port is the Database Listener Port and MyOracleSID is your Oracle Service

Therefore

  data source = TORCL; User ID = myUsername; Password = myPassword;   

is similar

  data source = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = MyHost) (PORT = MyPort ))) (CONNECT_DATA = (server = defined) (SERVICE_NAME = MyOracleSID))); User id = myUsername; Password = myPassword;    

Comments