Execute A DTS Package From Asp.net Page In VB

Aug 23, 2007

I have been searching and not having any luck finding out how to implement a DTS package from a webpage in vb.net. For some reason, I can't get the search function on this site to work more than once a session.(I think our company has massive firewalls.) anyway.....

I have learned how to create the DTS in SQL for my database, but can't figure out how to call it or have it run, from a webpage. I found the following code:

Dim DTSPackage 'As DTS.Package
Set DTSPackage = CreateObject("DTS.Package")

DTSPackage.LoadFromStorageFile DTSGlobalVariables("DTSLocation").Value, ""
DTSPackage.FailOnError = True

DTSPackage.GlobalVariables("SendValue") = DTSGlobalVariables("ValueSend").Value

DTSPackage.Execute

MsgBox "You will execute " & CStr(DTSPackage.GlobalVariables("valueReceived"))

DTSGlobalVariables("ReceiveValue").Value =
CStr(DTSPackage.GlobalVariables("ReceiveValue"))

But I don't know which variables to replace, and with what. Is this all I need? My goal is to be able for the user to click a button to import  a .csv file and append that to a table in my sql db.

thanks,
SMc 

View 17 Replies


ADVERTISEMENT

Looking For A Way To Refer To A Package Variable Within Any Transact-SQL Code Included In Execute SQL Or Execute T-SQL Task

Apr 19, 2007

I'm looking for a way to refer to a package variable within any
Transact-SQL code included in either an Execute SQL or Execute T-SQL
task. If this can be done, I need to know the technique to use -
whether it's something similar to a parameter placeholder question
mark or something else.


FYI - I've been able to successfully execute Transact-SQL statements
within the Execute SQL task, so I don't think the Execute T-SQL task
is even necessary for this purpose.

View 5 Replies View Related

SSIS Execute Package With Execute Out Of Process = True Causes ProductLevelToLow Error

Mar 6, 2008



Hi.

I have a master package, which executes child packages that are located on a SQL Server. The Child packages execute other child packages which are also located on the SQL server.

Everything works fine when I execute in process. But when I set the parameter in the mater package ExecutePackageTask to ExecuteOutOfProcess = True, I get the following error


Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "Row Count" (5349).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "SCR Custom Split" (6399).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "SCR Data Source" (5100).

Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "DST_SCR Load Data" (6149).

The child packages all run fine when executed directly, and the master package runs fine if Execute Out of Process is False.

Any help would be greatly appreciated.

Thanks

Geoff.

View 7 Replies View Related

Passing A Variable Value (Package Scope) To A DTS Package Embedded Into Execute DTS 2000 Task

Jul 19, 2007

Hi friends,

I have a for each loop that populates from a set of flat files into a Sql Server table, I run the Flat file Import via a dts package embedded into Execute DTS 2000 Task. I want to pass the Sourcefile Name that is fetched by the For Each Loop to assign it Global Variable in DTS. how this can be made ?



Thanks

Subhash Subramanyam

View 4 Replies View Related

Passing Execute DTS Package Result (success/failure) To Calling SSIS Package

Mar 6, 2008

I have a SSIS job, one of the last steps it performs is to execute a SQL 2000 DTS package. This has to be done as a SQL 2000 DTS package as it is performing rebuilds of SQL 2000 Analysis Services dimensions and cubes. We've found that when the DTS fails the SSIS job is happily completing showing as a success, we would prefer to know it went wrong.

As far as I'm aware SSIS merely starts the DTS off and doesn't care about it's result. I've taken a look in to turning on the logging for the execute DTS package and thought that the ExecuteDTS80PackageTaskTaskResult would give me the answer I need...but is merely written to the log not available as an event-handler. It also looks like it is not safe to put a SQL task in as the next item to go look at the SQL 2000 system tables to look at the log for the DTS package as the SSIS documentation warns that the DTS package can continue to run after the execute DTS package task has ended.

Ideally I want any error raised within the DTS package to cascade up to be an error in the SSIS job, I can then handle it appropriately. I cannot find a way to do this. Is there a way?

If not, can anyone suggest how in the remainder of the SSIS tasks I can be sure that the DTS has completed before I start any other tasks that will check for the SQL 2000 log of its execution?

View 5 Replies View Related

