将Excel连接到Oracle [英] Connect Excel to Oracle

查看:78
本文介绍了将Excel连接到Oracle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以从excel(excel-VBA)连接到oracle(在远程服务器中)而无需 在客户端系统中安装oracle客户端...我尝试了所有选项 在下面,但由于应安装oracle客户端而引发错误.

Can we connect from excel (excel-VBA) to oracle(in a remote server) without installing oracle client in the client system... I tried all the options below but it is throwing error as oracle client should be installed.

下面是我使用的连接字符串

below is the connectionstring i have used

1)strConnection = "Provider=OraOLEDB.Oracle;Data Source=SourceName;User Id=Username;
                   Password=password;"  
2)strConnection = "Provider=MSDAORA;Data Source=SourceName;UserId=Username;
                    Password=password;"
3)strConnection = "Provider=MSDAORA.1;User ID=Username/password;Data
                   Source=SourceName;Persist Security Info=False"
4)strConnection = "Driver={Microsoft ODBC for Oracle};SERVER=(DESCRIPTION=
                  (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.6)(PORT=1521)
                 )(CONNECT_DATA (SERVICE_NAME=SERVICEName)));uid=Username;
                   pwd=password;Uid=Username;Pwd=password;"  
5)strConnection = "SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.6)
                   (PORT=1521))(CONNECT_DATA =(SERVICE_NAME=SERVICEName)));
                   uid=Username;pwd=password;"

推荐答案

您需要某种形式的客户端才能连接到本地或远程的Oracle数据库.

You need some form of client to connect to an Oracle database, local or remote.

您有两种选择:

  1. 安装Oracle SQL * Net客户端.如果您的服务器是Oracle 10g或更高版本,则不需要完整的客户端:您可以使用OpenLink 是一个还有其他人.
  1. Install an Oracle SQL*Net client. If your server is Oracle 10g or higher you don't need the full-blown client: you can use the more lightweight Instant Client.
  2. Buy an n-tier ODBC driver which supports generic connectivity. OpenLink is one, there are others.


".我们无法连接到Oracle吗? 仅包含驱动程序的数据库或 操作系统中存在的提供程序(Windows XP)."

".can we not connect to the oracle database with only the Drivers or providers present in our OS(Windows XP).."

这样想:ODBC驱动程序不连接到数据库,它们连接到SQL Net.然后,SQL Net连接到数据库.

Think of it this way: the ODBC drivers do not connect to the database, they connect to SQLNet. Then SQLNet connects to the database.

之间有什么区别 驱动程序,客户端的提供者. "

"what is the difference between Drivers,providers with the client. "

Oracle提供的驱动程序比MS提供的驱动程序更适合Oracle,但是在这种情况下它们是相同的:两者都需要使用Oracle客户端才能工作.

The Oracle provided drivers are better tuned for Oracle than the ones MS provides, but in this context they are the same: both require the presence of an Oracle client to work.

这篇关于将Excel连接到Oracle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