暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle 12c Pro * C预编译器不再支持ezconnect语法?

askTom 2017-02-20
377

问题描述

嗨,汤姆,

Oracle是否在12c Pro * C预编译器的userid = 选项中删除了对ezconnect connect语法的支持?

我最近尝试更新使用即时客户端和我随即时客户端下载的预编译器 (instantclient-precomp-linux.x64-12.1.0.2.0.zip) 编译的Pro * C应用程序。然而,当我去重新编译我的。使用我通常的sqlcheck = symantics和userid = login/password @ // server/service选项的pc文件,我一直收到PCC-F-02104错误。我能够使用相同的连接字符串使用instantclient-sqlplus进行连接。当我切换回11gR2瞬间时,一切又恢复了。

我尝试了不同的变体,并使用wireshark查看 “proc” 是否甚至试图连接到数据库服务器。不是。但是,如果我删除了 “//” 作为user/pass @ server/service,那么我确实看到了对数据库服务器的请求,但没有任何服务信息,因此被拒绝了。

这是一个已知的问题?

谢谢,

斯科特

专家解答

我已经复制了你的问题

[oracle@vbgeneric ~]$ touch x.pc
--
-- works with TNS
--
[oracle@vbgeneric ~]$ proc userid=scott/tiger@np12 sqlcheck=full iname=x.pc oname=x.c

Pro*C/C++: Release 12.1.0.2.0 - Production on Mon Feb 20 22:14:52 2017

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

System default option values taken from: /u01/app/oracle/product/12.1.0.2/db_1/precomp/admin/pcscfg.cfg

--
-- not with EZ
--

[oracle@vbgeneric ~]$ proc userid=scott/tiger@//192.168.1.10:1522/np12 sqlcheck=full iname=x.pc oname=x.c

Pro*C/C++: Release 12.1.0.2.0 - Production on Mon Feb 20 22:15:14 2017

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

System default option values taken from: /u01/app/oracle/product/12.1.0.2/db_1/precomp/admin/pcscfg.cfg

PCC-F-02104, Unable to connect to Oracle

--
-- but sqlplus fine
--

[oracle@vbgeneric ~]$ sqlplus scott/tiger@//192.168.1.10:1522/np12

SQL*Plus: Release 12.1.0.2.0 Production on Mon Feb 20 22:16:59 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Mon Feb 20 2017 22:14:54 -05:00

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Advanced Analytics
and Real Application Testing options

复制


不幸的是,医生刚刚说

“要连接到Oracle服务器,请使用语法在命令行上指定USERID选项: USERID = username/password”

所以那里有些模棱两可。我建议你在支持下打个电话。

作为一种变通方法,你可以尝试

两个任务 = // 等等/服务
proc用户id = 用户/通过


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论