如何获得隐藏数据库的数据库架构? [英] How to get at the database schema of a hidden DB?

查看:125
本文介绍了如何获得隐藏数据库的数据库架构?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户是牙科诊所,已经购买了一套诊所管理软件.该软件已安装在其本地服务器上,包括患者数据库,日程表和各种医疗记录.现在他们希望我为他们的程序包提供一些未提供的实用程序,为此,我需要能够查询该数据库.

My customer is a dental practice that has bought a piece of practice management software. This software was installed on their local server, including a patient database, a schedule and all manner of medical records. Now they want me to write some utilities for them that aren't provided with their package, and for this I need the ability to query this database.

我尝试致电软件制造商的技术支持( Patterson/EagleSoft ),很难找到任何人了解足够的技术来回答我的问题.据我所知,他们的软件没有API,可以理解的是,他们不愿意告诉我如何以编程方式直接查询数据库.他们确实有一个交互式查询窗口,但是显然这对编写自动查询不利.他们要做的就是在某个地方有一个SQL Server DB,但是要连接到它的ODBC驱动程序是SQL Anywhere驱动程序(是吗?).

I tried calling tech support of the software manufacturers (Patterson/EagleSoft), and it's difficult finding anyone who understands the technology enough to answer my questions. As far as I can tell, there's no API for their software, and understandably they're reluctant to tell me how to query the DB directly, programmatically. They do have an interactive query window, but obviously that's no good for writing automated queries. All that they would let on is that somewhere there's a SQL Server DB, but the ODBC drivers to connect to it are SQL Anywhere drivers (huh?).

所以我在服务器上四处搜寻,找不到任何数据库文件.然后,我发现该安装程序创建了某种专有的虚拟机,该虚拟机仅对EagleSoft软件可见.但是,尽管他们非常擅长在混淆层上隔离数据库,但他们仍然打开了ODBC驱动程序,这实际上是SQL Anywhere连接.

So I searched around on the server and couldn't find any database files. Then I discovered that the installation creates some kind of proprietary virtual machine, which is only visible to the EagleSoft software. But while they've been very good at insulating their DB in layers of obfuscation, they have left open an ODBC driver, which is indeed an SQL Anywhere connection.

现在在引人入胜且冗长的序言之后,这是我的问题:我可以在此ODBC连接上运行哪些查询以查询DB的结构?如果下面是SQL Server DB,则可以使用sysobjects表,但是我不完全了解如何使用SQL Anywhere ODBC连接来连接到MSSQL DB.而且,如果他们误导了我,而且实际上是在下面的SQL Anywhere数据库,那么要在数据库结构上运行哪些查询?

Now after that fascinating and lengthy preamble, here is my question: What queries can I run over this ODBC connection to interrogate the DB as to its structure? If it's a SQL Server DB underneath I could use the sysobjects table, but I don't fully grasp how you can use a SQL Anywhere ODBC connection to connect to a MSSQL DB. And If they were misinforming me and it really is a SQL Anywhere DB underneath, what are the queries to run to get at the DB structure?

如果还有其他人成功地实际查询了EagleSoft(或任何类似的专有软件包),请告诉我您是如何做到的!

And if there's anyone else out there who's ever succeeded in actually querying EagleSoft (or any similar proprietary package) - please tell me how you did it!

推荐答案

最简单的方法是使用OdbcDbConnection编写一个小应用程序,然后使用随该软件安装的DSN进行连接.进行了一次探查'select * from sysobjects'才发现它确实是所有这些内容之下的MS-SQL数据库,我很高兴从那里开始!

Turns out the simplest way to do it was to write a little app using OdbcDbConnection, and connect using the DSN installed with the software. It took one probing 'select * from sysobjects' to reveal that it is, indeed a MS-SQL database underneath all that, and I'm good to go from there!

这篇关于如何获得隐藏数据库的数据库架构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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