In SQL Server 2008 using the Sybase 12.5 driver everything works fine but now we had migrated to SQL Server 2012 and Sybase 15 using the 64bit driver it seems that things are broken.
If I test linked server connection it gives me linked server succeeded message but as I visually drill down the catalogs though it lists all of them they show as blank like such
but the item count is correct as we have that many catalogs in our Sybase.
Another funny thing that I recognized is that when I perform and OPENQUERY it gives me the correct amount of rows and still it is showing empty strings, like such
I dont have any idea what is happening here and my only clue is this error message when I drill down inside those blank databases. This exception prompts.
Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "MSDASQL" for linked server "TEST". The provider supports the interface, but returns a failure code when it is used. (Microsoft SQL Server, Error: 7311)
Any ideas why this might be happening? does anyone know a solution to this?
I solved this by restarting my Server, it looks like the Sybase drivers was not fully registered on install.
Related
I set up a few weeks ago a linked server in my sql server 2016 to my oracle 12c following this guide. It was working properly, but after some windows updates that restarted my machine, it no longer works. I can log into oracle properly through sqlplus and sql developer, but not through sql server. I get the following error:
OLE DB provider "OraOLEDB.Oracle" for linked server "LINKED_ORACLE" returned message "ORA-12154: TNS:could not resolve the connect identifier specified".
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "LINKED_ORACLE".
I restarted the SQL Server service, as well as restarted windows again, but still same error. What could have changed in a single restart? How can I fix it and get the linked server working again?
For some reason, SQL SERVER was properly reading the tnsnames.ora file before the restart, but after the restart it stopped. I had to recreate the linked server, and put the whole connection string in the Data Source field for it to work again.
Sample Data Source found here:
Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST= server01.mydomain.com)(PORT=1521)))(CONNECT_DATA=(SID=OracleDB)(SERVER=DEDICATED)));
Just linked SQL Server 2008 R2 Express to iSeries and can't see my files. I can query them though. Text returned as 0xD4F3F1F7F9F1F0 instead of something like M123450 (that's a work order number). Using the IDM DB2 for IBMDA400 OLE DB Provider.
I tried using a connection string that works for other applications. I get errors:
TITLE: Microsoft SQL Server Management Studio
The linked server has been created but failed a connection test. Do
you want to keep the linked server?
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or
batch. (Microsoft.SqlServer.ConnectionInfo)
Cannot initialize the data source object of OLE DB provider "IBMDA400"
for linked server "S10A7F0P". (Microsoft SQL Server, Error: 7303)
Has anyone encountered anything like this? I'm reasonably new to the whole SQL server thing.
Thanks in advance!
M
The reason your data is returned as 0xD4F3F1F7F9F1F0 is that the text column was defined as CCSID 65535; which stands for binary data and so by default the DB doesn't translate it from EBCDIC to ASCII/Unicode.
You can see the CCSID of the various columns in a table by using the green screen DSPFFD command or the iNav GUI.
The best way to fix this it to ensure your text columns are tagged with the appropriate CCSID for your language (37 if US).
The alternative is to force the DB to translate text columns by using the "Force Translate" property of the OLEDB driver.
This is the first time I've had to work with an Excel sheet as a linked server, and after a whole ton of struggling with it and solving one issue only to hit another I've decided to reach out. Long story short I have a SP that pulls data from an Excel linked server(this was originally just an open datasource rather than a linked server but I had issues there too) the SP works fine locally, however when I run it remotely, I was just getting error 7302 "can not create instance of provider" then after doing some searching I enabled "allow in process" and "Dynamic Parameter" in the provider settings, and now I'm getting:
Msg 7399...
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked
server "JOBDETAILS" reported an error. The provider did not give any
information about the error.
Msg 7303...
Cannot initialize the data
source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked
server "JOBDETAILS".
I looked through event viewer on both the local and remote servers and the local was logging a Com applications permissions issue when I tried to execute from remote using Windows Credentials(the end result will be running with SQL creds but I also tried Windows for troubleshooting purposes) so I corrected the permissions issue but that had no effect.
Solved my own stupidity, went back through everything this morning, and realized I had pointed the linked server to a mapped drive.
Can anyone guide me around to linking a server to another in SQL Server 2008 R2? I am getting the following error when trying to do so in Management Studio.
The linked server has been created but
failed a connection test. Do you want
to keep the linked server?
ADDITIONAL INFORMATION:
An exception occurred while executing
a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
The OLE DB provider "SQLNCLI" for
linked server "CDSPM1" reported an
error. Authentication failed. Cannot
initialize the data source object of
OLE DB provider "SQLNCLI" for linked
server "CDSPM1". OLE DB provider
"SQLNCLI" for linked server "CDSPM1"
returned message "Invalid
authorization specification".
(Microsoft SQL Server, Error: 7399)
Seems like Authentication problem.
Test by creating the linked Server using "Server Type" as "Sql Server". Then go into "Security" and set your user mapping. As a test, create a SQL login on the remote system and specify that on the "Be made using this security context"
Be sure that you can PING the "Linked Server" name first. HTH
Use drop down and choose
SQL Server Native Client
instead of
SQL Server
Use below link to view the screenshots of connecting the linked server with SQL Server
To solve "Cannot initialize the data source object of OLE DB provider "SQLNCLI10" for linked server" problem
Connect MS Access to SQL server 2008 via linked server
Then use below query to get more information about the linked server
select * from openquery("owner_pc\sqlserver2008",'select * from Testing.dbo.test')
This was driving me round the bend. And the fact you can't edit a Linked server after you entered it is just bananas.
Anyway, just leave most of the boxes empty on the linked server dialogue! Use "SQL Server Native Client" like #abatishchev mentioned then..
Check Kamran's article here for the settings. Only Datasource was filled in for me as IP hostname, after I'd give the server a friendly name in "Linked server", and on the second tab didn't need to bother with any logins just radio button the bottom one and used the SA login on the remote box.
In the general page of New Linked Server, type the sql-server instance name in the [Linked Server] box. Click on the [SQL Server] check box when selecting [Server Type]. Type remote username and password atfer selecting [Be made using this security context] of Security tab.
Select top 10 * from [LINKEDSERVERNAME].[DATABASENAME].[SCHEMANAME].[TABLENAME]
Best of luck.
for more details information http://msdn.microsoft.com/en-us/library/ff772782.aspx
A possible cause, if you have clustered service , and has recently been balanced , it is likely that a connection has been blocked pointing to old resource.
Try moving again resource to another node and reopening the Management studio, try again linked server connection.
I'm getting a Connection Busy With Results From Another Command error from a SQLServer Native Client driver when a SSIS package is running. Only when talking to SQLServer 2000. A different part that talks to SQLServer 2005 seems to always run fine. Any thoughts?
As I just found out, this can also happen on SQL 2005 if you do not have MARS enabled. I never even knew that it was disabled by default, but it is. And make sure you are using the
"NATIVE OLEDB\SQL Native Client" connection type. If you're using the "OLEDB.1" type connection (or whatever...) MARS is not even an option, and you get the SQL 2000 behavior, which is nasty.
You can enable MARS by opening the connection properties, and clicking "All", and scolling down in Management Studio.
I know your question has long since been answered, but I'm just throwing this in for the next sucker like me who gets burned by this.
Had this error today with MS ODBC Driver 11 for SQL Server for Linux to SQL Server connection. Wanted to help next searcher considering this was the first Google search result when I made the search.
You need to set MARS_Connection in /etc/odbc.ini as following:
[ConnName]
Driver=ODBC Driver 11 for SQL Server
Server=192.168.2.218,1433
Database=DBNameHere
MARS_Connection=yes
Speaking of MS ODBC Linux Driver: It is a complete PITA to deal with it but I insisted using native solution. I experienced too many walls especially working with ZF2, however, every trouble has a solution with the driver I can say. Just to encourage people using it instead quickly give up.
If somebody met this annoying bug while using PHP PDO with ODBC, then use closeCursor() method after query execution.
Microsoft KB article 822668 is relevant here:
FIX: "Connection is busy with results for another command" error message occurs when you run a linked server query
Symptoms
Under stress conditions, you may receive the following error message when you perform linked server activity:
Server: Msg 7399, Level 16, State 1, Procedure <storedProcedureName>, Line 18 OLE DB provider 'SQLOLEDB' reported an error.
OLE/DB Provider 'SQLOLEDB' ::GetSchemaLock returned 0x80004005:
OLE DB provider SQLOLEDB supported the Schema Lock interface, but returned 0x80004005 for GetSchemaLock .].
OLE/DB provider returned message: Connection is busy with results for another command
OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ::CreateSession returned 0x80004005.
Note The OLE DB source of the error may vary. However, all variations of the error message include the text "Connection is busy with results for another command".
Resolution
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000.
As noted there, the problem was first corrected in SQL Server 2000 Service Pack 4.
This blog post by Mark Meyerovich, a Senior Software Engineer at RDA Corp, also provides some insight (now archived, because the original link went dead):
SQL Server service pack upgrade
A quick search on Google turns up the following article (http://support.microsoft.com/kb/822668):
FIX: "Connection is busy with results for another command" error message occurs when you run a linked server query.
It basically implies the issue is a bug and recommends an upgrade to Service Pack 4. We have started out with SQL Server 2000 SP3 and we do have some linked servers in the equation, so we give it a try. After the upgrade to SP4 – same result.
Just for information if somebody else have the problem. I tried connecting via NetCobol of Fujitsu on an SQLEXPRESS via ODBC with embedded sql and to solve the problem I had to change a value in the registry namely
\HKLM\Software\ODBC\ODBC.INI\MyDSN
with MyDSN as a string value:
Name - MARS_Connection
Value - Yes
I just put the information here if it can help.