oracle服务器连接字符串,.Net连接oracle数据库连接字符串

.NET Framework Data Provider for OracleType:    .NET Framework Class LibraryUsage:  System.Data.OracleClient.OracleConnectionManufacturer:  MicrosoftStandardData Source=MyOracleDB;Integrated Security=yes;This one works only with Oracle 8i release 3 or later Specifying username and passwordData Source=MyOracleDB;User Id=yyty;Password=yytyt;Integrated Security=no;This one works only with Oracle 8i release 3 or later Omiting tnsnames.oraThis is another type of Oracle connection string that doesn't rely on you to have a DSN for the connection. You create a connection string based on the format used in the tnsnames.ora file without the need to actually have one of these files on the client pc.SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));uid=yyty;pwd=yytyt;  Some reported problems with the one above and Visual Studio. Use the next one if you've encountered problems.Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=yyty;Password=yytyt;  Using Connection PoolingThe connection pooling service will create a new pool if it can't find any existing pool that exactly match the new connections connection string properties. If there is a matching pool a connection will be recycled from that pool.Data Source=myOracleDB;User Id=yyty;Password=yytyt;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;The first connection opened creates the connection pool. The service initially creates the number of connections defined by the Min Pool Size parameter.

The Incr Pool Size attribute defines the number of new connections to be created by the connection pooling service when more connections are needed.

When a connection is closed, the connection pooling service determines whether the connection lifetime has exceeded the value of the Connection Lifetime attribute. If so, the connection is closed; otherwise, the connection goes back to the connection pool.

The connection pooling service closes unused connections every 3 minutes. The Decr Pool Size attribute specifies the maximum number of connections that can be closed every 3 minutes. Windows AuthenticationData Source=myOracleDB;User Id=/;  Privileged ConnectionWith SYSDBA privilegesData Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSDBA;http://www.connectionstrings.com/oracle#p19 Privileged ConnectionWith SYSOPER privilegesData Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSOPER;  Utilizing the Password Expiration functionalityFirst open a connection with a connection string. When the connection is opened, an error is raised because the password have expired. Catch the error and execute the OpenWithNewPassword command supplying the new password.Data Source=myOracleDB;User Id=yyty;Password=yytyt;

oConn.OpenWithNewPassword(sTheNewPassword);   Proxy AuthenticationData Source=myOracleDB;User Id=yyty;Password=yytyt;Proxy User Id=pUserId;Proxy Password=pPassword;

小编推荐:欲学习电脑技术、系统维护、网络管理、编程开发和安全攻防等高端IT技术,请 点击这里注册账号,公开课频道价值万元IT培训教程免费学,让您少走弯路、事半功倍,好工作升职加薪!

免责声明:本站系公益性非盈利IT技术普及网,本文由投稿者转载自互联网的公开文章,文末均已注明出处,其内容和图片版权归原网站或作者所有,文中所述不代表本站观点,若有无意侵权或转载不当之处请从网站右下角联系我们处理,谢谢合作!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值