在 Pervasive SQL 9 中选择数据库名称
我一直在寻找,但似乎找不到解决方案。
我想查询 Pervasive 引擎以查看 Pervasive 引擎上托管的数据库数量和名称。
我这样做的实际目的是创建一个到 MSSQL 2008 R2 的无 DSN 链接服务器。 原因是数据库文件托管在与我尝试查询它的服务器不同的服务器上。
托管解决方案后,我无法读取/写入注册表。 (通过注册表获取数据库名称)。
我曾尝试访问远程计算机的注册表(在控制台环境中工作),但一旦我通过 IIS 执行此操作(当站点托管时),它就不允许我访问。我不想允许注册表连接到正在运行 Pervasive Server 的服务器
我已经尝试了所有常用的“从 INFORMATION_SCHEMA.Databases 中选择 *”或“DESCRIBE 数据库”,
但它们都不起作用!
请帮助我创建一个 DSN Less LinkedServer 并查询数据库。
提前致谢!
I have been searching all over and i cant seem to find a solution.
I want to query the Pervasive engine to see how many and what are the names of the databases hosted on the Pervasive engine.
my actual purpose for doing this is to create an DSN-Less Linked Server to MSSQL 2008 R2.
Reason being that the Database files is hosted on a different server than where i am trying to query it.
I cannot read/write to the registry once the solution is hosted. (To get the database names through the registry).
I have tried accessing the remote computer's registry, (which works in a Console environment) but as soon as i do it through IIS (when the site is hosted), it doesn't allow me. I Do not want to allow registry connections to that server where Pervasive Server is running
I Have tried all the usual "SELECT * from INFORMATION_SCHEMA.Databases" or "DESCRIBE Databases"
None of the them work!
Please help me create a DSN Less LinkedServer and query the databases.
thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 PSQL 中查询数据库名称的唯一方法是使用 DTI 或 DTO 接口。具体来说,您可以使用 PvGeDbName 函数或 DtoDatabase DTO 中的对象。
有人谈论过一个系统存储过程来列出数据库名称,但据我所知它尚未实现,并且只有在 PSQL v11 或更高版本中可用(如果实现)。
The only way to query the database names in PSQL is to use the DTI or DTO interfaces. Specifically, you would use the PvGeDbName function in DTI or the DtoDatabase object in DTO.
There has been talk of a system stored procedure to list the database names but as far as I know it has not been implemented and would only be available in PSQL v11 or later if it is.