protected void Page_Load(object sender, EventArgs e)
{
string orastr = "Data Source=211.211.211.154;User Id=xxxx;Password=xxxxx;Integrated Security=yes";
if (!Page.IsPostBack)
{
OracleConnection conn = new OracleConnection(orastr);
try
{
conn.Open();
conn.Close();
Response.Write("可喜可贺,连接成功");
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}
}
运行结果 提示:ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的 SERVICE_NAME
开发机子 上装了ora的客户端,tns文件也作了配置.不知道问题出在哪.
如果把链接字符串Data Source=211.211.211.154 (服务器ip) 改成Data Source=orcl (数据库名)
则提示ORA-01004: default username feature not supported; logon denied 用户和密码肯定是正确的.
请高手赐教.如果 方便请远程协助一下.谢谢了.QQ:10894810