How to publish local ODBC data source to azure data factory? - ssis

We have some SSIS packages that run on azure data factory. We have Azure SQL Server connections that use Azure AD User authentication. Due to some internal requests we need to switch to Service Principal auth. With creating my l"ocal ODBC data provider" I am able to connect to database. But how do I publish this local "User DSN" to data factory? Because right now when I publish my project the connection fails with the following error given.
" An error occurred with the following error message: "ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"

Related

Unable to use SSIS package for importing data to Azure Data Warehouse using Data Factory

We are trying to copy the data from on-premise system to Azure Data Warehouse. We want to use SSIS package for copy data from on premise to cloud. Azure Data Factory v1 does not support SSIS package and Azure Data factory v2 supports SSIS packages but it does not supported by Data Warehouse.
So My Question is, How to import data from On-premise database to Azure Data Warehouse using Azure Data Factory SSIS package?
Thanks in Advance,
Vinir Shah
I'm afraid we can't copy the data from on-premise system to Azure Data Warehouse with SSIS package running in Data Factory.
To copy the data from on-premise system to Azure Data Warehouse, we could do with two ways:
Run the SSIS package local: Load data into Azure SQL Data Warehouse with SQL Server Integration Services (SSIS).
Using Copy activity to copy the data from on-premise system to Azure
Data Warehouse with self-host integration runtime.
Data Factory SSIS-integration runtime can't get data from the on-premise SQL server. I tested run the package in Data Factory and always get the error bellow:
Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Login timeout expired". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Named Pipes Provider: Could not open a connection to SQL Server [53]. ".
As we know about Data Factory, only the self-host integration runtime can help us connect to on-premise data source.
Hope this helps.

SSIS: Error from ODBC provider when inserting into Always Encrypted table using CMK in Azure Key Store

I'm trying to use SSIS (Visual Studio 2017) to insert data into an Azure SQL table with a column that's encrypted via Always Encrypted, and a column master key stored in Azure Key Vault, but I keep getting errors.
Per advice I've found in other posts, I'm using an ADO.NET destination with the ODBC data provider. The user is an Azure Active Directory user that's provisioned in the Azure SQL database so it's able to log in. It has all key privileges granted to it in the key vault's access policy.
My ODBC connection string looks like this:
DRIVER=ODBC Driver 17 for SQL Server;SERVER=[dbs].database.windows.net;UID=[uid#example.com];PWD=[password];Authentication=ActiveDirectoryPassword;DATABASE=[database];ColumnEncryption=Enabled;KeyStoreAuthentication=KeyVaultPassword;KeyStorePrincipalId=[uid#example.com];KeyStoreSecret=[password]
I expect that to insert into the table, but it results in this error:
[ADO NET Destination [2]] Error: An exception has occurred during data
insertion, the message returned from the provider is: ERROR [CE269]
[Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Error 12038
sending request to https://[keyvault].vault.azure.net:443 ERROR
[CE263] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Error
verifying signature of ECEK. ERROR [CE202] [Microsoft][ODBC Driver 17
for SQL Server][SQL Server]The keystore provider AZURE_KEY_VAULT
failed to decrypt the ECEK
https://[keyvault].vault.azure.net:443/keys/[cmk]/[version] with
RSA_OAEP.
I'm able to successfully insert into the table via SSMS and also via a custom console app, and verify the encryption works as expected. The error only occurs from SSIS.
I spent lot of time lately to make this thing work. If you get the error 12038 with ECEK, then you need to update your master key in Azure SQL db without having :443. That creates the error when ODBC connection tries to match the url with the url in AKV. This is the short answer. I am planning on providing the whole solution as soon as I get some time to do it.

Getting Started with EF Core on ASP.NET Core with an Existing Database

I am trying to connect my web api to an existing database using this command by going in tools-> nuget package manager -> nuget package manager console
Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models
But it says
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
It's supposed to get all tables from this database and show them in models, I've done this before and forgotten the procedure, I'm just trying to connect it to database first so I an copy the rest of the code and get the API working

SSIS connection manager can not connect to sql server using Native OLEDB Provider

Why would call from SSIS to connect to database server using OLEDB Provider (such as Microsoft SQL Server Native Client 11.0) fails to make a connection? I get error: Client Unable to establish connection. Hresult: 0x80004005. However I do not get error when same package makes a connection to same database using ".Net Provider\SqlClient Data Provider"

How to fix the error can not obtain the schema rowset DBSCHEMA_TABLES_INFO?

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.