// 在 C# 代码中用以下数据库提供程序访问 Oracle 数据库
// Oracle Data Provider for .NET / ODP.NET 使用 TNS 写法
Data Source=TORCL;User Id=myUsername;Password=myPassword;
// Oracle Data Provider for .NET / ODP.NET 集成系统安全性写法
Data Source=TORCL;Integrated Security=SSPI;
// Oracle Data Provider for .NET / ODP.NET 不使用 tnsnames.ora 的写法
Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;
// Oracle Data Provider for .NET / ODP.NET 指定连接池参数写法
Data Source=myOracle;User Id=myUsername;Password=myPassword;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;
// .NET Framework Data Provider for Oracle 标准写法
Data Source=MyOracleDB;Integrated Security=yes;
// .NET Framework Data Provider for Oracle 指定用户名和密码
Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;Integrated Security=no;
// .NET Framework Data Provider for Oracle 指定连接池写法
Data Source=myOracleDB;User Id=myUsername;Password=myPassword;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;
// Microsoft OLE DB Provider for Oracle 标准写法
Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;