.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Why can't I execute a DELETE query in SSIS?

Posted By:      Posted Date: October 04, 2010    Points: 0   Category :Sql Server

Select * from Table    ->  works

Delete from Table       -> throws error about no instance instantiated

View Complete Post

More Related Resource Links

Export SQL query from Execute SQL in SSIS


I am new to SSIS and I was wondering if it was possible to export a SQL query using Execute SQL query to an excel or text file.

All i need to do is export the results of

SELECT AccountID, BranchID, DepartmentID, ClientName, GroupNumber, PAREA, ProductCode, ProductDescription, SearchType, Quantity, ClientType, Filler,
VRM, VIN, [Transaction Date], TransactionValue
FROM MangoletsiHoldings
WHERE (SearchType = '4') AND ([Transaction Date] BETWEEN '01/08/2010 00:00' AND '05/08/2010 00:00')

to an excel or txt file, any help is much appreciated.



Execute SSIS Package PART based on Some Condition

Hello, Is it possible to execute part of the Package based some condition? (Like If var1 = true, then execute this block). If Yes, what control flow I should use. Please advse. I will have a Package Variable and if that variable is True then some part should execute. REst all should execute every time the package is called. Like if I will have "2 Sequence Container" in my control flow, the first one should execute every time, but 2nd one only if the variable value = True. Thanks, Prabhat

SSIS OLEDB DataSource - Parameterized Query

Hi Team,We use SSI 2005 for one of our projects. We need to connect to the Oracle database and extract data. When we extract data from the source, we use the OLEDB Source and pass the SQL statement through an expression. We have a limitation of 4000 character when we use these expressions. To avoid this, we tried using parameterized queries as mentioned below:SELECT col1, col2, col3 ... col n FROM tab1 WHERE col1 > :PARAM1;When we try to assign the parameters, we end up getting an error as below."Parameters cannot be extracted from SQL Command. The provider might not help to parse parameter information from the command. In that case, use the "SQl Command from Variable" access mode, in which the entire SQL commands is stored in a variable"However, if use the SQL Server as a data source, I can assign the parameters. Could anybody let me know if this is a limitation from SSIS orif I am doing something wrong.Please suggest.ThanksAtukuri

