Showing posts with label agent. Show all posts
Showing posts with label agent. Show all posts

Friday, March 30, 2012

Multiple job steps

I am creating jobs using SQL Server Agent, the job has multiple steps.
Example
Step1 creates tables
Step2 creates group of reports to be executed only when step 1 is successful
l
Step3 creates group of reports to be executed only when step 1 is successful
l
I would like to execute step2 and step3 at the same time, step 3 is not depe
nding on step2.
How I do that? I am thinking of creating another job to execute step3 after
evaluating the status of step1,
somebody has more efficient ideas?
Thanks,One way would be to use DTS and it's workflow engine. You can run sql tasks
conditionally or at the same time.
Ray Higdon MCSE, MCDBA, CCNA
--
"Tony-ICW Group" <tmangahas@.icwgroup.com> wrote in message
news:CCB3CD33-DDFC-4E8B-9324-774A90F7A5EB@.microsoft.com...
> I am creating jobs using SQL Server Agent, the job has multiple steps.
> Example
> Step1 creates tables
> Step2 creates group of reports to be executed only when step 1 is
successfull
> Step3 creates group of reports to be executed only when step 1 is
successfull
> I would like to execute step2 and step3 at the same time, step 3 is not
depending on step2.
> How I do that? I am thinking of creating another job to execute step3
after evaluating the status of step1,
> somebody has more efficient ideas?
> Thanks,
>|||Thanks Ray...I will try that.

Wednesday, March 21, 2012

Multiple distribution agent sessions for one subscriber ?

I'm running SQL 2000 service pack 4 - on my publisher, my distribution and
subscriptions servers are SQL 2005 service pack 1...
Using replication monitor - I look at 'distributor to subscriber' history
and I see 3 distribution agent sessions running on one subscription...
select * from distribution..msdistribution_status gives :-
article_id agent_id UndelivCmdsInDistDB DelivCmdsInDistDB
-- -- -- --
31 300 199509 0
31 301 199574 0
31 302 65 199509
When I do a select count(*) from msrepl_commands I only see
199,000+ rows .
My question is this - is it a problem that I have multiple agents running ?
Have I done something wrong when setting up my replication
publication/subscription ?
Any advice appreciated.
Thanks in advance,
Have a look at MSsubscriptions - I would guess that you have 3 subscriptions
which accounts for the 3 rows returned. The fact that you get fewer rows
returned from a straight count of msrepl_commands is very odd. Is this
reproducible? Perhaps rows were added between the 2 commands? If it is
reproducible then I wonder if there are 2 agents for the same subscriber
which shouldn't be possible. The MSsubscriptions table will give more info.
HTH,
Paul Ibison
|||Paul,
yes - I have 3 rows in MSSubscriptions. Interestingly, for two of the rows I
have a subscriber_db of 'virtual'.... the db is only correct in one row.
Is there anything else I can check ?
"SteveH" wrote:

> I'm running SQL 2000 service pack 4 - on my publisher, my distribution and
> subscriptions servers are SQL 2005 service pack 1...
> Using replication monitor - I look at 'distributor to subscriber' history
> and I see 3 distribution agent sessions running on one subscription...
> select * from distribution..msdistribution_status gives :-
> article_id agent_id UndelivCmdsInDistDB DelivCmdsInDistDB
> -- -- -- --
> 31 300 199509 0
> 31 301 199574 0
> 31 302 65 199509
> When I do a select count(*) from msrepl_commands I only see
> 199,000+ rows .
> My question is this - is it a problem that I have multiple agents running ?
> Have I done something wrong when setting up my replication
> publication/subscription ?
> Any advice appreciated.
> Thanks in advance,
|||The only thing I could find was this:
http://www.tech-archive.net/Archive/SQL-Server/microsoft.public.sqlserver.replication/2007-03/msg00049.html
In your case I'd open a PSS case and see if this is listed in their database
- it might be that you can get some inside info and / or a hotfix. Meanwhile
I'll see if I can get some more info...
Paul Ibison