how to solve problems of configuration in agent SQL? - sql-server

I am doing a data warehousing project using SQL server for the analysis services database. This service works perfectly, but the problem is with the SQL agent. I created a job to do a daily ETL process with SISS packages. When I try to run that job it returns a configuration error in the connection manager (I bring data from postgre SQL with ODBC). The error it returns is the following (translated with google since it returns it in Spanish):
Code: 0xC020801B Source: Data Flow Task OLE DB Destination [2] Description: Cannot find runtime connection manager with id. "{849459E5-813C-4707-810B-4C5214A362DA}". Check that the connection manager collection has a connection manager with that id. End of error Error: 2020-10-02 11: 12: 00.36 Code: 0xC0047017 Source: SSIS.Pipeline Data Flow Task Description: OLE DB Destination validation failed; error code 0xC020801B was returned.
The question is: how can I change this configuration so that in the connection manager it has the same id that SQL Server mentions?

You need to parameterise the connection within the SSIS designer.
See this article

Related

The component metadata for "Oracle Destination" could not be upgraded to the newer version of the component

I'm trying to tranfer data from Microsoft SQL Server to Oracle by SSIS.
- Microsoft SQL Server 2017.
- Oracle 11g.
- Microsoft Visual Studio 2019.
If I set TargetServerVersion = SQL Server 2019, it's working.
If I set TargetServerVersion = SQL Server 2016, it's not working.
SSIS package "C:\~Akkapolki\Project\Microsoft Visual Studio Community 2019\MicrosoftSQLServerToOracle\MicrosoftSQLServerToOracle\MicrosoftSQLServerToOracle.dtsx" starting.
Error: 0xC004801F at Data Flow Task, SSIS.Pipeline: The component metadata for "Oracle Destination, clsid {4F885D04-B578-47B7-94A0-DE9C7DA25EE2}" could not be upgraded to the newer version of the component. The PerformUpgrade method failed.
Information: 0x4004300A at Data Flow Task, SSIS.Pipeline: Validation phase is beginning.
Error: 0xC001000E at MicrosoftSQLServerToOracle: The connection "{2739438E-C724-491F-8846-4777F0F7EEE3}" is not found. This error is thrown by Connections collection when the specific connection element is not found.
Error: 0xC004800B at Data Flow Task, SSIS.Pipeline: Cannot find the connection manager with ID "{2739438E-C724-491F-8846-4777F0F7EEE3}" in the connection manager collection due to error code 0xC0010009. That connection manager is needed by "Oracle Destination.Connections[MSOraConnection]" in the connection manager collection of "Oracle Destination". Verify that a connection manager in the connection manager collection, Connections, has been created with that ID.
Error: 0xC0047017 at Data Flow Task, SSIS.Pipeline: Oracle Destination failed validation and returned error code 0xC004800B.
Error: 0xC004700C at Data Flow Task, SSIS.Pipeline: One or more component failed validation.
Error: 0xC0024107 at Data Flow Task: There were errors during task validation.
SSIS package "C:\~Akkapolki\Project\Microsoft Visual Studio Community 2019\MicrosoftSQLServerToOracle\MicrosoftSQLServerToOracle\MicrosoftSQLServerToOracle.dtsx" finished: Failure.
The program '[82392] DtsDebugHost.exe: DTS' has exited with code 0 (0x0).
Oracle Destination component.
Oracle Connector you installed for SSIS only works from 2019, if you need to work for earlier versions you need to install additional attunity connectors.
https://learn.microsoft.com/en-us/sql/integration-services/data-flow/oracle-connector?view=sql-server-ver15#installation
For Sql server 2016, download and install AttunitySSISOraAdaptersSetupX64.msi from https://www.microsoft.com/en-us/download/details.aspx?id=52950

SSIS Lookup Transformation error: The EXECUTE permission was denied on the object 'sp_describe_undeclared_parameters'

I'm upgrading SSIS packages from SQL Server 2008 R2 to 2017. After upgrading one of the packages, the parameterized query in the Advanced tab of a Lookup Transformation is now throwing a validation error. It is possible that this is the only package in the collection that uses a Partial Cache, since I couldn't find any successfully upgraded examples to compare it to.
When I tried to run the package, it logged these errors:
Error: 2019-02-11 10:49:40.11
Code: 0xC0202009
Source: Anonymized DFT [209]
Description: 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: "The EXECUTE permission was denied on the object 'sp_describe_undeclared_parameters', database 'mssqlsystemresource', schema 'sys'.".
End Error
Error: 2019-02-11 10:49:40.15
Code: 0xC020824C
Source: Anonymized DFT [209]
Description: OLE DB error occurred while loading column metadata. Check SQLCommand and SqlCommandParam properties.
End Error
Error: 2019-02-11 10:49:40.18
Code: 0xC004706B
Source: Anonymized DFT SSIS.Pipeline
Description: "Anonymized DFT" failed validation and returned validation status "VS_ISBROKEN".
End Error
Error: 2019-02-11 10:49:40.22
Code: 0xC004700C
Source: Anonymized DFT SSIS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2019-02-11 10:49:40.27
Code: 0xC0024107
Source: Anonymized DFT
Description: There were errors during task validation.
End Error
I was hoping to just re-map the parameters, but I get about the same set of errors by trying to open the Parameters dialog on the Advanced tab of the Lookup Transformation.
The obvious answer, based on the messaging, is that it's a permissions issue, but according to the documentation for sp_describe_undeclared_parameters:
Permissions
Requires permission to execute the #tsql argument.
Both I and the service account that the job runs under have permission to execute the parameterized query.
I did a side-by-side comparison of the both the Lookup Transformations and their corresponding Properties windows between the 2008 R2 package, which runs fine on the 2008 R2 server, and the new 2017 package. The only new property value I found was TreatDuplicateKeysAsError, but changing that has no effect on my situation.
Looking at the Advanced Editor, the column references in the ParameterMap appear to be correct, but the query isn't picking them up.
Is there more to the permissions issue than I'm seeing, or is there something else that I'm missing here?
I can't point to a specific source that suggested this as a possibility, but in the end I added an additional Connection Manager pointing to the same server and database as the original, but instead of using the SQL Server Native Client 11.0 provider, I changed it to Microsoft OLE DB Provider for SQL Server.
Boom. Validation error cleared; package is running.
While that's a solution, it's not a explanation, so if anyone wants to chime in, have at it. I've wasted most of a day chasing this ghost, so for the time being I'm going to take my running package and call it good enough for a Tuesday.

BIDS 2008 SSIS Package Data Flow Task fails validation and returns "VS_ISBROKEN" Error

A BIDS 2008 SSIS package that I am working is failing validation when it reaches any Data Flow Task in the package. I am able to run the SSIS package within BIDS 2008 on my computer locally. When I run the SSIS package through an SQL Agent Job, the package fails with the error message below. I have researched error code 0x80004005 and error code 0xC004706B through Google searches, but have not found anything that is of use.
The SSIS package in question is one of several SSIS packages that run together in the same SQL Agent Job. The other SSIS packages in the original SQL Agent Job all are able to run successfully. This leads me to believe that the SQL Agent Service Account and Proxy Account are configured with the appropriate permissions. A DBA was able to confirm that the Service Account and Proxy Account do have the appropriate permissions.
The SQL Agent Job runs the SSIS package using the Operating System (CmdExec) type and the SSIS package has Run64BitRuntime set to FALSE so the SSIS Package is running under the 32-bit runtime.
For debugging purposes, I recreated the Data Flow Task, Database Connections, and related source and destination tasks in a new SSIS Package from the original SSIS package. The debugging SSIS package is able to run locally on my computer, but fails when I try to run using a new SQL Agent Job setup exactly like the original SQL Agent Job.
I have also use different Database Connections such as Native OLE DB\SQL Server Native Client 10.0, 10.1, 11.1, and Native OLE DB\Microsoft OLE DB Provider for SQL Server. All of which have failed when I test the debugging SSIS package
I have verified that the metadata for the OLE DB Source and Destinations match the datatypes and lengths in the SQL Server Database tables. I have verified that the stored procedure used by the OLE DB Source task in the Data Flow Task work when ran on SQL Server Management Studio and the Service Account has permissions to run the stored procedure.
I think that is every bit of information that I can recall from working on troubleshooting this issue.
Has anyone else come across this error before? Any possible solutions to attempt?
Any help is welcomed!
Error Message:
Executed as user: domain\SQLAgentServiceAccount. Microsoft (R) SQL Server Execute Package Utility Version 10.50.2500.0 for 64-bit
Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 1:37:09 PM
Error: 2014-08-14 13:37:09.94 Code: 0xC0202009 Source: Data Flow Task - OLEDB Source [1]
Description: 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: "Syntax error or access violation".
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC004706B Source: Data Flow Task SSIS.Pipeline
Description: "component "OLEDB Source" (1)" failed validation and returned validation status "VS_ISBROKEN".
End Error
Error: 2014-08-14 13:37:09.94 Code: 0xC004700C Source: Data Flow Task SSIS.Pipeline
Description: One or more component failed validation.
End Error
Error: 2014-08-14 13:37:09.94 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:37:09 PM Finished: 1:37:09 PM Elapsed: 0.219 seconds. Process Exit Code 1.
The step failed.
I found the this solution :
Ensure that the connection string in Connection Manager has "Provider=SQLNCLI11.1; Persist Security Info=True; Auto Translate=False;"
I did it and it worked for me on Hyperscale / SQL Server.
This is kind of strange error that I got a while ago and I used the following to resolve the problem:
Run command prompt as Administrator
Type the following command and hit Enter: regsvr32 jscript.dll
Type the following command and hit Enter: regsvr32 vbscript.dll
The solution to the problem was that the service account that is running the SQL Agent job did not have execute permissions on the stored procedure being executed through the Data Flow Task. Gave the service account execute permissions and the SSIS package was able to successfully execute.

SSIS Package Errors using OLE DB Command transformation

I recently begun upgrading a MS SQL Server 2005 instance to MS SQL 2012. I have created a VM and installed MS SQL Server and used backups to create the DBs on the new server.
In Visual Studio I was switching my old connections to the new connections and when I switched the connection of an OLE DB Command Transformation that contains the command "UPDATE JOB SET Active = 0 WHERE Job.JobId = ?" I received the following errors.
Error 1 Validation error.
Sync Jobs: Sync Jobs: 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: "The
metadata could not be determined because statement 'REVERT
--Check if SSB is enabled in this database' in procedure 'sp_send_dbmail'
does not support metadata discovery.". JobPack.dtsx 0 0
Error 2 Validation error.
Sync Jobs: Sync Jobs: Unable to retrieve
destination column descriptions from the parameters of the SQL
command. JobPack.dtsx 0 0
I checked to make sure this "SSB" was on in the new DB (it wasn't) but even after enabling it I still cannot resolve this error. I switch back to the old server and it works fine...
UPDATE:
I was wondering where the email procedure came into play and I found that the DB has a trigger that emails when updated. Disabling this trigger resolves the SSIS package issue. I still have no idea why BIDS shows an error in the editor when this trigger is enabled.
I was able to resolve this issue simply by switching from the Native SQL Driver to the MS SQL Driver on the transformation. I still have no idea why that works and why this caused a compatibility problem.
I came across a similar error.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "The metadata could not be determined because statement '....' uses a temp table.".
Work around.
If SP uses a #table or ##table and it is used in the SP, then we need to specify the #table structure along with the EXEC.
The SP should be given along with the structure.
EXEC SP_TestTemp 1,2
it should be given like
EXEC SP_TestTemp 1,2 WITH RESULT SETS
(
(
id int,
Marks int
)
)
Note: the 'retain same connection = true' and 'validate external metadata' = false did not help/work here.

Oracle Transaction under MS SSIS

I'm trying to get transactions working under SSIS (SQL Server Integration Services 2005) and Oracle with no luck. I'm using Oracle 10g.
I have created a Sequence Container, set its TransactionOption to "Required" and put inside it a DataFlow Task with TransactionOption = "Supported".
The server running SSIS has the MSDTC service running.
The DataFlow Task has, as source, a SQL Server OLEDB connection and as target an Oracle OLEDB connection.
When trying to execute it, I get the following errors:
Error: 0xC001402C at MediaMarketAnnullamento, Connection manager "ITMASORASVIL:1521/SVILUPPO.EDP": The SSIS Runtime has failed to enlist the OLE DB connection in a distributed transaction with error 0x8004D01B "The Transaction Manager is not available.".
Error: 0xC0202009 at MediaMarketAnnullamento, Connection manager "ITMASORASVIL:1521/SVILUPPO.EDP": SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x8004D01B.
Error: 0xC020801C at 9999 - Insert_MAGAZZZINO_MM_SHOW, MAGAZZINO_MM_SHOW_SSIS [2187]: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "ITMASORASVIL:1521/SVILUPPO.EDP" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
Error: 0xC004701A at 9999 - Insert_MAGAZZZINO_MM_SHOW, DTS.Pipeline: component "MAGAZZINO_MM_SHOW_SSIS" (2187) failed the pre-execute phase and returned error code 0xC020801C.
Information: 0x40043009 at 9999 - Insert_MAGAZZZINO_MM_SHOW, DTS.Pipeline: Cleanup phase is beginning.
Information: 0x4004300B at 9999 - Insert_MAGAZZZINO_MM_SHOW, DTS.Pipeline: "component "MAGAZZINO_MM_SHOW_SSIS" (2187)" wrote 0 rows.
Task failed: 9999 - Insert_MAGAZZZINO_MM_SHOW
Information: 0x4001100C at 9999 - Insert_MAGAZZZINO_MM_SHOW: Aborting the current distributed transaction.
Information: 0x4001100C at Insert su Oracle: Aborting the current distributed transaction.
SSIS package "MediaMarketAnnullamento.dtsx" finished: Failure.
Any help?
Thanks
EDIT:
I just discovered that the server running Oracle is not, as I thought, Windows based but IBM ICS. I don't know if this is relevant.
Looks like it may be a problem with MSDTC permissions this MS blog post might help to debug it. Also I'm assuming that the permissions on the Oracle server are set correctly see this MS kb article for help with this.
Is this doc of any use?
http://msdn.microsoft.com/en-us/library/aa344212.aspx

Resources