asp oracle连接字符串,连接字符串从经典的asp连接到oracle 11g(Connection string to connect to oracle 11g from classic as...

连接字符串从经典的asp连接到oracle 11g(Connection string to connect to oracle 11g from classic asp)

我使用ODBC数据源管理器设置ODBC连接。 我已将它命名为“BIOTPL”,如下所示:

fXfEV.png

相应的代码是:

Set Conn = Server.Createobject("ADODB.Connection")

Conn.Open "Provider=OraOLEDB.Oracle;Data Source=simple_dsn;User Id=USER;Password=PASSWORD;"

但我得到这个错误。

ORA-12154: TNS:could not resolve the connect identifier specified

我怎样才能解决这个错误? 请帮帮我 。

I set up an ODBC connection using ODBC Data Source Administrator . I have named it "BIOTPL" connect like this:

fXfEV.png

The corresponding code is :

Set Conn = Server.Createobject("ADODB.Connection")

Conn.Open "Provider=OraOLEDB.Oracle;Data Source=simple_dsn;User Id=USER;Password=PASSWORD;"

But I am getting this error .

ORA-12154: TNS:could not resolve the connect identifier specified

How can I solve this error ? Please help me .

原文:https://stackoverflow.com/questions/42049109

更新时间:2019-12-26 04:44

最满意答案

以下代码适用于我。

Set Conn = Server.Createobject("ADODB.Connection")

Conn.open "Driver={Oracle in OraDb11g_home1};Server=10.11.201.170; Uid=USER;Pwd=PASSWORD;"

The following code works for me .

Set Conn = Server.Createobject("ADODB.Connection")

Conn.open "Driver={Oracle in OraDb11g_home1};Server=10.11.201.170; Uid=USER;Pwd=PASSWORD;"

2017-02-05

相关问答

Oracle数据库创建用户 在dba权限的用户下执行命令"create user 用户名 identified by 密码;" 用这个命令创建的用户还不能登录,需要进行授权 赋予connect和resource权限 grant connect,resource to 用户名;

我不认为你可以将所有Oracle内容放在连接字符串中,但无论如何看起来ODBC驱动程序管理器要么被连接字符串搞糊涂了,要么你没有安装Microsoft ODBC for Oracle驱动程序。 如果您安装了该驱动程序,那么计算连接字符串的简单方法是:a)使用驱动程序管理器对话创建DSN,b)测试它是否正常工作c)使用DSN = mydsn连接代码d)检查输出连接字符串SQLDriverConnect可以返回(即C API,但我在C#中假定您可以获得相同的信息)。 然后,您可以删除DSN并使用为无D

...

从评论中@searchAnResQ的一条建议,我让我们的oracle团队重做了存储过程,以返回一个Ref Cursor,这似乎是个窍门。 我发现返回表格不受我们正在使用的ODAC版本的支持。 From a suggestion by @searchAnResQ in the comments I had our oracle team redo the stored procedure to return a Ref Cursor and that seemed to do the trick.

...

端口1158用于DbConsole接口,不适用于JDBC。 JDBC应连接的Oracle侦听器的默认端口是端口1521 。 Port 1158 is for the DbConsole interface and won't work with JDBC. The default port for the Oracle listener to which JDBC should connect is is port 1521.

您可以在计算机上下载Oracle XE(Express Edition) 。 从理论上讲,它不应该那么重。 我没有找到11g的XE,但是对于课程作业来说,差异不应该是显而易见的。 You can download Oracle XE (Express Edition) on your machine. Theoretically it should not be that much heavy. I don't find a XE for 11g, but the differences shou

...

以下代码适用于我。 Set Conn = Server.Createobject("ADODB.Connection")

Conn.open "Driver={Oracle in OraDb11g_home1};Server=10.11.201.170; Uid=USER;Pwd=PASSWORD;"

The following code works for me . Set Conn = Server.Createobject("ADODB.Connection")

Conn.open

...

尝试使用以下无DSN连接字符串: myConn.Open "Provider=MSDAORA;Data Source=instance_name;User ID=myOracleUsername;Password=myOraclePassword"

我已经为旧版本的Oracle客户端使用了这个确切的连接字符串,但是看不出它为什么它也不适用于您的版本的任何原因。 Try using the following DSN-less connection string: myConn.Open "Pro

...

我通过在部署服务器中为oracle 11g安装32位ODAC解决了这个问题。 I resolved this issue by installing 32 bit ODAC for oracle 11g in deployment server.

1. Download msvcp71.dll and msvcr71.dll from the web.

2. Save them to your C:\Windows\System32 folder.

3. Save them to your C:\Windows\SysWOW64 folder as well (if you have a 64-bit operating system).

现在尝试在Python中运行您的代码文件,它将在几秒钟内加载图形。 1. Download msvc

...

模块oracle是npm中最新且功能最丰富的Oracle驱动程序。 它也支持11g版本。 Module oracle is the most updated and feature rich Oracle driver in npm. It supports 11g version as well.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值