Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 DTS Package Execution

Author  Topic 

sek
Starting Member

27 Posts

Posted - 2009-08-03 : 23:52:38
Hi All,
I am getting one problem with dts package execution.
i need to execute one dts package from vb.net application which will load the data from csv file into sql server 2000 database.my application in one system and my dts package in another system.my souce files are in another system.these files are in shared folder.

my dts code in vb.net is like below.

Dim DtsObj As New DTS.Package
DtsObj.LoadFromSQLServer(serverName, userID, password, DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_Default, "", "", "", packageName, "")
DtsObj.Execute()

If DtsObj.FailOnError() Then
sw.WriteLine("Package Execution Failed")
sw.WriteLine()
MessageBox.Show("Dts Package Execution Failed")
Me.Close()
Else
sw.WriteLine("Package Execution Successfull")
sw.WriteLine()
End If

but this job is some times executing and sometimes failing.i am not getting any failure message and there is code below this also in my application.and that's also executing.how can i make it compulsary execute the dts package or how to exit the application in case if it fails?

actually i am not understanding where is the problem exactly?is't necessary that we need to login to the system where source files are exist from the .net application's system before running the application???i felt that when i connected once its working fine.

thanks in advance.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-08-04 : 03:01:22
is the service account executing package has access to folder?
Go to Top of Page

sek
Starting Member

27 Posts

Posted - 2009-08-04 : 07:05:03
Hi,
Actually the souce files are in remote system shard folder.if we want to execute the dts package from vb.net do we need to access the system at least once before running the job??

thanks for reply
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-08-04 : 07:50:53
does the account executing the job have access to the shared folder?
Go to Top of Page

sek
Starting Member

27 Posts

Posted - 2009-08-04 : 08:18:03
Hi visakh,
yes, the service account executing package has access to the source files folder.actually we kept the files in a shared folder of the system.

Thanks for the reply.
Go to Top of Page
   

- Advertisement -