Excecuting SSIS package deployed in Integration Service Catalog - ssis

I have edited my entire question, first my question was how to execute the SSIS Package, but now I have got the solution to execute it via SQL Server Agent job but when I am trying to execute the SQL Server Agent job, I am getting error , when I viewed in history then following message is shown
Job failed. Job was evoked by the user. Last step to run was step 1.
please note the table where I am inserting the data into database via SSIS package in SQL Express, is it SQL Express creating problem.
---------Updated Error Message-------------
The following error message is seen when I expand log file of SQL Server Agent job,
Executed as user: NT Service\SQLAgent$SQL_Server_Evalu. Microsoft(R) SQL Server Execute Package utility Version 11.0.2100.60 for 64 bit copyright (C) Microsoft Corporation. All right reserved started: 16:11:39 Package Execution on IS Server failed. Execution ID:4, Execution Status:4.
Below is the screen shot how I execute the SQL Server Agent job,
------------Updated error message------------
Below is the screen shot of the error message that are given while execution of the deployed package.
Errors are as follows:
1) Data Flow Task Error: There were errors during task validation.
2) Data Flow Task Error: OLE DB Destination failed validation and return error code 0XC020801C.
3) Data Flow Task Error: One more component failed.
4) Data Flow Task Error: SSIS Error Code
DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER
The AcquireConnection method call to the connection manager "RESHMAJADHAV\SQLEXPRESS.Adventureworks2012" failed with error code 0XC0202009.
5) Package Error: SSIS Error Code DTS_E_OLEDBERROR. An OLEDB error has occured. Error Code: 0X80004005. An OLE DB record is available. source: "Microsoft SQL Server Native Client 11.0" Hresult: 0X80004005 Description:"Login failed for user 'NTSERVICE\SQLAgGENT$SQL_SERVER_EVALU'.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0X80004005 Description:"Cannot open Database" AdventureWorks2012"
requested by login. The login failed"
Is it because of the connection string
"Data Source=RESHMAJADHAV\SQLEXPRESS;Initial Catalog=AdventureWorks2012;Provider=SQLNCLI11.1;Integrated Security=SSPI;Auto Translate=False;"
That I have defined in environmental variables in Integration Service Catalog I am unable to open the database..?
Any help will be greatly apprecaiated...

Data Source=RESHMAJADHAV\SQLEXPRESS;User ID=XXXXXXX;Password=XXXXXXXXX;Initial Catalog=AdventureWorks2012;Provider=SQLOLEDB;
for the destination connection. I think job is not getting the end user name and password.
It might help. I f not can you please post the exact error message. I am no able to see anything form the picture..
Thanks

Related

SSIS Package to copy data from one to another error

I have setup a SSIS package to copy over some data from one table to another. At first I tried doing from one server to another server, did not succeed. Then I tried it doing within the same server, no luck again. I followed couple tutorials/videos how to do it and followed the exact pattern.
However here's what I tried to do:
Create a "Data Flow Task"
Under "Data Flow" tab create an "OLE DB Source" and "OLE DB Destination"
Configure the "OLE DB connection manager" and setup the column mapping, verify connection status for both source and destination
When I run the package I get following errors
Here are the 5 errors that are in the above figure,
[OLE DB Destination 2] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "STLEDGSQL01.MES_DEV" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
[SSIS.Pipeline] Error: OLE DB Destination failed validation and returned error code 0xC020801C.
[SSIS.Pipeline] Error: One or more component failed validation.
Error: There were errors during task validation.
[Connection manager "STLEDGSQL01.MES_DEV"] 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: "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: "Client unable to establish connection".
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Registry information is corrupt or missing. Make sure the provider is installed and registered correctly.".
Now I have tried applying couple of solution that I found in stackoverflow and out in the internet, such as following but nothing helped me so far.
Set delay validation property at package level to True from false
Change ProtectionLevel to EncryptSensitiveWithUserKey
Any help is greatly appreciated!
For anyone who's interested or had the same issue as mine, I just found the answer. I was using the wrong TargetServerVersion in project properties. My SQL server is 2016 and it was defaulted to 2019 automatically in this property page. I did change it back to 2016 and yes it all starts working.
I suggest that you do not use SSIS to move data around inside a database. Just use a stored prcedure or script. Here is a sample script that will copy data from one table to another, but only for data that doesn't exist in the target.
insert into targettable (PrimaryKeyColumn,Column1,Column2,Column3)
select PrimaryKeyColumn,Column1,Column2,Column3
from sourcetable SRC
where not exists (
select *
from targettable TGT
where TGT.PrimaryKeyColumn = SRC.PrimaryKeyColumn
)

Cannot connect to password protected MS Access 2010 database from SSIS package on SQL Server

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.

SSIS Logging Throws an Error

