I am trying to configure a SSIS 2012 project on a couple of mirrored databases.
I was hoping to be able to use the OLEDB provider, but that doesn't seem to support the Failover Partner attribute in the connectionstring.
I have tried to add the keys "Failover Partner", "Failover_Partner" and "FailoverPartner", but none of them works - the connection never tries to connect to the failover parther even if that holds the principal database. All my tests have been performed with all three variants of the attribute key.
If I use the ADO.NET connection, there is a build-in setting called "Failover Partner" in the Connection Manager, and that works like a charm, and it can connect to the database with the principal being on either one of the servers... just like it should.
My question is: Is it correct that OLEDB does not work out of the box with mirrored databases, when using SSIS 2012 agains a SQL Server 2012 mirrored database?
How I test
My test is really simple: i have a "Execute SQL Task" with an OLEDB connection manager with the following connectionstring:
Data Source=srv1;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Integrated Security=SSPI;Auto Translate=False;Application Name=My Application;
I have tried adding the different versions of Failover Partner as mentioned above:
Data Source=srv1.domain.local;Initial Catalog=MyDatabase;Provider=SQLOLEDB.1;Integrated Security=SSPI;Auto Translate=False;Application Name=My Application;Failover Partner=srv2.domain.local;
If MyDatabase is principal on srv1, then it works. If the database is principal on srv2, then SSIS fails with the following error:
Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft OLE DB Provider for SQL Server" Hresult: 0x80004005 Description: "Cannot open database "MyDatabase" requested by the login. The login failed.".
and the following is logged on srv1 in the error log:
Login failed for user 'DOMAIN\MyUser'. Reason: Failed to open the explicitly specified database 'MyDatabase'. [CLIENT: 10.0.0.3]
What am I doing wrong? Or do I need to change to ADO.NET which works 100% as expected?
Thanx,
Sjang
There is a failover partner parameter if you use OleDB/SQLNCLI11.1 connection string:
Data Source=srv1;Initial Catalog=myDB;Provider=SQLNCLI11.1;Integrated Security=SSPI;Failover Partner=failover_partner_name;
Related
This is really odd to me. I am using an ODBC connection as a data source in SSIS. I am able to preview data, but when I attempt to execute the package (still within Visual Studio for development), I get an error on the initial data source.
The error I am receiving is:
There was an error trying to establish an Open Database Connectivity (ODBC) connection with the database server.
The AcquireConnection method call to the connection manager xxx failed with error code 0xC0014009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
ODBC Source failed validation and returned error code 0x80004005.
Clearly I have the right username, password, and ODBC connection to some degree, because I am able to see the data. However I am failing on establishing the connection when I attempt to run the package, so I must be doing something wrong. Any idea what it might be?
It ended up being that the drivers associated with the ODBC connection (gsk8ssl.dll) installed on the machine needed to be added to the path variables on both my local and on the server. This was for connecting to a DB2 database.
I am going around in crop circles, trying to set up a linked server (from SQL Server 2016 to MySQL).
Here is the basic procedure that I used: Create a Linked Server to MySQL from SQL Server. Upon clicking OK to create the new linked server, I received the following SSMS 2016 spasm, Error #7303:
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 "MSDASQL" for linked server "MYSQL".
OLE DB provider "MSDASQL" for linked server "MYSQL" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified". (Microsoft SQL Server, Error: 7303)
I tried variations that included a Provider String and Catalog (same error):
I have tried the latest MySQL ODBC ANSI/Unicode drivers (5.03.07.00), set up via System DSNs in both the 32- and 64-bit versions of the ODBC Data Source Administrator.
Now, I suspect that something screwy is going on with MS SQL Server and/or its OLE-DB Provider (MSDASQL), because:
All tests of the System DSNs within the ODBC Data Source
Administrator are successful.
Crippled Access 2016 is able to link (via the aforementioned Unicode System
DSN) to MySQL just fine, with minimal effort, listing all databases
and tables.
What is the magic that SQL Server 2016 needs to make the linked-server dialog not result in the above error?
Two things --
Product Name should be MSDASQL.
Leave Provider String and Catalog blank (these are typically taken care of by your DSN definition).
That should do it...
A couple of my co-workers have been having trouble connecting to password protected MS Access 2010 database from SSIS using. I decided to make an attempt at troubleshooting this.
To simplify the situation I created a new MS Access 2010 database with one table and one row with no password protection. I copied that database, updated the data in the one row so that I could differentiate the source and then applied a password. Both databases on the same network path for which I am using the full UNC path.
I created two SSIS packages, one for each database. All the packages do is read from the one table and write the data to a CSV. For my connection to the Access database I am using the Microsoft Office 12.0 Access Database Engine OLE DB Provider. For the password protected database connection I am putting the password in the Jet OLEDB:Database Password field.
When running on my machine through Visual Studio both SSIS package work as expected and write the data from the Access database table to a CSV file at the same location as the database. However, when I upload the packages and create a SQL job for each of them the one without a password works, but the one with a password does not.
Here is the error I get (with the user Xed out)...
Executed as user: XXXXXX\XXXXXXXX. Microsoft (R) SQL Server Execute Package Utility Version 10.50.4000.0 for 32-bit Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 1:42:02 PM
Error: 2016-07-11 13:42:03.94
Code: 0xC0202009
Source: Package1 Connection manager "TestPassword"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred.
Error code: 0x80004005. An OLE DB record is available.
Source: "Microsoft Office Access Database Engine"
Hresult: 0x80004005
Description: "Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.". End Error
Error: 2016-07-11 13:42:03.94
Code: 0xC020801C
Source: Data Flow Task OLE DB Source [1]
Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "TestPassword" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error
Error: 2016-07-11 13:42:03.95
Code: 0xC0047017
Source: Data Flow Task SSIS.Pipeline
Description: component "OLE DB Source" (1) failed validation and returned error code 0xC020801C. End Error
Error: 2016-07-11 13:42:03.95
Code: 0xC004700C
Source: Data Flow Task SSIS.Pipeline
Description: One or more component failed validation. End Error
Error: 2016-07-11 13:42:03.95
Code: 0xC0024107
Source: Data Flow Task
Description: There were errors during task validation. End Error
DTExec: The package execution returned DTSER_FAILURE (1).
Started: 1:42:02 PM Finished: 1:42:03 PM Elapsed: 1.903 seconds. The package execution failed. The step failed.
Any suggestions?
I had a very similar issue with an ADO Net connection manager trying to connect to a remote Azure DB.
You can try assigning the full connection string including the credentials to the connection manager via an expression and variable. There are more secure ways to assign this information at run time but that is a quick way to test.
One of the major reasons that this type of deployment fails is that the password is encrypted specific to your machine when you set up the connection manager. Once the package is moved the production machine it can not decrypt the password that is saved in the connection manager. Therefore the package will never have access to your protected DB.
Our issue was fixed by running this install to update the drivers.
https://www.microsoft.com/en-us/download/details.aspx?id=13255
Have your package security set to EncryptSensitiveWithPassword
When you deploy your package ensure you have re-entered the username and password (or full connection string) for your connection.
I'm using VS 2012 with SQL Server Data Tools installed. I have an ADO NET Source, which uses the .Net Providers\MySQL Data Provider and am trying to push some data to an OLE DB Destination, which uses a normal SQL Server Native Client 11.0 provider. Everything seems ok, I can preview data from the source and columns are mapped well - but when I run the project I get the following error:
[ADO NET Source [2]] Error: ADO NET Source has failed to acquire the connection {47479EC0-98BC-4664-A8F9-0FF0278969FD} with the following error message: "Could not create a managed connection manager.".
[SSIS.Pipeline] Error: ADO NET Source failed validation and returned error code 0xC0208449.
Most Google hits talk about setting the Run64BitRuntime to false. Mine is greyed out and defaulted to false already. Any other suggestions?
I ended up using an ODBC connection and was able to follow this post step by step to get an alternative route working:
SSIS MySQL Copying Table to SQL Server
I'm trying to correct some errors on an SSIS job. That number of errors was 12 and know I got to 5
I am getting the following error message, which is in French.
[OLE DB Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E14 Description: "Impossible d'obtenir l'ensemble de lignes du schéma "DBSCHEMA_TABLES_INFO" pour le fournisseur OLE DB "SQLNCLI10" du serveur lié "serveur3". Le fournisseur prend en charge l'interface, mais retourne un code d'erreur lorsqu'elle est utilisée.". [SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute phase and returned error code 0xC0202009
The error message translates to the following in English.
[OLE DB Source 1] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E14 Description: "Can not obtain the schema rowset" DBSCHEMA_TABLES_INFO "for OLE DB provider" SQLNCLI10 "for linked server" server3. "Provider supports the interface, but returns a failure code when it is used. ". [SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute stage and returned error code 0xC0202009.
How do I fix the error message?
Translated error message:
The error message that you added in the comment was in French. Using Google Translate, the error message translates to the following:
[OLE DB Source 1] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 10.0" Hresult: 0x80040E14 Description: "Can not obtain the schema rowset" DBSCHEMA_TABLES_INFO "for OLE DB provider" SQLNCLI10 "for linked server" server3. "Provider supports the interface, but returns a failure code when it is used. ". [SSIS.Pipeline] Error: component "OLE DB Source" (1) failed the pre-execute stage and returned error code 0xC0202009.
The message implies that you are probably trying to query a Linked Server using SQL Server Native Client 10.0. I am going to guess that the linked server is pointing to SQL Server 2000 based on the searches on web.
Check the following:
Read the below Microsoft Connect website bug report on how to fix your issue.
Unable to query linked SQL Server 2000
Quote from website:
The issue here seems to be that the instcat version on your SQL 2000 server is out-of-date. Following the steps in KB 906954 (http://support.microsoft.com/kb/906954) should fix that.
Other links:
Other links that might help to resolve your issue:
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider
Cannot obtain the schema rowset "DBSCHEMA_TABLES_INFO" for OLE DB provider "SQLNCLI10" for linked server "XXXXXX"
The links suggest creating the below stored procedure in master database and granting Execute permission to appropriate user account.
USE master;
GO
CREATE PROCEDURE sp_tables_info_rowset_64
#table_name SYSNAME
, #table_schema SYSNAME = NULL
, #table_type nvarchar(255) = NULL
AS
DECLARE #Result INT
SET #Result = 0
EXEC #Result = sp_tables_info_rowset #table_name, #table_schema, #table_type
GO
To run the procedure (one time only is needed)
USE master
GRANT EXEC ON sp_tables_info_rowset_64 TO PUBLIC
Steps to create a data source to connect to SQL Server instance from SSIS 2008 R2
Here are the steps to create a Data Source to connect to an SQL Server instance using Business Intelligence Development Studio (BIDS) 2008 R2.
On the BIDS project solution, right-click on the folder Data Sources and click New Data Source...
On the Data Source Wizard, click New... to create a new connection.
On the Connection Manager dialog, perform the following steps:
Select an appropriate Provider based on the SQL Server version that you would like to connect to. You will see only the providers that are installed on the machine.
For SQL Server 2000, select Microsoft OLE DB Provider for SQL Server
For SQL Server 2005 - 2008 R2, select Native OLE DB\SQL Server Native Client 10.0
For SQL Server 2012, select Native OLE DB\SQL Server Native Client 11.0
Enter the Server name or Instance name, for example MachineName\InstanceName
Select Windows authentication or SQL Server Authentication depending on how you would like to connect to the SQL Server instance. If you choose SQL Server Authentication, enter a valid user name and password.
Click Test Connection to make sure that the credentials are valid.
Select a database to connect.
Click OK
Click Next on Data Source Wizard. On the final step, give a proper name to the Data Source like OLEDB_AdventureWorks. OLEDB denotes the connection type and AdventureWorks denotes the database name. Click Finish.
The newly created data source OLEDB_AdventureWorks will show up under the Data Sources folder in the SSIS project.
To add the data source to the package, right-click on the Connection Manager tab that is displayed at the bottom of an SSIS package and then click New Connection From Data Source...
Select Data Source dialog will display all the available data sources on the SSIS project. Pick the ones that you would like to add to the package and click OK.
The new data source will appear on the package connection manager. You can now use the connection manager in your package tasks.
Other option:
Instead of creating data source, you can also directly create a Connection manager on the package itself. You right-click on the Connection Manager tab that is displayed at the bottom of an SSIS package and then choose the appropriate connection that you would like to create. This connection manager will be visible only to the package and not to the other packages in the SSIS project solution.
Word of advice:
Read the FAQ on how to post a question with enough information for others to answer.
Do not add the error messages in the comments. It is very hard to read and understand the message.
Always edit your question to explain the issue in detail or to add more information.
Translate the error message if it is not in English.