Execute an SSIS package from ASP.net (C#) - my package keeps failing. Help! - Works on localhost but

I'm looking for any and all information on how to execute an SSIS package from my asp.net web site. I have written the call and when I run the application from (Localhost) it works, but when I run it from the server it does not.Here is my code to call and execute the package: public string ProcessFiles(int ClientID, string FileName) { //System.Security.Principal.WindowsImpersonationContext impersonationcontext; //impersonationcontext = ((System.Security.Principal.WindowsIdentity)ServiceContext.User.Identity).Impersonate(); string packagePath = "\\\\\\Customer File Import.dtsx"; Microsoft.SqlServer.Dts.Runtime.Application app; Microsoft.SqlServer.Dts.Runtime.Package pkg; Microsoft.SqlServer.Dts.Runtime.Variables vars; Application integrationServices = new Application(); DTSExecResult result; FileName = FileName.Substring(FileName.Length - 25 , 25); app = new Microsoft.SqlServer.Dts.Runtime.Application(); pkg = app.LoadPackage(packagePath, null); //pkg = integrationServices.LoadFromSqlServer("Customer File Import.dtsx", "", "healthtech\\brian.montfort", "Nightdragon8", null); vars = pkg.Variables; if (pkg.Variables.Contains("

Execute SSIS package stored in Database - From Stored Procedure

Dear frnds, I am trying to execute a SSIS package that is stored in a SQL Server 2005 database Want to execute from a stored procedure in same database.  What commands/operations are necessary ? I am also having Two parameter. Regards, sajid 

Any way to execute a workflow when a caml query returns zero items?

Lets say I have a list with a status column and I want to execute a workflow when all items in the list have a status of complete. I basically want to execute a workflow when the caml query looking for non-complete statuses returns zero rows. Can I do this with SPD or are there any 3rd party tools for this? I'm thinking of writing one if there are not.

Execute SSIS PAckage on Remote Server

I've seen several posts pertaining to this topic, but none of them covers what I'm having an issue with. I'm trying to create a "master job server". Essentially, I want to control all maintenance jobs from one central location. I've created SSIS packages that handle full backups, transaction log backups, index rebuilding, etc. on all of my production boxes. I've stored those packages in SQL Server. What I'd like to do now is create a separate job for each of those tasks on one central SQL Server and run those packages from there. I've been successful in creating a test job. The only step in the job is an SSIS PAckage execution step. The step successfully found the package I want to execute on the target server. When the job ran, I got the follwoing error: The job failed.  Unable to determine if the owner (ADMINSYS\arobinsf) of job SFO2PQE03 - Database Backup (FULL) has server access (reason: Could not obtain information about Windows NT group/user 'ADMINSYS\arobinsf', error code 0x2751. [SQLSTATE 42000] (Error 15404)). I want to make sure this job is executing on the remote server and not trying to execute locally. Is there something I'm missing in the set up of this job? I should also mention that the SSIS packages were created in SQL2K5, but I'm executing them from SSMS for SQL2K8. Any help would be appreciated! Thanks! A. M. Robinson

SSIS Query requiring two variables

I have a query in which I need to use two variables. How do I implement this in SQL task editor for the intake of two variables????

SSIS package is giving error when ran thru JOB...its running good when I execute in BI Studio or Exe

Friends I am getting weird issue...I built an SSIS package. In one variable I used express builder and built like this... RTRIM( (DT_STR, 2,1252)  (((DT_I4) ( (DT_WSTR, 3) (SUBSTRING( @[system::machineName] , 12, 16 ))) +1) /2)) when I run the package outside ie., with VStudio or execute utility it running absolutely with out any problem. But when I created a job just to execute that package in particular timings...the job is totally failing by throwing error....the error output is like the following: Started:  10:22:33 AM Error: 2010-02-27 10:23:06.23    Code: 0xC00470C2    Source: Rerun_MissingFiles    Description: Error code 0x80020005 occurred attempting to convert from data type DT_WSTR to data type DT_I4. Error: 2010-02-27 10:23:06.23    Code: 0xC00470C4    Source: Rerun_MissingFiles    Description: Casting expression "(SUBSTRING( @[system::machineName] , 12, 16 )))" from data type "DT_WSTR" to data type "DT_I4" failed with error code 0xC00470C2. End Error Can any one help me please? Thanks in advance.

SSIS Execute Process Task Give "Access is Denied" error but it is not related to access control.

Hello All - I have a very weired SSIS problem. I am using BIDS in two machines - Windows 7 Professional Edition x64 bit (development workstation) and Windows 2003 Standard Edition x32 bit SP2 (server) . The visual studio version on both the machines are Version 2.0.50727 SP2. I found that my package's ExecuteProcessTask fails with "Access is denied" error in Windows2003 but runs ok in Windows 7 dev box. I then tried to debug the package in the Windows 2003 environment itself. The package failed in debug mode too with the same message. After looking for a while I found that when I shorten the Argument length of the failing ExecuteProcessTask the task did seem to work. So in Windows2003 environment if my argument exceeds 1846 characters the ExecuteProcessTask fails with message "Access is Denied". If the argument string is less than 1846 it works ok. In Windows 7 environment there is no problem at all. It does not seem like access problem but I may be wrong. Has anyone seen this? I will appreciate any reply. Thanks, Niben  

How to enable delete column at Gridview when having specify query.

Hello:  I have trouble to add delete column to gridview when using specific query. I have PK set up at the table, I need add specific query to display data at gridview:   SELECT [PID], [GID], [TID], [SID], [NEWSID] FROM [TableOne] WHERE ([NAME] = ?)   After builder this query, I click advanced button. However, generate insert, update, and delete Statements is not enabled.   How to add delete column to this gridview?   Your help is highly appreciated.

Implementing Transaction in SSIS Package - [Execute SQL Task] Error: Failed to acquire connection "<

I have a simple SSIS package with three "Execute SQL Tasks". I am using ADO.Net Connection to execute SPs on a DB server. When I execute this package It works fine. So far so good. Now, I need to implement transation on this package. And problem starts now onwards. When I try to execute package after setting TransationOption = Required for the Sequence container which contains all the tasks, I get following error. [Execute SQL Task] Error: Failed to acquire connection "NYCDB0008.Export". Connection may not be configured correctly or you may not have the right permissions on this connection. "NYCDB0008.Export" is the name of the ADO.Net connection. I have been hunting for any solution but all in vain. I have tried changing all DTC settings on the dev as well as Database server. Please respond if anyone has any solution. Thanks! Anand

CAST in delete query-Performance is so slow

Hi all, I've below join in the delete statementt, but it's taking so long the query run, the performance is really bad because of cast conversion, is there a better way, especially performace wise to fasten this below join, A.PHONE in nvarchar data type and DNC.PHONE_NUMBER  is in bigint data type.   A.PHONE=CAST(DNC.PHONE_NUMBER as varchar (15)) Thank you.

SSIS Execute Process Task Problems

I have a command to decrypt a file that I can run from the command line and it works beautifully.  However, when I stuff it into an execute process task, it errors out every time or does nothing.   Here is the command I can run from the command line:   gpg -d --passphrase-fd 0 < c:\Dip_Fif.WUZ -o c:\Someoutputfile.in1  -r "KeyName" c:\Someinputfile.in1.pgp     I've pointed the execute process task object to the gpg.exe executable on my system and am stuffing the remainder in the arguments line.  I have also tried changing around all the timeout settings and sucess values.  I have found I can change the success value to 2 and it will show up as being green when complete, but the file doesn't decrypt.  It just in turn will throw an error on the next piece because the required file is not there.   I will probably end up writing a script to get this to work and use a script task but I really want to know why this will not work.   --Thanks--

Execute delete

I accidentally execute delete for a table. However, I stoped it before it is complete. I assmue this will have no effect on the DB side. Am I correct?   Thanks in advance, Chen

Send multiple parameters SSIS execute process task



We are using Execute Process Task in SSIS package to execute a batch file to house keep the generated flat files which are older than a week from the archive folder.

The same batch file is used to delete the some temp files generated in the process.

As the Archive folder and temp folder paths are configurable, we are trying to pass the folder paths as parameters to batch file.

I used Expressions tab of Execute process Task Editor to map the variable to Arguments property. This is working fine. but I need to pass one more variable as an Argument.

Can some one help me how to achieve this. Thanks in advance.


Sreekanth ABS



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend