我是靠谱客的博主 激昂绿茶,最近开发中收集的这篇文章主要介绍oracle sid 连接字符串,C#连接字符串-具有IP地址,端口和sid的Oracle 10g连接,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

I want to connect my WPF application with Oracle database, currently I have tried following connection strings, but these are not working.

I have:

IP address: 172.16.9.18

Port: 1521

SID: SID10

User Id: Scott

Password: Tiger

I tried:

"Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.9.18)(PORT=1521))(CONNECT_DATA=(SID=SID10)));User ID=Scott;password=Tiger;"; //Not working

"Data Source=172.16.9.18:1521/SID10;Persist Security Info=True;User ID=Scott;Password=Tiger;Unicode=True"; //Not working

Where am I going wrong?

Talk2:

No, above solution is taken from there.

Talk3:

Do you get an exception? What does it say?

Talk4:

Do you have/need oracle client software installed? See also stackoverflow.com/questions/3268260/…

Talk5:

Are you posting your credentials here?

Solutions1

Try out something like this:

public string GetConnString(string host,string port,string sid,string user,string pass)

{

return String.Format("SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST={0})(PORT={1}))(CONNECT_DATA=(SID={2})));uid={3};pwd={4};", host, port, sid, user, pass);

}

最后

以上就是激昂绿茶为你收集整理的oracle sid 连接字符串,C#连接字符串-具有IP地址,端口和sid的Oracle 10g连接的全部内容,希望文章能够帮你解决oracle sid 连接字符串,C#连接字符串-具有IP地址,端口和sid的Oracle 10g连接所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(55)

评论列表共有 0 条评论

立即
投稿
返回
顶部