I have programmed some ETL which works OK, the processing finishes without errors. Now I want to create a log using SSIS Loggin feature.
However, once I set this logging up (SSIS log provider for SQL Server; all events; all cotainers are checked, also the log is checked) and start the ETL, the MS Visual Studio 2008 app return error window with not error specified in it so I don't have even clue what could be the problem. The destination of ETL is SQL Server 2008 R2. The credentials are the same as my AD account, I have no problem to write the data into this DB (respectivelly it's tables).
To sum up, the whole ETL run works without problem, but once the SSIS Logging is turned on, the ETL does not even start.
One notice: the log table was created in the DB though [domain\user_name].[sysssislog]. Also the logging to e.g. text file works without any problems.
Any suggestions, please?
+++
Error I am receiving
TITLE: Package Validation Error
Package Validation Error
ADDITIONAL INFORMATION:
Error at Reporting_v3 [Log provider "SSIS log provider for SQL Server"]: 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: "There is already an object named 'sysssislog' in the database.".
Error at Reporting_v3 [Log provider "SSIS log provider for SQL Server"]: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E14.
There is like around 500 rows with the same error. If I delete the ssislog table and run the package with SSIS Logging turned on, the table is created again and the same error pops up.
Fixed. The solution can be found at the following link:
http://connect.microsoft.com/SQLServer/feedback/details/467794/ssis-log-provider-for-sql-server-do-not-work-when-default-schema-is-not-dbo-sysdtslog90-sysssislog

Error while executing SSIS package from JOB

Message
Executed as user: UKDBT91DB05V\SYSTEM. Microsoft (R) SQL Server
Execute Package Utility Version 10.50.2500.0 for 64-bit Copyright
(C) Microsoft Corporation 2010. All rights reserved. Started:
14:58:34 Error: 2013-04-01 14:58:34.45 Code: 0xC0016016
Source: Description: Failed to decrypt protected XML node
"DTS:Property" with error 0x8009000B "Key not valid for use in
specified state.". You may not be authorized to access this
information. This error occurs when there is a cryptographic error.
Verify that the correct key is available. End Error Error:
2013-04-01 14:58:34.76 Code: 0xC001000E Source:
ReceiveDGDinformation Description: The connection "stock" is not
found. This error is thrown by Connections collection when the
specific connection element is not found. End Error Error:
2013-04-01 14:58:34.80 Code: 0xC0202009 Source:
ReceiveDGDinformation Connection manager "Stock" Description: SSIS
Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error
code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft
SQL Server Native Client 10.0" Hresult: 0x80040E4D Description:
"Login failed for user 'DOTCOM\UKDBT91DB05V$'.". End Error Error:
2013-04-01 14:58:34.80 Code: 0xC020801C Source: Populate
Staginng Table Populate DGD Staging table [34] Description: SSIS
Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The
AcquireConnection method call to the connection manager "Stock" 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: 2013-04-01 14:58:34.80 Code: 0xC0047017
Source: Populate Staginng Table SSIS.Pipeline Description:
component "Populate DGD Staging table" (34) failed validation and
returned error code 0xC020801C. End Error Error: 2013-04-01
14:58:34.80 Code: 0xC004700C Source: Populate Staginng Table
SSIS.Pipeline Description: One or more component failed
validation. End Error Error: 2013-04-01 14:58:34.80 Code:
0xC0024107 Source: Populate Staginng Table Description: There
were errors during task validation. End Error DTExec: The package
execution returned DTSER_FAILURE (1). Started: 14:58:34 Finished:
14:58:34 Elapsed: 0.624 seconds. The package execution failed. The
step failed.
Meaningful bits of the error message
Failed to decrypt protected XML node "DTS:Property" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error
Login failed for user 'DOTCOM\UKDBT91DB05V$'
This is probably a problem with your ProtectionLevel setting and how you are configuring the job.
If ProtectionLevel is at the default "EncryptSensitiveWithUserKey" setting, then the development environment is encrypting things like your connection string database password using a key that depends on the user who is doing the development. After you deploy it to the production server and schedule a SQL Server Agent job, it will most likely run under a different user account, and then it will be unable to decrypt the database password. You will get this error.
One possibility would be to make sure the development user and the job execution user are the same user account, but this is not a good idea. Usually you want your production user accounts to be separate from your development user accounts.
Instead, you should set ProtectionLevel to "DontSaveSensitive". Then the password won't get saved with the SSIS package at all. You create a configuration file for the connection string, but the password won't get saved to the configuration file either. You will have to edit the configuration file manually if you want it to include a password. But the best way to do this is to configure the password when you schedule the job that executes the SSIS package. That keeps the password in a safe place, and it isn't floating around all over the place with the SSIS package.
Some useful links here and here.
Good luck!

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.