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
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Batch Processing

Author  Topic 

shafiqm
Starting Member

9 Posts

Posted - 2006-04-25 : 09:55:35
Hi,

I was working previously with AS400 environment Where user can select some paramters and submit the job (to run in background).

How can I achive the same in SQL 2K5, I need to download data from AS400 but I don't want to run this interactively. I want the user to select there parameters (from ASP.NET page) and submit the job in batch. Job will take those parameters and start extracting the data as batch job.
Jobs SQL can't be run by a simple Domain User as they require some additional previllages.
Please Guide.
Thanks
Shafiq

rav3n0u5
Yak Posting Veteran

88 Posts

Posted - 2006-04-25 : 16:48:59
It sounds like if you develop a stored procedure that accepts all the parameters passed from the asp page, that you could manage to run your "batch job."

I don't know anything about programming asp, but this sounds fairly simple.

Instead of batch jobs I might even script whole stored procedures, and just have them executed depending on the parameters taken from the parent procedure.



So you might have this setup.

<asp command for execute stored proc> sp_GetInputs @Param1, @Param2, @Param3

IF @Param1 = ValueOne
EXEC sp_ValueWasOne
ELSE
IF
@Param2 = ValueTwo
EXEC sp_ValueWasTwo

etc.

You could also just pass values to other stored procs, depending on what you are doing.

I think I just confused myself.

Good luck.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-04-26 : 00:52:33
Why do you want it to run in "batch mode" like this? When will it run? Will it be immediate, or are you looking to run these things periodically? If periodically, what kind of a schedule? Are they running against production, or a database designed for batch processing?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

shafiqm
Starting Member

9 Posts

Posted - 2006-04-26 : 10:51:10
Bascially, the processing of downloading data may takes 10 to 20 minutes depending upon the date range. If I run this just interactively then the connection/command will timeout. Basically this batch procssing is like on demand or on request and primarily based on user selection from the front End Application,.NET. When the job finish the downloading, it will submit an email notification to the orginator that his request has been completed.

If I schedule a job to run continously every 5 minutes to see if any new request came and if yes then start running the processing. Then how to implement a check to see if the job is already running.

Thanks
Shafiq

Go to Top of Page
   

- Advertisement -