Execute Package Task: Error 0x80070005 While Preparing To Load The Package. Access Is Denied.

Jun 8, 2007

I am having problems executing a child package from a parent package using the Execute Package Task. I am attempting to run the master package through a SQL Server Agent job.

The SQL Server Agent job is owned by sa. The step that runs the parent package is configured to load the package from the SSIS Package Store on the same server that the job is running.

I have the Execute Package Task configured as follows:

Location: SQL Server
ExecuteOutOfProcess: True
Connecting as a SQL Server login (let's say TestEtl)

I have added the db_dtsoperator database role to both the TestEtl login and the login that SQL Server Agent connects through. I have also configured the child package's reader role to include db_dtsoperator. Per http://msdn2.microsoft.com/en-US/library/ms141053.aspx, this should allow these logins to run the child package.

I have enabled logging of all events in both the parent and child packages. I see the following in the logs when the Execute Package Task executes (omitted portions unrelated to the execution of the child package task):

450939 OnPreExecute ChildPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 450940 OnPreValidate ChildPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 450941 OnPostValidate ChildPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 450942 User: Diagnostic ETL 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 ExternalRequest_pre: The object is ready to make the following external request: 'IDataInitialize::GetDataSource'.450943 User: Diagnostic ETL 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 ExternalRequest_post: 'IDataInitialize::GetDataSource succeeded'. The external request has completed.450944 User: Diagnostic ETL 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 ExternalRequest_pre: The object is ready to make the following external request: 'IDBInitialize::Initialize'.450945 User: Diagnostic ETL 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 ExternalRequest_post: 'IDBInitialize::Initialize succeeded'. The external request has completed.450946 User: Diagnostic ETL 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 ExternalRequest_pre: The object is ready to make the following external request: 'IDBCreateSession::CreateSession'.450947 User: Diagnostic ETL 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 ExternalRequest_post: 'IDBCreateSession::CreateSession succeeded'. The external request has completed.450948 OnError ChildPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 Error 0x80070005 while preparing to load the package. Access is denied. . 450949 OnError ParentPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 Error 0x80070005 while preparing to load the package. Access is denied. . 450950 OnTaskFailed ChildPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 450951 OnPostExecute ChildPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 450952 OnWarning ParentPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors. 450953 OnPostExecute ParentPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 450954 PackageEnd ParentPackage 2007-06-08 13:35:17.000 2007-06-08 13:35:17.000 End of package execution.

I am sure that what I am doing is quite common, and I obviously have something misconfigured somewhere - but I'm not sure what my misconfiguration is. Can anyone enlighten me?

View 6 Replies View Related

Execute Package Task Can't Continue When The Child Package Failed?

Aug 25, 2006

I use a execute package task to run a child package in which I run some sql task.

as the error handle I insert a script task and link a line from execute package task to script task

of course the line is red,

but I found when the child package failed, the execute package task turns red,it stopped

the script task can't be run, I don't konw why?

View 9 Replies View Related

How To Compose The Connection String Of A SSIS Package That Execute Another Package?

Jul 6, 2006

Dear All,

I now have two SSIS package, "TESTING" and "LOADING". The "TESTING" package have an execute package task that call the "LOADING" package. When I want to execute the TESTING package, how can I setup the connection string so that I can edit the password of the database connected by the "LOADING" package?

Regards,

Strike

View 8 Replies View Related

Setting Connection String For The Package To Execute From Another Package

Jun 29, 2006

I am using execute pacakge task to execute another package . I am giving the Connection string for the package to execute. It works fine in my development machine but when i try to run in another server after i deployed it. It looks for the datasource path of the DTSX file in the same location.

how do i set the path according to each server where the dtsx file is stored. or any other method of storing it like connection string.

if i store it in theparent package variable where should i point to...

thanks

aa

View 1 Replies View Related

Package Is Not Able To Create Process To Execute Child Package.

Jul 3, 2007

Hi,
In my application, i have two package, parent package and child package. the parent package is executing child package using a Execute Package Task.
"Execute Out Of Process" property of Execute Package Task is set to TRUE. means the child package will be run in separate process not in the process of Parent package.
this was working fine, but at a particular client location. its failing the error is "not able to load child package".
for me it seems some setting on server restricting to create separate process for child package execution.
when "Execute Out Of Process" property of Execute Package Task is set to FALSE. its working fine.

can anyone help what could cause its failure with property set to TRUE.


Appreciate any help.

View 2 Replies View Related

How To Pass Parameters To A Package Using A Execute Package Task

Jan 19, 2008

Hi,

I am calling one SSIS package from another using the Execute Package Task.
I also need to pass a parameter to the called SSIS package.
Can I do this? If yes, how? If no, then what will be the work-around for this?

Thanks in advance.

View 16 Replies View Related

Schedule A SSIS Package Which Execute DTS 2000 Package

Mar 25, 2008



I have successfully created a SSIS package which execute a DTS 2000 package and with no problem to execute the task. But I failed to schedule this package. I was not success in setting the logging. When running the package in command line:







dtexec file "C:Documents and SettingslyangMy DocumentsVisual Studio 2005ProjectsTraingDTSTraingDTSDTSTraining.dtsx"


Error: 2008-03-24 08:03:24.36
Code: 0xC0012024
Source: Execute DTS 2000 Package Task
Description: The task "Execute DTS 2000 Package Task" cannot run on this edit
ion of Integration Services. It requires a higher level edition.
End Error
Warning: 2008-03-24 08:03:24.38

Code: 0x80019002
Source: DTSTraining
Description: The Execution method succeeded, but the number of errors raised
(2) reached the maximum allowed (1); resulting in failure. This occurs when the
number of errors reaches the number specified in MaximumErrorCount. Change the M
aximumErrorCount or fix the errors.
End Warning
DTExec: The package execution returned DTSER_FAILURE (1).


Any help will be greatly appreciated.

(32 bit machine, standartd edition of SQL 2005)

View 7 Replies View Related

Execute Child Package In 32 Bit Within A 64 Bit Master Package

Dec 4, 2007

Is it possible to call a package through the 'Execute package task' and force it to run in 32 bit while the master package runs in 64 bit?

View 1 Replies View Related

Execute Package Fails Due To Package Validation

May 16, 2006

There is an execute package task that calls the child package. Both parent and child packages have the same password and the passwork is entered into the execute package task. Both packages reside in the same directory path.

Error: Error 0xC0012050 while loading package file "C:Documents and SettingsuserMy DocumentsVisual Studio 2005ProjectsExecutePackageTestExecutePackageTestExtractandWrite.dtsx". Package failed validation from the ExecutePackage task. The package cannot run.

When ExtractandWrite.dtsx is executed by right-clicking on package, the package executes without any errors.

DelayValidation = True for the Execute Package Task tasks is set and DelayValidation for the connection manager is set to True.

Does anyone have any thoughts as to what might be causing this error?

Thanks in advance for your assistance.

View 1 Replies View Related

Execute A *.sql File From One Aspx Page

Mar 12, 2004

Hi,
like subject, is it possible?

bye

View 3 Replies View Related

Execute SSIS Project From ASP.NET Page

May 25, 2006

Can you execute a SSIS project from an ASPX page? Or do you have to wrap it into a SQL job and run that?

Does anybody have a code snippet to do this?

View 7 Replies View Related

Executing DTS Package From An Asp Page

Mar 7, 2002

hi, I have created a DTS package that export data to another database. I always click on the package itself to run it. Now I need to be able to create an asp page to execute that DTS pakcage how can I do that.
Thanks for your help

Al

View 2 Replies View Related

Execute DTS Package From ASP.NET

Aug 19, 2005

I am trying to execute a DTS package in my asp.net code, but the dts package has both a owner and user password. I want to be able to use the user password to execute the package within the code, but whenever I try that I get the following error: Access to package properties requires entry of package owner password.



Line 101: oPKG.LoadFromSQLServer("(local)", "UserName", "Password", DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "DTSPassword", , , "CopySourceTest1")
Line 102:
Line 103: For Each oStep In oPKG.Steps
Line 104: oStep.ExecuteInMainThread = True
Line 105: NextIt works fine if I execute with the owner password, it just will not work with the user password. Any ideas will be appreciatedThanks

View 8 Replies View Related

Execute DTS Package From Asp.net

Aug 27, 2005

Hi All,How we can call and Execute DTS Scripts From Asp.net.Can any one pls give me some help.RegardsVAsu

View 1 Replies View Related

Execute DTS-package From Vc++

May 9, 2001

Does anyone know if there is a way to execute a dts-package from vc++?

View 1 Replies View Related

Execute Package

Oct 25, 2000

Hello
I am a junior programmer.
I maked a package with some procedures.
How can I know the sequence of the executed procedures?
If I want to execute only some procedures in a package,
how can I do?

Thanks by Dario

View 1 Replies View Related

Execute A DTS Package From SP

Sep 27, 2002

Is it possible to execute a DTS package from within a stored procedure? If so, please include syntax or where to obtain the syntax, thanks!!!!

View 2 Replies View Related

How To Execute DTS Package From ASP

Nov 1, 2004

Hi, all.
Please, help!
I don't know how to execute DTS package from ASP application.
I need some sample code.
Thanks a lot.

View 2 Replies View Related

Execute DTS Package From .adp ?

Sep 10, 2005

Hello,Currently I save a DTS as a storage file. I then run the storage filewith VBA code in the .adp(Access Data Project). This works if you runthe ADP on the Server but the users of the .adp will be opening it onthe network from their machines. When they do it says missingcusttask.dll and some other .dll these .dll are in the SQL server Binnon the server so they are not on the users machines.I could not register the .dlls on the user machines without SQL Server.It would be great if I could solve this problem but I'm not surehow.....Another possiblity would be to save the DTS SQL Server msdb table andrun it from the server but I do not know how to run the DTS using VBAcode or a SQL statement...Please help with any documentation or suggestions,Chuck

View 3 Replies View Related

Where Does A Package Execute?

Jan 14, 2008

I want to avoid executing packages across our network's WAN, using it's bandwidth, etc. I have 2 servers that I need to execute .dtsx packages on. My idea is to have a package on Server1 that has an execute package task on with a connection to the package located on Server2. Will the execution of this package take place locally on Server2? Or would the package execution take place on Server1, using the WAN to send data back and forth?

If I'm not clear enough, I can try to expound.

View 3 Replies View Related

Execute DTS Package

Jan 4, 2007

Hi,

I would like to REMOTELY execute a DTS Package stored on the server SQL2000. I would like to realize an application (VB.net or ASP.net) able to execute from the client computer the dts package on the server. The application should be able to give to the user the information about the success/failure of the Package's steps. Is this possible?

this is my scenario:

Package stored in SQL2000 server (ServerA)

Application on client computer

Web server (in case to use ASP.net) on ServerB

Can anybody post some example/code/explanation?

Thank you!

View 3 Replies View Related

Fire Off Integration Service Package From Web Page

Oct 18, 2006

Is it possible to programmatically fire off a SQL Server 2005 Integration Service package? Thank you in advance.

View 2 Replies View Related

Running SQL Server DTS Package From ASP.NET Page Problem

Nov 21, 2007

I'm having some problems running a DTS package from my ASP.NET appllication. It runs prefectly in debug from my local machine but as soon as I move it to the web server I receive the following error:
Error: -2147467259Source: Microsoft JET Database EngineDescription: The Microsoft Jet database engine cannot open the file '\serverBPayFilesPay3.xls'. It is already opened exclusively by another user, or you need permission to view its data.
The file is not opened by anyone else and the share permissions are full control for everyone.
My set up is as follows
serverA - Webserver & DB ServerserverB - File Server
The DTS package pulls in the file from serverB to a database table on serverA. The sa account is used for the database connection and connecting to the DTS package from the application. My code for running the DTS package is as follows -
  Private Sub ExecutePackage(ByVal server As String, ByVal package As String, ByVal username As String, ByVal password As String)

Const DTSSQLStgFlag_Default = 0
Const DTSStepExecResult_Failure = 1

Dim oPKG As DTS.Package, oStep As DTS.Step
oPKG = New DTS.Package

Dim sServer As String, sUsername As String, sPassword As String
Dim sPackageName As String, sMessage As String
Dim lErr As Long, sSource As String, sDesc As String

' Set Parameter Values
sServer = server
sUsername = username
sPassword = password
sPackageName = package

' Load Package
oPKG.LoadFromSQLServer(sServer, sUsername, sPassword, _
DTSSQLStgFlag_Default, , , , sPackageName)

' Set Exec on Main Thread
For Each oStep In oPKG.Steps
oStep.ExecuteInMainThread = True
Next

' Execute
oPKG.Execute()

' Get Status and Error Message
For Each oStep In oPKG.Steps
If oStep.ExecutionResult = DTSStepExecResult_Failure Then
oStep.GetExecutionErrorInfo(lErr, sSource, sDesc)
sMessage = sMessage & "Step " & oStep.Name & " Failed<br><br>Error: " & lErr & "<br>Source: " & sSource & "<br>Description: " & sDesc & "<br><br>"
Else
sMessage = sMessage & "Step " & oStep.Name & " Succeeded<br>"
End If
Next

oPKG.UnInitialize()

oStep = Nothing
oPKG = Nothing

' Display Results
'MsgBox(sMessage)

lblOutput.Text = sMessage

End Sub 
I'm using windows authentication with identity impersonate set to true. If I change to use basic authentication and enter my login when I go to the site the DTS package runs successfully. So I assume that I'm seeing this 'double hop' issue.
serverA is for testing so I moved the DTS package and web application to serverB so now everything is on the same server and should eliminate the double hop? No! Works perfectly from my PC in debug, but from the web server the same error occurs. Changing to basic authentication does not workaround the issue on the live server.
The DTS package always works when run from Enterprise manager.
I know this is a premissions issue - does anyone know what I'm doing wrong? Hopefully I've supplied enough info, if not just ask!

View 3 Replies View Related

Execute Package Task

Mar 16, 2007

I am using many Execute Package Tasks in a DTS packages to call a number of other DTS packages.  The problem is that when I change one of the called DTS packages the execute package task does not run the updated packages.  It looks like the execute package task references a Package ID guid instead of the name.  Is there a way to make it so a change to a called DTS package will reflect in all references to it

View 2 Replies View Related

Dts Package Execute Problem

Sep 13, 2007

Hi all,I run a dts from my aspx page. It works on my computer (win xp) fine, but it does not start to work when i deploy project to server 2003. In my computer sql 2000 is installed but it is not installed on win2003 server. So my error's cause is this. My error is : Retrieving the COM class factory for component with
CLSID {10020200-EB1C-11CF-AE6E-00AA004A34D5} failed due to the following error:
80040154. I could not solve it. I look at this topic but i got the same errors. Can i run dts without installing sql server on win2003 machine anyway? 

View 1 Replies View Related

Job To Execute DTS Package Failing....

May 15, 2001

I have recently created several DTS Packages and scheduled them to run nightly. The Packages complete succesfully when executed from the DTS Designer. However, when they are executed by a scheduled job, the following error results....
DTSRun: Loading... DTSRun: Executing... Error: -2147220499 (800403ED); Provider Error: 0 (0) Error string: No Steps have been defined for the transformation Package. Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts.hlp Help context: 700. Process Exit Code 1. The step failed.

This packages exist and are running via scheduled jobs on another server. Does anyone know what is causing this error????
thanks!

View 3 Replies View Related

I Can't Get Scheduled DTS Package To Execute

May 11, 2006

My database resides on my ISP SQL server, in Colorado. My new data can be found as a TXT file on the C: drive of the shipping PC in my Florida office.
I created a DTS package to import the data from the TXT file to a table in my database. The package works fine, until I schedule it to run.
The package uses the UNC address to find the TXT file. As a result, I can go to any PC in my office and execute the package.
But, when I schedule it to run unattended, it fails.

Can anyone give me any advice?

View 1 Replies View Related

Execute DTS Package From ASP Failed

Jan 19, 2005

I am trying to run DTS Package from ASP 3.0 with the following codes:


Set objDTSPackage = server.CreateObject("DTS.Package")
objDTSPackage.LoadFromSQLServer "serverName", "", "", 256,,,,"pkgName"
objDTSPackage.FailOnError = true
objDTSPackage.Execute

It failed with this message, "Package failed because Step 'DTSStep_DTSDataPumpTask_1' failed".

I am using NT Authentication in both IIS and SQLServer, and both Web and SQLServer are in the same machine.

Can someone help? Thank you.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved