Test connection successfully and can't run the stored procedure in Execute SQL Task - ssis

I have a simple package looks like:
enter image description here
In Task, it only executes the script: exec [procname]
The connection to SQL DB is successful:
enter image description here
While it shows error when running package in SSIS:[Execute SQL Task] Error: Executing the query "EXEC [dbo].[xxx]" failed with the following error: "Login failed for user 'CORPORATE\xxx'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
The permission for CORPORATE\xxx has been given to DB:
enter image description here

Related

SSIS Error: Disconnected recordsets are not available from ODBC connections

I have one EXECUTE SQL TASK in SSIS package ,
Task Type: Execute SQL TASK
Data Source Type: ODBC for MySql (DSN)
Error :
[Execute SQL Task] Error: Executing the query "select * from
nasb_dev.v_borrower_address" failed with the following error:
"Disconnected recordsets are not available from ODBC connections.".
Possible failure reasons: Problems with the query, "ResultSet"
property not set correctly, parameters not set correctly, or
connection not established correctly.
it works fine with OLEDB..
any suggestion ?

Error when calling BigQuery stored procedure from SSIS using Simba odbc driver

I’m trying to call a BQ stored procedure in SSIS using Simba odbc driver and getting an error
[Execute SQL Task] Error: Executing the query "CALL
`mhpmvp.MCR_V01_M_MA..." failed with the following error:
"[Simba][BigQuery] (70) Invalid query: Positional query parameters are
not supported in scripts". Possible failure reasons: Problems with the
query, "ResultSet" property not set correctly, parameters not set
correctly, or connection not established correctly.**
The call worked in query editor
The sp doesn’t take parameters and doesn’t return anything
The connection is fine. It works if I run a select query
I'm from Google Cloud Platform Support.
I can see that this issue is already being investigated internally. I created a Public Issue in our Tracker regarding this, so you can subscribe to or star it to receive a notification whenever an update is posted.

Error: The connection "" is not found. This error is thrown by Connections collection when the specific connection element is not found

I have an Execute SQL task in my package which calls a stored procedure.
when i run the package, it throws the following error Error: The connection "" is not found.
This error is thrown by Connections collection when the specific connection element is not found.
The maximum error count has reached but still the package doesn't stop instead the component remains in Yellow color. And if I stop the package and re-run it, it runs successfully.
Does the error means that during my previous run the Maximum Timeout time for the server has been crossed?

ssis error code 0xC0209029 while processing input "OLE DB Destination Input" (4416)

I have package which have sequence container and inside that sequence container there is 10 child sequence container each container represents the single table. When I execute that Package to through the SQL Server Job all eight or nine container execute successfully but only one or two container give error which has given below. But when we go to the package and right click on error container and execute them it executes success fully. Please help me to solve this mystery.
"OLE DB Destination" (4403) failed with error code 0xC0209029 while
processing input "OLE DB Destination Input" (4416). The identified
component returned an error from the ProcessInput method. The error is
specific to the component, but the error is fatal and will cause the
Data Flow task to stop running. There may be error messages posted
before this with more information about the failure. End Error
DTExec: The package execution returned DTSER_FAILURE (1). Started:
12:30:00 AM Finished: 3:01:13 AM Elapsed: 9072.95 seconds. The
package execution failed. The step failed.
My case is that implicit conversion is failing. This occurs when attempting to import different uppercase and lowercase value field. So you could check the fields match values into SSIS and find differences (upper & lower case)
Check the user(login and password) of the connection you use in your OLEDB.
If the user you configured in the connection does not have rights on ther server it wont work.
Do not forget to check the "save password" option if you'd entered a specific user.
This is a connection timeout error.
Solution: Use fast load mode, i.e. Table or view - fast load.
Check following:
Check if there is proper mapping between source and destination.
Login is working.
Connection is not broken.
Check if the SQL server has short connection timeout.
Check if the destination is not using a connection manager added for the source.

SSIS Package DB Connection check

I have an SSIS package which has a connection to a database. I took the database down to test a scenario, but the package gives me the following error in the output window when starting the package when the DB is offline:
SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "DBNAME" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed.
I need to check the connection when the package is run and notify a user, via email, that the DB is down. How would I go about doing this?
I have the code to send the email, I just need to do the DB check when the package is run.
Use a script task. Try to open a connection to your database and if it fails then Dts.TaskResult = Dts.Results.Failure.
A great post about this issue here :
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/7de0216b-3a0a-40ce-8149-f566a05010c9/ssis-check-database-connection-and-if-disconnected-send-email-alert?forum=sqlintegrationservices
Make your DB check occur outside of your package. How is the package run? Scheduled in SQL Agent or kicked off by the user? Instead of just running DTEXEC, first run a script that checks connectivity, i.e. using SQLCMD.EXE.
But really a better way is to run the package as normal then check the SSIS logs afterwards and send an appropriate message. Otherwise you'll be cooking up all different kinds of custom pre-execution checks to run.
I'm no batch script expert but here's an example of a bit of code you can use to test connectivity to a SQL Server and call another batch script if it fails, otherwise run the package with DTEXEC.
SQLCMD -S YOurServer -E -Q "SELECT ##VERSION"
IF ERRORLEVEL 1 (
CALL YourEmailScript.CMD
)
ELSE
(
DTExec /f "\\pathtodtsxfile\file.dtsx"
)
This is not production quality code. I would not recommend calling your DTEXEC in this way, it's just an example.
I finnally got it working. What I did was, create an XML file with the database settings, data source, initial catalog etc. Then added a script task, added some code to read the settings from the XML file and create a SQLConnection and connect to the DB in a try catch. If there is an error send an email, and in the finnaly closed the SQL connection.
But to get this working you HAVE to ensure that you connection has the property 'DelayValidation' set to TRUE. If not the package will fail to aquire a connection before the script task gets executed.