I am running some SSIS packages locally that need to insert data into an Azure v12 SQL Database. For authentication we would like to use "Active Directory Integrated". This works if I connect via SQL Management Studio so it is setup right. However my SSIS package is giving me an error of
My connection string looks like this
So note the authentication param which I think is causing the issue.
Any ideas onusing this type of security with SSIS? The SSIS package is being run from a SQL 2016 server.
SSIS OLE DB connections does not support Azure integrated security yet, and it's very undocumented. You have to workaround by creating an SQL login with password Or use ADO.NET connection
If you have an OLEDB connection using SQLNativeClient, you can make a change to allow the use of Active Directory. First download Microsoft® OLE DB Driver 18 for SQL Server®
https://www.microsoft.com/en-us/download/details.aspx?id=56730
Then view the SSIS package in code and change the connection string to 'Provider=MSOLEDBSQL;Authentication=ActiveDirectoryIntegrated;Encrypt=yes'
The UI will not display the AD options, but it will work for an Execute SQL Task, not yet managed to get it to work for and OLE DB source.
I also managed to get this working for an OLE DB data source by setting the DelayValidation True on the Data Flow.
Related
I am working on my first SSIS package that is pulling data from one on-premise SQL Server instance doing some transformations and writing it to a separate on-premise SQL Server instance.
While working with the package in my SSDT project all of my tasks run and work correctly.
Once I deploy the package to SQL Server the ADO.NET connection to the source database fails.
The package is deployed on the destination SQL Server instance.
There is a data flow task earlier in the package that uses an OLE DB connection which is successful and uses the same SQL Authentication username and password combination.
I get the error:
Read Group Membership:Error: Failed to acquire connection "sourcedb.testtable". Connection may not be configured correctly or you may not have the right permissions on this connection.
One thought is that I may need to configure an ADO.NET connection provider on the source database.
As this is my first foray into SSIS I expect the fix is trivial, I just can't get there.
Update with solution:
I resolved the issue by using an OLE DB connection rather than the ADO.NET. I didn't realize I could still sue the results from an OLE DB connected query to populate an ADO Enumerator.
Changed to use an OLE DB connection rather than an ADO.NET connection.
I had thought I needed an ADO.NET connection to populate my data and use it in a foreach as an ADO Enumerator.
We converted our 2012 SSIS package to 2016 SSIS (TargetServerVersion = SQL Server 2016).
One of the database the SSIS package reads from is a SQL Server 2012 database.
Either connecting using Native OLE DB\SQL Server Native Client 11.0 or connecting using OLE DB provider for SQL Server give the same error.
Data Source=my2012SQLDBServer;Initial Catalog=my2012SQLDB;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;
Data Source=my2012SQLDBServer;Initial Catalog=my2012SQLDB;Provider=SQLOLEDB.1;Integrated Security=SSPI;Application Name=myApplicationName-{....}my2012SQLDBServer.my2012SQLDB;Auto Translate=False;
When running the SSIS package from SSMS (SSMS is run using a user that has a dbOwner permission to the 2012 database, ie myDomain\myUser) , I am getting the error in the step reading a table from the 2012 database
Execute SQL Task: Error: Failed to acquire connection "my2012SQLDBServer.my2012SQLDB".
Connection may not be configured correctly or you may not have the right permissions on this connection.
DTS_E_OLEDBERROR. An OLE DB error has occurred. Error Code:0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" HResult:0x80040E4D
Description: "Login failed for user "NT AUTHORITY\ANONYMOUS LOGON".
On Visual Studio (run using myDomain\myUser), I am able to succesfully run the SSIS package.
myDomain\myUser also has an ssis_admin, ssis_logreader, db_owner, app_dbowner role in the SSISDB database.
How can I fix this error ?
Thank you.
It is typical error for double-hop problem.
Simplest solution is to login using remote desktop to SSIS server and then run it using SSMS there.
Other option is to define SQL Agent job on the SSIS server and then run the package using this job.
Ultimate solution will be to configure Kerberos and allow double-hop connections on the SSIS box.
You can check following post how to configure Kerberos:
SSIS job fails when run remotely thru ssms, but runs fine on SQL Server
solution for me was like just changing windows authentication in the destination settings to SQL server authentication with apropriate
Account that have rights to reach the server, i dont understand how it works but it does.
I have created a SIS Log Provider to write a log entry from a Script Task in a SSIS package. The connection is working a long as I use Windows Authentication, but if I switch to SQL Server Authentication and provide a username and a password no log entry is written. I use the same connection in the package to execute a SQL Task to read from the SSIS Log with no problem. The SQL Server User has read and write access to the SSIS Log.
I have to use SQL Server Authentication because the Windows User Running the SSIS Job and the package doesn't have access to SSIS Log and this could not be changed.
I'm using VS SSDT 2017 and deploy the package to SQL Server 2016.
I tried to store the username and password in the package and to provide the connectionstring and password via package parameters and environment.
No effect as soon as I switch from Windows Authentication to SQL Server Authentication.
Dts.Log(logMessage, 0, emptyBytes);
The above code should write an entry in the SSIS Log, but works only for Windows Authentication.
Edit:
The SSIS Log Provider Type is SSIS log provider for SQL Server.
The connection manager type is OLEDB, the provider type is Native OLE DB/SQL Server Native Client 11.0.
The connection is parameterized for the connection string and the password.
I've successfully configured oracle wallet in my machine in windows 7. I also checked by executing the below command
sqlplus /#myoracleDB
and it gets connected to the DB successfully.
I'm trying to execute the SSIS package(DTSX) version 2012 in my machine. In the Data Flow task, I'm using Oracle Provider for OLEDB Connector. I wanted to connect the myoracleDB Database through oracle wallet in the OLEDB connector. I used the below configuration,
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;
But the Connection is failing with invalid username/password.
Please advise how to resolve this problem.
When I was using "externally identified" logins setup on the Oracle server (basically windows trusted authentication), I used
/ as login
blank password
Inside my SSIS packages and it worked.
I don't know if this is the same as Oracle wallet - I don't think so, but try it.
Using OSAuthent=1; you are trying to establish a Trusted Connection using the current OS authentication, then make sure that you have authenticated the current user
If you have the oracle login credentials try connecting using the following Connectionstring
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;
Also you can use Microsoft OLE DB Provider for Oracle
Provider=MSDAORA;Data Source=MyOracleDB;Integrated Security = SSPI;
References
Oracle provider for OLEDB connectionstrings
Oracle connectionstrings
Authenticating Database Users with Windows
!
I've tried using ADODB connection string and also in the Excel Data Connection Wizard.
I'm getting this error:
[DBNETLIB][ConnectionOpen(Connect()).]SQL Server does not exist or access is denied.
I can see the server created in Visual Studio with its databases fine, no worries, in SQL Server but not connect in Excel. I can connect in Excel to databases created in SQL Server but not those created in VS (2015).
It's seems like a server issue rather than database one but here's the connection string's anyway:
This works fine for database's created in SQL Server:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Data Source=DESKTOP-ODUI05F\MSSQL2012;Initial Catalog=MyDatabase
but the same string generates the above error when connecting to the server/database created in VS.
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Data Source=(LocalDB)\MSSQLLocalDB;Initial Catalog=aspnet-Widly-20160823125202
The server name is: (LocalDB)\MSSQLLocalDB.
The database is generated in VS using EF.
Please help - driving me nuts.
Thank you, Simon
Solved!
Followed the solution linked below.
Even though it's an MSSQL Server DB you're trying to connect to, using Excel Data Connection Wizard you have to ignore SQL Database connection option and choose "Other/Advanced" instead. I recorded it in a macro which produced all the vital parts for the connection string as follows:
How to connect to localDB in Excel
Provider=SQLNCLI11;
Integrated Security=SSPI;
Persist Security Info=False;
Data Source=(LocalDB)\MSSQLLocalDB;
Initial Catalog=aspnet-PTL-20160827031609
Besides doing the dishes this is my biggest and only achievement today! :)