如何检索 Oracle 服务器排序规则以设置链接服务器
经过在这里和网上搜索后,我终于决定发布这个问题。我正在运行 SQL 2000 服务器,并链接 Oracle 9i 服务器。当我运行查询时,甚至使用 OPENQUERY 方法从 Oracle 链接服务器(使用 Microsoft OLE DB 驱动程序和 Oracle OLE DB 驱动程序)进行更新和插入时,一切都工作正常。 问题是,为了稍微清理代码,我想在查询中使用四个部分名称。我在查询其他 SQL 链接服务器时也会这样做。
但是,当我使用四个部分名称对 Oracle 运行查询时,出现此错误:(我正在翻译西班牙语的错误消息。可能英语中的原始消息 id 不同)
错误:OLE DB 'MSDAORA' 返回了无效的列定义。 错误代码:7318
经过一番挖掘,我了解到这可能与 nos 在链接服务器属性中设置了正确的排序规则名称有关。
现在...我不是Oracle专家,所以我需要找出我在Oracle中连接到使用的模式是什么排序规则(应用程序...是的,我知道,我知道...)
所以,简单的问题是...我如何找出 Oracle 使用的排序规则?我可以通过 Toad 访问 Oracle 服务器...是否可以运行任何查询来找出这一点?
谢谢!
After searching here and on the web, I finally decided to post the question. I am running an SQL 2000 server, and linked an Oracle 9i server. Everything works fine when I run queries, and even updates and inserts from and to the Oracle Linked server (using both Microsoft OLE DB driver and Oracle OLE DB driver) using the OPENQUERY approach.
The problem is that, in order to clean code a bit, I want to use four part names in my queries. I am doing this also when querying other SQL linked servers.
But when I run the queries against Oracle using four part names I get this error: ( I am translating the error message from spanish. Probably the original message in english id different)
ERROR: OLE DB 'MSDAORA' returned an invalid column definition.
Error Code: 7318
Digging a bit, I learned that this is probably related to nos having the right collation name set in the linked server properties.
Now... I am not an Oracle expert, so I need to find out what collation is the schema I connect to using in Oracle (apps... yes, I know, I know... )
So, the plain question is... How do I find out what collation Oracle is using? I have access to the Oracle server via Toad... is there any query I can run in order to find this out?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您正在寻找 NLS 设置,您可以从以下视图中找到这些设置:
这里缺乏文档(或者很可能,我不能'找不到正确的文档),但这应该可以满足您的需求。
您可能必须以 SYSDBA 身份登录才能阅读其中一些视图。
I think you're looking for the NLS settings, which you can find from these views:
The documentation is rather lacking here (or, quite likely, I couldn't find the right document), but this should get you what you want.
You will probably have to log in as SYSDBA to read some of these views.