Showing posts with label scheduler. Show all posts
Showing posts with label scheduler. Show all posts

Monday, March 26, 2012

Running a job continuously

Dear All,
I would like to have a job that runs all the times, how
should I set up the scheduler ?What does the job do? Do you have a loop so it never finishes? If not, they you cannot have it run
continuous, you can only schedule it very frequently.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Pidgeon" <anonymous@.discussions.microsoft.com> wrote in message
news:0bdc01c4a6fc$76513760$a301280a@.phx.gbl...
> Dear All,
> I would like to have a job that runs all the times, how
> should I set up the scheduler ?
>|||Thanks Tibor
We have a fairly complicated audit procedure where we need
to scan data continuously, I think I will go for your idea
of having a loop that never ends.
I know its a bit of a bad solution but I have been out
voted.
>--Original Message--
>What does the job do? Do you have a loop so it never
finishes? If not, they you cannot have it run
>continuous, you can only schedule it very frequently.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>http://www.solidqualitylearning.com/
>
>"Pidgeon" <anonymous@.discussions.microsoft.com> wrote in
message
>news:0bdc01c4a6fc$76513760$a301280a@.phx.gbl...
>> Dear All,
>> I would like to have a job that runs all the times, how
>> should I set up the scheduler ?
>>
>
>.
>|||What I do is creating 3 steps in the job. The 1st step runs "EXEC
msdb..sp_purge_jobhistory 'jobname'" to clear the history for this job. The
2nd step runs the procedure and it goes back to step1 on success and step 3
on failure. Step 3 prints out the error report in case the job fails.
"Pidgeon" wrote:
> Dear All,
> I would like to have a job that runs all the times, how
> should I set up the scheduler ?
>
>

Running a job continuously

Dear All,
I would like to have a job that runs all the times, how
should I set up the scheduler ?
What does the job do? Do you have a loop so it never finishes? If not, they you cannot have it run
continuous, you can only schedule it very frequently.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Pidgeon" <anonymous@.discussions.microsoft.com> wrote in message
news:0bdc01c4a6fc$76513760$a301280a@.phx.gbl...
> Dear All,
> I would like to have a job that runs all the times, how
> should I set up the scheduler ?
>
|||Thanks Tibor
We have a fairly complicated audit procedure where we need
to scan data continuously, I think I will go for your idea
of having a loop that never ends.
I know its a bit of a bad solution but I have been out
voted.

>--Original Message--
>What does the job do? Do you have a loop so it never
finishes? If not, they you cannot have it run
>continuous, you can only schedule it very frequently.
>--
>Tibor Karaszi, SQL Server MVP
>http://www.karaszi.com/sqlserver/default.asp
>http://www.solidqualitylearning.com/
>
>"Pidgeon" <anonymous@.discussions.microsoft.com> wrote in
message
>news:0bdc01c4a6fc$76513760$a301280a@.phx.gbl...
>
>.
>
|||What I do is creating 3 steps in the job. The 1st step runs "EXEC
msdb..sp_purge_jobhistory 'jobname'" to clear the history for this job. The
2nd step runs the procedure and it goes back to step1 on success and step 3
on failure. Step 3 prints out the error report in case the job fails.
"Pidgeon" wrote:

> Dear All,
> I would like to have a job that runs all the times, how
> should I set up the scheduler ?
>
>
sql

Running a batch command using scheduler

Hi,

I have a batch file that runs an isql script. The sql accepts command line arguments as parameters. I want to invoke this batch file using windows scheduler. How do I pass parameters to my sql? Somebody please help.

Thanks.

I am not sure about the batch file idea, but SQL server has a job scheduler built in called sql agent. You would be much better using this to call a stored procedure and pass in the arguments. To get you started, try this:

http://msdn2.microsoft.com/en-us/library(d=robot)/ms189237.aspx

Otherwise, why not replace your batch file with a .NET console application that takes command line parameters and passes them to a stored procedure call. Batch files are old, and while they still have some uses, there are much better ways of achieving what you are trying to do in an easier way, which gives you more power and flexibility.

There is a way to run sql scripts from the commandline using an exe supplied with sql server. For information on this, check out:

http://msdn2.microsoft.com/en-us/library/ms170207.aspx

HTH

For more T-SQL tips, check out my home page:|||Thanks for the reply :)

Wednesday, March 7, 2012

Run a SSIS Package including Windows Tasks Scheduler?

Hello

As a beginner I have created some Packages to import Data to SQL Server.

The Packages are running well.

I have created a Task to run the Package on a SQL SERVER 2005 Express. The Task starts.

Then a Execute Package Wizard Picture appears on the Screen.

I have mannually to select the Connection Manager and the Connection String.

After the selection the Task runs without any Problem.

Now I like to get the Task to run without any manual intervention.

I was looking in Internet but could not find a solution.

Can someone give me a hint how to get the Task working without intervention?

Thanks for an early answer.

Regards

Chaepp

Specify dtexec.exe as executable to run in the Job definition.
See Books Online for dtexec command line parameters reference. In simplest case: "dtexec.exe /f c:\package.dtsx"|||

Hello Michael

I'ts working now. Thank you very much for your help!

Regards

Chaepp