Note that there are some explanatory texts on larger screens.

plurals
  1. POLinked server to Intersystems Cache database from MS SQL Server 2005 Browse Catalog
    primarykey
    data
    text
    <p>I'm trying to create a linked server in MS SQL Server 2005, pointing to an Intersystem Cache database via ODBC.</p> <p>Below is the query to create the linked server:</p> <pre><code>/****** Object: LinkedServer [CC7] Script Date: 02/22/2011 09:06:39 ******/ EXEC master.dbo.sp_addlinkedserver @server = N'CC7', @srvproduct=N'MSDASQL', @provider=N'MSDASQL', @datasrc=N'CC7', @provstr=N'DRIVER={Intersystems ODBC};Server=CCMSSRVR;Port=1972;Database=CCMS_STAT', @catalog=N'CCMS_STAT' /* For security reasons the linked server remote logins password is changed with ######## */ EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'CC7',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'collation compatible', @optvalue=N'false' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'data access', @optvalue=N'true' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'dist', @optvalue=N'false' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'pub', @optvalue=N'false' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'rpc', @optvalue=N'false' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'rpc out', @optvalue=N'false' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'sub', @optvalue=N'false' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'connect timeout', @optvalue=N'0' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'collation name', @optvalue=null GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'lazy schema validation', @optvalue=N'false' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'query timeout', @optvalue=N'0' GO EXEC master.dbo.sp_serveroption @server=N'CC7', @optname=N'use remote collation', @optvalue=N'true' </code></pre> <p>I can query the database, for example as below:</p> <pre><code>SELECT * FROM CC7..dbo.iAgentByApplicationStat </code></pre> <p>This works fine.</p> <p>The problem i'm having is when i try and browse the catalog through Microsoft SQL Server Management Studio. Whenever i expand 'Catalogs' under the linked server i get the following error:</p> <pre><code>TITLE: Microsoft SQL Server Management Studio ------------------------------ Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&amp;LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ The OLE DB provider "SQL Server" for linked server "(null)" reported an error. One or more arguments were reported invalid by the provider. Cannot obtain the schema rowset "DBSCHEMA_CATALOGS" for OLE DB provider "SQL Server" for linked server "(null)". The provider supports the interface, but returns a failure code when it is used. (Microsoft SQL Server, Error: 7399) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&amp;ProdVer=09.00.3042&amp;EvtSrc=MSSQLServer&amp;EvtID=7399&amp;LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------ </code></pre> <p>I've googled this for days to no avail, so any help no matter how small is very much appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThis question is for the person who posted the initial Cache link to sql server question. Can you explain how and where you did this link in sql server. I am trying to do a similar thing in order to connect from sql server to a cache db but I don't know where within sql server I do this. Any details on how this is done would be a big help. Thanks
      singulars
      1. This table or related slice is empty.
    2. COI use SQL Server Management Studio. There are 2 ways i know of to create a linked server. One is using a query (such as in my original question), the other is using the user interface. In either case, for it to work you must first install the ODBC driver (Intersystems ODBC). To use the user interface to create the linked server connect to it, then expand 'Server Objects', then right-click 'linked servers' then choose 'New Linked Server'.
      singulars
    3. COI ran into the same issue where I was unable to browse the catalog. While i was unable to get the catalog to populate on-screen. I was able to get column definitions without having to login to cache and look at the class definitions by doing the following: SELECT * INTO tempdb.dbo.iAgentByApplicationStat FROM CC7..dbo.iAgentByApplicationStat where 1=0; I can then expand the iAgentByApplicationStat in tempdb to see the schema definition.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload