SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


OLEDB Command fails pre-execute phase


OLEDB Command fails pre-execute phase

Author
Message
smecharrafie
smecharrafie
SSC Journeyman
SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)

Group: General Forum Members
Points: 85 Visits: 189
Im using an OLEDB Command to call a certain procedure, which is failing at runtime with the following error: (Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Syntax error, permission violation, or other nonspecific error".)

Been doing some research and there's nothing wrong with the passing of the parameters nor is there any update statement in the procedure which was working just fine.. In fact the problem seems to be with the transformation itself: ([DTS.Pipeline] Error: component "OLE DB Command" (79785) failed the pre-execute phase and returned error code 0xC0202009.)

Recently however I added an sql task transformation to the flow which creates and fills a temporary table. I don't find any reason though why it should affect the flow, nevertheless its the only thing that has changed in the package ever since it was executing normally!

any ideas??
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27831 Visits: 13268
You mentioned a temporary table.
When SSIS starts evaluating your package, the temporary table doesn't exist yet.
Hence, he will find a reference to an object that he cannot find.

Solution: you must set the property DelayValidation of all components/tasks that use this temporary table to True.

See if that helps.

Regards


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
smecharrafie
smecharrafie
SSC Journeyman
SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)

Group: General Forum Members
Points: 85 Visits: 189
The delay validation property is already set to true and the temporary table is not related to the procedure in any way! I tried to disable the DFT that is failing, another DFT also containing an OLEDB Command calling the same procedure fails on pre-execution, the weird thing though is that the validate external metadata property on that transformation is set to False... im starting to doubt either it has something to do with parameter passing or with database permissions, the schema's owner however is set to dbo.
smecharrafie
smecharrafie
SSC Journeyman
SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)SSC Journeyman (85 reputation)

Group: General Forum Members
Points: 85 Visits: 189
Solved: The components that relate to the temporary tables should have the Persist Security Info property in the OLEDB Connection manager set to False, while the rest of the transformations requiring an OLEDB Connection should read from one that has the Persist Security Info property set to True (that what was causing the OLEDB Command to fail calling the stored procedure at runtime)

regards,
Samer.
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27831 Visits: 13268
Learned something new today. Thanks for letting us know.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
sharath_s93
sharath_s93
Grasshopper
Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)Grasshopper (19 reputation)

Group: General Forum Members
Points: 19 Visits: 27
This worked fine. Thanks a lot.
But my problem is source and destination are both pointing to the same database and hence I had to create a new connection with same details again and the only difference between the 2 connections is "Persist Security Info". Is there any other way to resolve this issue?
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18963 Visits: 20460
Use Windows authentication in your connection.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search