codesmith6.5 oracle驱动,CodeSmith6.5连接Oracle数据库(win7 64位)

CodeSmith6.5不像前几个版本,需要用户手动添加oracle驱动,内部已经集成了oracle的驱动。

网上遇到很多win7 64位机子使用CodeSmith连接oracle的时候出现错误如下:

Attempt to load Oracle client libraries threw BadImageFormatException.  This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.

An error of type "InvalidOperationException" occurred while attempting to populate schema information.  Please check your data source settings and try again.

这是因为在64位的机器上使用了32位的oracle客户端连接,导致连接失败。

解决方案:安装oracle的64位客户端连接

需要用到的文件(64位系统):(32位系统对应下载32位客户端)

instantclient-basic-windows.x64-11.2.0.3.0.zip

instantclient-jdbc-windows.x64-11.2.0.3.0.zip

instantclient-odbc-windows.x64-11.2.0.3.0.zip

instantclient-sqlplus-windows.x64-11.2.0.3.0.zip

也可以点此下载,里面富有说明文档和这四个文件:

解压缩文件到同一目录

2设置环境变量

NLS_lANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK

TNS_ADMIN=E:\Oracle\instantclient_11_2

Path=E:\Oracle\instantclient_11_2;

将tnsnames.ora放在客户端根目录下

tnsnames.ora内容可参考:

ORCL=

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST =127.0.0.1)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = ORCL)

)

)

64位系统PL/SQL配置

(需要下载32位的Oracle11gInstantClient,解压到单独目录)

打开Pl/SQL,首选项-Oracle-连接-OCI库-里面输入32位客户端oci.dll详细路径

0818b9ca8b590ca3270a3433284dd417.png

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值