469,325 Members | 1,388 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,325 developers. It's quick & easy.

When executing DTS package in program, the application will have no response during the execution

Hi,

Could any body tell me what is the problem?
I wrote a DTS application which will download a large file (about 100M) and
bulk insert many records into the database (about 300'000 each time), when
calling the Package.Execute method, the program sounds no response though
the records are inserting to the DB at that time.

Here is some of my code (Delphi, DTS FTP Task):

goPackageOld := CreateOLEObject('dts.package2');
goPackage := goPackageOld;
goPackage.Name := STR_FTP_PACKAGE_NAME;
goPackage.Description := STR_FTP_PACKAGE_DESC;
goPackage.WriteCompletionStatusToNTEventLog := True;
goPackage.LogFileName := Global.gDTSLogFile;;
goPackage.FailOnError := False;
goPackage.PackagePriorityClass := 2; // Middle priority
goPackage.MaxConcurrentSteps := 4; // Paralell exe max number
goPackage.LineageOptions := 0;
goPackage.UseTransaction := True;
goPackage.TransactionIsolationLevel := 4096;
goPackage.AutoCommitTransaction := True;
goPackage.RepositoryMetadataOptions := 0;
goPackage.UseOLEDBServiceComponents := True;
goPackage.LogToSQLServer := False;
goPackage.LogServerFlags := 256;
goPackage.FailPackageOnLogFailure := False;
goPackage.ExplicitGlobalVariables := False;
goPackage.PackageType := 0;

//'----------------------------------------------
//' create package steps information
//'----------------------------------------------------------------

//'------------- a new step defined below
oStep := goPackage.Steps.New;
oStep.Name := STR_FTP_STEP_NAME;
oStep.Description := STR_FTP_STEP_DESC;
oStep.ExecutionStatus := 1;
oStep.TaskName := STR_FTP_TASK_NAME;
oStep.CommitSuccess := False;
oStep.RollbackFailure := False;
oStep.ScriptLanguage := 'VBScript';
oStep.AddGlobalVariables := True;
oStep.RelativePriority := 3;
oStep.CloseConnection := False;
oStep.ExecuteInMainThread := False;
oStep.IsPackageDSORowset := False;
oStep.JoinTransactionIfPresent := False;
oStep.DisableStep := False;
oStep.FailPackageOnError := False;
goPackage.Steps.Add(oStep);
oStep := NULL;
oTask := goPackage.Tasks.New('DTSFTPTask');
oTask.Name := STR_FTP_TASK_NAME;
oCustomTask1 := oTask.CustomTask;
oCustomTask1.Name := STR_FTP_TASK_NAME;
oCustomTask1.Description := STR_FTP_TASK_DESC;
oCustomTask1.SourceLocation := 0;
oCustomTask1.SourceSite := Global.FTPRemoteHostIP;
oCustomTask1.SourceUsername := Global.FTPLogin;
oCustomTask1.SourcePassword := Global.FTPPassword;
oCustomTask1.DestSite := Global.FTPLocalDir;
oCustomTask1.NonOverwritable := 0
oCustomTask1.NumRetriesOnSource := Global.FTPRetryTimes;
goPackage.Tasks.Add(oTask);
//
goPackage.Execute; // Too many times used here.!!!
......
Can I execute the package in another way? For example, let it execute
background and I can check the status to see whether it has finished or not,
and I can also display the running status of the package.

Thanks very much for any suggestion!!!

Best Regards,
Grant
Jul 20 '05 #1
0 2690

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by =?Utf-8?B?SmFjayBTbWl0aA==?= | last post: by
20 posts views Thread by JohnQ | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.