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
 Set up a Scheduler

Author  Topic 

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2011-09-13 : 10:44:12
Hi,

I have an application developed in Vb.net which I published and stored in Ms SQL server.

The application:

- Unzips zip files from one folder and transfer to another.
- Moves the zip files to another folder.
- Insert data to various table in the database in SQL.
- Exit the application.

So I want to set a scheduler to do the process at night. I tried to run the setup.exe manually. All worked Perfect..

So went to SQL Server Agent - New - Job

General - Name: UnZippingUtility
Steps - New - Step name: Unzip Type: Operating system (CmdExec)
Run as: SQL Agent Service Account
Command: C:\Documents and
Settings\abdallahr\Desktop\Info-Zip\SharpZipLib\setup.exe
Scheduler - New - Name UnzipProcess - Recurring - Daily - 1 Day(s) - frequency - 22:00:00

OK all the above..

It does not work as it does manually, instead it only unzips one file and terminates..

It doesn't transfer the files, it doesnt update the tables etc..
The application fails just after the first unzip process (its the first function to be executed)..

My question is why if I execute the application manually it works as expected and setting up the scheduler it doesnt.

Thank you

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-13 : 11:00:49
what was the error? it might be permission issue for account used by sql agent while trying to transfer files.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2011-09-13 : 11:09:18
No error - it just doesnt do it !! It used to do it before in a different application so I have full authourity - any hints
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-13 : 11:12:32
not even a warning message in application/event log?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2011-09-13 : 11:22:37
On Log file viewer I receive the Message:

The job succeeded. The job was invoked by Schedule 4 (UnzipProcess). The last step to run was step 1(unzip)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-13 : 11:26:36
whats the on success criteria given for step 1?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

dr223
Constraint Violating Yak Guru

444 Posts

Posted - 2011-09-13 : 11:33:01
what do youu mean ?
Go to Top of Page
   

- Advertisement -