Registered member login:
Register Now
Altirigos » Altiris Administrators » SQL » DS Job History Query

» Current Poll
Do you leave the Aclient enabled?
YES - 82.68%
105 Votes
NO - 17.32%
22 Votes
Total Votes: 127
You may not vote on this poll.
» Stats
Members: 9,479
Threads: 11,743
Posts: 55,255
Top Poster: Nick (4,981)
Welcome our newest member, timmaki
» Online Users: 28
0 members and 28 guests
No Members online
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 123
Reply
Old 08-18-2008, 02:39 PM   #1 (permalink)
 
Status: Junior Altiris Admin
Join Date: 04-09-2008
Location: California
Posts: 20


Question DS Job History Query

I put together a DS job that would scan the Altiris services to make sure they were set correctly, and if not, then run a second job to log the services. Now I'm trying to do a SQL query that will scan each DS server and return a list of systems that ran the second job (that I can then export to Excel). My SQL skills are still pretty weak, so if anyone can help me out that would be great.
RHopkins is offline   Reply With Quote
Old 08-18-2008, 07:37 PM   #2 (permalink)
 
TRYDL's Avatar
 
Status: Super Altiris Admin
Join Date: 03-08-2006
Location: Baltimore, MD
Age: 29
Posts: 576


This should work, a little cheesy from a long time ago, but works well. You can see I pass in a variable of a job name in the WHERE clause. It can out of a VB script (I tried to cleanup the formatting before posting) and executed against a connection string.

I also pull out more information, then you may need.

Quote:
SELECT computer.name AS computerName, event_schedule.status AS status, event_schedule.start_time AS starting, event_schedule.end_time AS ending, event_schedule.exit_code AS exitcode, computer_group.name as mygroup FROM event_schedule INNER JOIN event ON event_schedule.event_id = event.event_id INNER JOIN computer ON event_schedule.computer_id = computer.computer_id INNER JOIN computer_group ON computer.group_id = computer_group.group_id WHERE (event.name = '%JobName%')
__________________
3rd Floor Garage Door Operator

Last edited by TRYDL; 08-18-2008 at 07:40 PM..
TRYDL is offline   Reply With Quote
Old 08-22-2008, 05:06 PM   #3 (permalink)
 
Status: Junior Altiris Admin
Join Date: 04-09-2008
Location: California
Posts: 20


That did the trick, thanks!


RHopkins is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 06:38 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos