Oracle ODP.NET数据库访问连接字符串
?
| Connection String Attribute | 默認值 | 描述 |
| Connection Lifetime | 0 | Maximum life time (in seconds) of the connection 當數據庫連接被返回到連接池中時,它的創建時間將與當前時間比較,如果超過了 Connection Lifetime 規定的時間,它將被釋放掉。 為 0 時將被視為最大連接時間。 |
| Connection Timeout | 15 | Maximum time (in seconds) to wait for a free connection from the pool |
| Data Source | empty string | Oracle Net Service Name that identifies the database to connect to |
| DBA Privilege | empty string | Administrative privileges: SYSDBA or SYSOPER |
| Decr Pool Size | 1 | Controls the number of connections that are closed when an excessive amount of established connections are unused |
| Enlist | true | Enables or disables serviced components to automatically enlist in distributed transactions 當此值為 true 時,池中現存的所有數據庫連接將被加入到它的創建線程的 Transaction Context 中。如果不存在這個 Transaction Context 則無任何變化。 |
| Incr Pool Size | 5 | Controls the number of connections that are established when all the connections in the pool are used |
| Max Pool Size | 100 | Maximum number of connections in a? pool |
| Min Pool Size | 1 | Minimum number of connections in a pool |
| Password | empty string | Password for the user specified by User Id |
| Persist Security Info | false | Enables or disables the retrieval of password in the connection string |
| Pooling | true | Enables or disables connection pooling |
| Proxy User Id | empty string | User name of the proxy user |
| Proxy Password | empty string | Password of the proxy user |
| User Id | empty string | Oracle user name |
?
?
?
// C#
...
OracleConnection con = new OracleConnection();
con.ConnectionString = "User Id=scott;Password=tiger;Data Source=oracle;Pooling=true;Enlist=true;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5; Decr Pool Size=2";
con.Open();
...
?
以下網站提供連接字符串大全:
www.ConnectionStrings.com
轉載于:https://www.cnblogs.com/zhumk/archive/2004/12/29/83529.html
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的Oracle ODP.NET数据库访问连接字符串的全部內容,希望文章能夠幫你解決所遇到的問題。