i didn't figure out how to add a firebird linked server via ODBC
my system :
win 7 pro 64
SQL server 2012 express 64
firebird 2.5.3 64
Official ODBC drivers 64
i have created the odbc source without problem, and checked that in visual studio and ssms import data wizard , both show me the data from firebird database but when i try to create a linked server , i have something like this message (the image is from the web)
pls. let me know where I could post if this is the wrong place.
I have a Firebird 1.5 application. I created a linked server from my SQL Server 2000 to the firebird database. In SQL Server Query Analyzer I get errors from various ODBC drivers with "normal" queryies like
SELECT LVNR FROM LINKEDSRV...LVVERW
Pls. note, this all works perfectly in MS Access databases with ODBC-Links to Firebird!
From a programmer of a commercial ODBC driver I heard that this problem may be caused internally by SQL Server, there may be no solution possible in the ODBC driver. One workaround would be to use the OPENQUERY-Syntax like
SELECT * FROM OPENQUERY(LINKEDSRV, 'select LVNR from LVVERW ')
Are there any other solutions? Are there any known issues with firebird odbc-drivers and sql server? Are there any known good drivers for the use with sql-server? What is the purpose of OPENQUERY - workaround ODBC problems? Are there any settings in SQL Server 2000 (2005 Express) that could help? Are there any settings in ODBC DSN that would help?
regards
arno
PS: Here are my favorite error messages
Error -2147217900 [OLE/DB provider returned message: Dynamic SQL Error SQL error code = -104 Token unknown - line 1, char 89 "Col1014"] (Source: Microsoft OLE DB Provider for SQL Server) (SQL State: 01000) (NativeError: 7312)Error -2147217900 OLE DB-Fehlertrace [OLE/DB Provider 'MSDASQL' ICommandPrepare:repare returned 0x80004005: ]. (Source: Microsoft OLE DB Provider for SQL Server) (SQL State: 01000) (NativeError: 7300)Error -2147217900 Der OLE DB-Provider 'MSDASQL' meldete einen Fehler. (Source: Microsoft OLE DB Provider for SQL Server) (SQL State: 42000) (NativeError: 7399)
This "tricky" query does not work: SELECT LVNR FROM LINKEDSRV...LVVERW;
Error -2147217900 OLE DB-Fehlertrace [Non-interface error: Column 'ERHALTENABSCHLAG' (compile-time ordinal 35) of object 'LVVERW' was reported to have a DBTYPE of 5 at compile time and 131 at run time]. (Source: Microsoft OLE DB Provider for SQL Server) (SQL State: 01000) (NativeError: 7300)Error -2147217900 Der OLE DB-Provider 'MSDASQL' hat inkonsistente Metadaten für eine Spalte übergeben. Die Metadateninformationen wurden zur Ausführungszeit geändert. (Source: Microsoft OLE DB Provider for SQL Server) (SQL State: 42000) (NativeError: 7356)
it is possible to create Linked server with Failover partner option. I can query when primary server and getting the error when I set the DB Fail over. I have tried with following script and also gone through different sources, but failed. Please see the script and error below.
I have a file in Fire bird Database (30 GB with .ydb extension). Â which needs to be restored to SQL Server. I Have created a linked server and done it but it is taking very long time to update the records.
I am trying to create a linked server in Management Studio Exoress. In the Objext Explorer, I open Server Objexts and the right-click on Linked Servers and select New Linked Server. I then get an error that says "Cannot show the requested dialog. Additional information: Cannot find table 0. (System Data). The full text of the error is as follows:
===================================
Cannot show requested dialog.
===================================
Cannot find table 0. (System.Data)
------------------------------ Program Location:
at System.Data.DataTableCollection.get_Item(Int32 index) at Microsoft.SqlServer.Management.SqlManagerUI.LinkedServerPropertiesGeneral.PopulateProvidersCombo() at Microsoft.SqlServer.Management.SqlManagerUI.LinkedServerPropertiesGeneral.Microsoft.SqlServer.Management.SqlMgmt.IPanelForm.OnInitialization() at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SetView(Int32 index, TreeNode node) at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.SelectCurrentNode() at Microsoft.SqlServer.Management.SqlMgmt.ViewSwitcherControlsManager.InitializeUI(ViewSwitcherTreeView treeView, ISqlControlCollection viewsHolder, Panel rightPane) at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm.InitializeForm(XmlDocument doc, IServiceProvider provider, ISqlControlCollection control) at Microsoft.SqlServer.Management.SqlMgmt.LaunchForm..ctor(XmlDocument doc, IServiceProvider provider) at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ToolsMenuItem.OnCreateAndShowForm(IServiceProvider sp, XmlDocument doc) at Microsoft.SqlServer.Management.SqlMgmt.RunningFormsTable.RunningFormsTableImpl.ThreadStarter.StartThread()
I am running XP SP2 and SSE SP2. One other item is that the providers folder is empty. I checked another box and there are several providers listed in that installation. It looks like when the SSE is installed, the providers are not being created. I have tried uninstalling and reinstalling and am having the same problem. Is this a installation bug or is there a conflict with another program? I also re-downloaded the installation files in case there was a problem with that, but it didn't solve the issue either.
Hi, I'm using a couple of linked servers. I want to create a stored procedure on all of the linked servers in a database with a name which exists on all of the linked servers. For executing SQL on all of the linked servers I'm using:
declare @x int declare @dbname varchar(500) declare @SQL nvarchar(600) set @x = 1 create table #databases (ID int IDENTITY,name varchar(500)) insert #databases select instancelongname from instances while @x <= (select max(id) from #databases) begin select @dbname = name from #databases where id = @x select @SQL='blabla bla bla create PROCEDURE [dbo].[usp_xxxx]' execute @SQL set @x = @x + 1 end drop table #databases
Is it possible to use a ‘create procedure’ in this construction? Can anybody give me some help how to create a proper syntax for it?
I have created a linked server that connects to "mpp" file, and it connects and opens successfuly returning a list of tables that exists in the linked server to the mpp file.
But the problem i am facing now that whne i write a select statment to get data from the tables in this linked server
select * from linktompp.testmpp.dbo.tasks
such that linktompp is the linked server name testmpp is the catalog name tasks is the table name i need to select data from
it shows an error that says
"Could not obtain a required interface from OLE DB provider 'Microsoft.Project.OleDB.11.0'."
"[OLE/DB Provider 'Microsoft.Project.OleDB.11.0' IUnknown::QueryInterface returned 0x80004002: IGetDataSource]" could anyone tell me the reason of this error
what are the steps to create a linked server, I have tried unsuccesfully: The scenario is the following: From server A I want to be able to execute a select statement to a table in server B like select * from [server B].myRemoteDb.dbo.myremTable
I am administrator of server A but not of server B. I tried the
sp_addlinkedserver syntax but have not been succesful, so I would be grateful if somebody could just list the steps necessary to link Server B from Server A,
I'm using sql server 2005 and exchange 2003. End result is I want to upload email attachments to a table in sql. No one seems to have any idea how do do this except with .net, which i know nothing about so not really an option for me. I found this bit of info with some extensive web searching. Can anyone help fill in the blanks? I can't get the linked server to work yet.
EXEC sp_addlinkedserver 'exchange', 'Exchange OLE DB provider', 'exoledb.DataSource.1', 'file:\.ackofficestoragemailservernamepublic folders'
Error received:The OLE DB provider "exoledb.DataSource.1" has not been registered.
I´m trying to create a linked server to a Sybase database (.db file) so i can create some reports in sql 2005 (with Reporting Services and Report Designer). After reading all articles I did the following.
1) Installe Adaptive Server Anyhwere (Interactive Sql) 9.0.2 on the server. 2) Created a USER DSN to the Db file (Control Panel - odbc connections) and it works fine: The Settings for the ODBC are:
Database File: c:Project FolderDataBase.db As I said, when i go for "test connection", works fine.
3) Sql Management Studio - Object Explorer - Server Objects - New Linked Server, with settings as following:
General
Linked Server: lkDbNom
Server Type: Other Data Source
Provider: Sybase Adaptive Server Anywhere Provider 9.0
Product Name: Sybase
Product Name: dbNom (the dsn name, right?)
Security
Be made using this security context.- Remote Login: DBA; Password: SQL (same as DSN) All other settings, as default, click in OK and shows no errors (aparently it creates the linked server successfully). But when i try to query the linked server with:
SELECT * FROM OPENQUERY ('SYBASE', 'SELECT * FROM nom_Robot')
And i get the following message:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'SYBASE'.
Even better, if i go to the Object Explorer - Server Objects, i test the connection and it´s ok, but when i try to retrieve the catalog an error displays:
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&LinkId=20476 ------------------------------ ADDITIONAL INFORMATION: An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo) ------------------------------ The OLE DB provider "ASAProv.90" for linked server "SYBASE" reported an error. Access denied. Cannot obtain the required interface ("IID_IDBSchemaRowset") from OLE DB provider "ASAProv.90" for linked server "SYBASE". (Microsoft SQL Server, Error: 7399) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3054&EvtSrc=MSSQLServer&EvtID=7399&LinkId=20476
So, i really don´t understand what is missing in my linked server, i tried with MDASQL (OLEDB for ODBC) but it doesn´t even completes to create the linked server.
The database file is ok because, because in another server (one that doesn´t have SQL, only visual studio) i did the following:
1) Installe Adaptive Server Anyhwere (Interactive Sql) 9.0.2 on the server. 2) Created a DSN to the Db file, and it works fine. (copied the db file, so is local, no remote access), exactly the same setting as i did on the sql 2005 server. 3) Created a connection in visual studio 2008 (server explorer - data connections), i can retrieve sdata...but of course the provider is .NET Framework Data Provider for ODBC and i cannot use the same connection string.
I have 2 instances of server A. A is the primary instance and A1 is the logical instance. Instance A1 has a linked server to server B. When I try to create a linked server from the primary instance A to server B, I get the error message
Error 15028: The server 'B' already exists.
When I run a select of master..sysservers on the primary instance, A, I see all linked servers for A and A1. When I select off of A1 I only see the instances for A1.
If I try to access server B from the primary instance A, I receive the following message:
Server: Msg 7411, Level 16, State 1, Line 1 Server 'B' is not configured for DATA ACCESS.
(1) Why does sysservers on the primary instance, A, show instances for A and A1 and not just the ones for A?
(2) Why can't I create the linked server 'B' on instance 'A'?
I can create a linked server to another MsSQL from MsSQL,but encounter error when create a linked server to MySQL: Error 7399:OLE DB provider 'MSDASQL' reported an error. Data source name not found and no default driver specified. ......
I have a local SQL2005 server with a linked SQL2000 server. I would like to know how to create a temporary table in the remote server in such a way that I can make an inner join as follows; my idea is to optimized a distributed query by doing so:
create table #myRemoteTempTable
insert into #myRemoteTempTable select * from myLocalTable
update myRemoteTable set Value=#myRemoteTempTable.Value from myRemoteTable inner join #myRemoteTempTable on #myRemoteTempTable.ID=myRemoteTable.ID
I need to create a relationship between a local table and tables on alinked server. I used the design table wizard and selected therelationship property wizard. In the reslationship property wizard,the tables that I need to get the keys from in the linked server do notshow up. Is there a way to do this, or I simply don't have enoughpermission to tables in the linked server. On the local server, theSecurity tab of linked server property has Local Loging "sa", RemoteUser "sa" and Remote Password "****". Thanks for your help.
I am currently trying to optimize an ETL process that pulls around 150 tables from a OLAP-esque system through a linked server. It's the AllScripts Touchworks EMR database, if that makes a difference. I am having a difficult time fitting an incremental load into a reasonable window of time. For instance, one table, which has around 40 columns, and a total of about 50 million rows, takes around an hour just to pull one day's worth of records when filtering on a single datetime field. The query is:
SELECT * FROM OPENQUERY([linkedserver], ' SELECT * FROM Works.dbo.Visit WHERE StartDttm BETWEEN ''2014-12-23'' AND ''2014-12-24'' ' )
Which, in the end, returns only about 30k records. However, in trying different approaches, I decided to test out bcp using the following code:
bcp Works.dbo.Visit out f:etlvisit.dat -n -S linkedserver.this extracted the entire table to flat file, but it only took about 15 minutes....add on another 3-4 to load that into the database on my end. Now, my ability to see what's happening on the remote server's end is very limited, but I know that the server has much higher specs than mine. They have 96GB memory vs. my 32GB, twice the cores I've got, etc. So how is this running faster by pulling the entire table over?
I figured that even in the worst case scenario of a full table scan, picking 30k rows out of the table that match a single criteria would certainly run faster than bringing the whole thing over. This isn't isolated to a single table, either. I finished running a test of the incremental extract/load vs. full extract/load via bcp (200GB of data). The incremental takes about 7 hours, bcp takes about 2 hours.
I would like to join two tables: one on a local server which I have admin access to and another server which I only have read access. The local table is very small, but the remote table is very large.
If I look at Query Analyzer's execution plan, it appears that the join will be done locally (i.e. the entire table is transferred from the remote server and then joined to my local table). Is there a way to create a temp table using linked servers, transfer my small local table to the remote server and then perform the join on the remote server? In the past, I have been able to use openquery to restrict the data to a small subset that is transferred but the local table is a little too large for that.
I appreciate any advice / guidance anyone can offer me!
System: Win 2003, SQL Server 2005, Using an AD win account that is not a member of the Admin group on the server.
Error message from Management Studio query window:
Msg 7302, Level 16, State 1, Line 1 Cannot create an instance of OLE DB provider "IBMDADB2" for linked server "Sname".
Event messages associated with this error:
App Event ID: 19036 The OLE DB initialization service failed to load. Reinstall Microsoft Data Access Components. If the problem persists, contact product support for the OLEDB provider.
Sys Event ID: 10016 The application-specific permission settings do not grant Local Activation permission for the COM Server application with CLSID {2206CDB0-19C1-11D1-89E0-00C04FD7A829} to the user domainuser SID (S-1-5-21-126051702-1034962659-2130403006-7826). This security permission can be modified using the Component Services administrative tool.
I€™m getting this error message when trying to run an openquery statement through a linked server to DB2. (SELECT * FROM OPENQUERY(Sname, 'SELECT * FROM tablename€™)) The linked server has a remote login and password that it uses to connect to DB2.
I found this from another post on how to fix this error: Expand Component Services - Computers - My Computer - DCOM Config Select MSDAINITIALIZE Right Click properties then security Under Security - Launch Permission: enable Local Launch and Local Activation for your SQL Service account Under Security - Access permissions: Allow System: Local Access and Remote Access.
After completing these steps I still get the error message but the events are no longer generated. I€™ve also tried different variations of these steps. The only way I can get this to work is to either make the AD user a member of the Admin group on the server or by putting in a user account that has admin rights to the server in the MSDAINITIALIZE properties €“ Identity Tab €“ Run this App as this User.
Can someone please tell me the steps that I€™m missing?
I have two SQL Server machines - RPTPROD and DATAPROD.
I wanted to create a linked server from RPTPROD pointing to DATAPROD using Windows Authentication. Â When I tried to create this linked server, I keep getting this error
"Login failed for user 'NT AUTHORITYANNOYMOUS LOGON' (Microsoft SQL Server,Error: 18456)". Â
On the "Security" page, I chose "Be made using the login's current security context". Â I'm sysadmin on both SQL Server machines. Â
Error message: OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "Stats_CA" returned message "Unspecified error". Msg 7303, Level 16, State 1, Line 2 Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "Stats_CA".
I uninstalled and reinstalled the AccessDatabaseEngine - no change.
The provider is displayed, so it's not that.
I verified temp and csv location folder permissions
I tried the -g512 startup option
The csv has a schema.ini as required
It was an 'in place' upgrade, so nothing else has change.
I have a system where people can apply for registration and also a registration fee is involved. The screen where the application is captured has a couple of inserts into different tables. Each of these tables have triggers on them to transfer data to a linked server and they work fine. Today I just added another trigger on a different table but also part of this same save process. Now I am getting the following error:
Microsoft OLE DB Provider for SQL Server error '80004005'
The statement has been terminated.
/orisys.int.za/applicants/ApplicantInsert.asp, line 111
I do not know this error and think it might be time-out.
I have created a linked server that point to a firebird database, everything is fine, I can query the database with something like
Select * from MYLINKEDSERVER...MYTABLE
Now , can i use tablediff utility with this linked server. If yes, any example ..
I would say also that performance is not very important to me. this would be used at the end of the day to make some sort of replication by generating a sql script with datadiff, and run it on a local sql server database and a web based SQL database. The replication is not an option since i am using a shared web hosting and replication is disabled on it .
I have a SQL Server 2012 instance set up with a linked server to an Oracle Database. I need to build a stored procedure (single NVARCHAR(6) parameter in: @accountID) which executes a select statement against the Oracle DB.
Everything's working fine when testing with 'EXEC (''<oraclecodeblock>'') at LINKEDSERVERNAME' if I hard code the value of @accountID in <oraclecodeblock> but when I encapsulate it all within sp_executesql and attempt to parameterize @accountID it's throwing ORA-01722 'invalid number' errors on the Oracle DB. The parameterized value is NVARCHAR as are the account numbers.
Working: DECLARE @accountID VARCHAR(6); SET @accountID = '10842'; DECLARE @sql NVARCHAR(MAX); SET @sql = N'EXEC (''SELECT * from A.Accounts WHERE ID = ''''10842'''';'') AT LINKEDSERVER';
Does SQL Server Compact Edition support Linked Server? I have 2 SDF files and I want to copy data from one to the other? I thought Linked Server is the easier to go.
How does one create a linked server to an Access 2007 (accdb) file? I am aware that to create one to a mdb file, the code would be -EXEC sp_addlinkedserver @server = 'SEATTLE Mktg', @provider = 'Microsoft.Jet.OLEDB.4.0', @srvproduct = 'OLE DB Provider for Jet', @datasrc = 'C:MSOfficeAccessSamplesNorthwind.mdb' GO What is the corresponding code for Access 2007 accdb files?
Used linked-server during logon trigger? is it possible? i know we can access tables, SPs, etc with in that server, if i want to check something in other server during logon trigger, can i do it?
We have link-servers all over the place. The ideal naming convention should satisfy following:
- developers should not have to modify code when deploying between environments DEV->TEST->PROD. This rules out using actual server name as linked-name.
- the name should easily identify actual server without much mental translation. This rules out relevant but generic names like FAXSERVER or PAYSERVER
- also, if the name could state that it is a linked-server e.g starting with LINK_, it works when reading the code.
So, I was thinking the link-name should simply remove the environment :
e.g LINK_FAX_DB_V01
that way, on DEV box, the underlying sql data source could point to the dev server, while on test, it could point to test server etc. without having to change code, and also knowing which server it's pointing to by just adding a TST or PRD in front-of it.
I've got an OLEDB DB2 linked server to a db2/AS400 instance and selecting from a table on the server has never caused problems before. One of the columns is a large text field. If I select all the columns but the large text field, it returns as normal, but including the large text field now, I get:
"Transport error: shared memory provider error: 0 - no process is on the other end of the pipe"
The largest entry in the text field is about 5k characters, and there don't appear to be any strange characters.
As a database developer, I have so many databases that I "own" scattered across various servers that it''s getting difficult to remember where all of my databases reside. It doesn't work that the DBAs have taken to some very hard to remember server naming conventions.
I was going to create aliases via the configuration manager, but it turns out the DBAs overwrite my entries each night with THEIR aliases and they won't add any for my use.
So I decided to simply add some records to my host file so that instead of having to connect to "SERVER-AD_DADF-DAFDASS" I can just use "CustomerA".
This solution seems to work until I tried to access a linked server. If I connect to the main server via it's actual name, I can hit the remote/linked server with no issue. However, if I connect to the main server using it's alias, connection to the remote/linked server fails with: Login failed for user 'NT AUTHORITYANONYMOUS LOGON'.
The linked server is set up to use current security context and I'm not logging into the alias any differently that I do when using the actual server name.
I'm having a few issues trying to get a linked server setup from a new SQL2012 installation to a Lotus Notes database. This linked server has previously been working fine on our old SQL2005 environment. All setup using the same details (ODBC driver name matches, account details etc). If we test the connection from the Lotus ODBC driver the test connection is successful, If I then create the Linked server to access this ODBC driver I receive an error :
Cannot initialize the data source object OLE DB Provider "MSDASQL" for linked server "LotusTest"
OLE DB provider "MSDASQL" for linked server "LotusTest" returned message "[Microsoft][ODBC Driver Manager] Driver's SQLSetAttr failed" OLE DB provider "MSDASQL" for linked server "LotusTest" returned message "[Lotus][ODBC Lotus Notes]
Unable to find path to server. check your network connection is working.(Microsoft SQL Server, Error: 7303)We have just migrated to a SQL Server 2012 64 bit Enterprise from SQL Server 2005 32 bit Standard. We have a 64 bit Lotus client installed to provide the correct ODBC driver which has enabled the test connection direct from the ODBC driver to connect successfully. I'm just at a loss as to how to resolve this issue and get the linked server connecting.