Overview
This article provides you with examples of the connection strings used to connect to some common Oracle database data providers. It is worthy to note that each connection is different, therefore it is usually up to the server administrator to create and deploy the correct connection string for each application, user account, and type.
ODBC Provider
Copy Code Old Version |
|
|---|---|
"Driver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;"
|
|
| New Version | |
|---|---|
"Driver={Microsoft ODBC for Oracle};Server=myOracleServerAddress;Uid=myUsername;Pwd=myPassword;" |
|
OLE DB, OleDbConnection (.NET 2.0)
Copy Code Standard Security |
|
|---|---|
"Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;" |
|
Copy Code Trusted Connection |
|
|---|---|
"Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;" |
|
OracleConnection (.NET 2.0)
Copy Code Standard Security |
|
|---|---|
"Data Source=MyOracleDB;Integrated Security=yes;" |
|
Note |
|---|
| You must have Oracle 8i release 3 or later to use the above connection string. |
Note