Grab our RSS feeds Follow us on Twitter Join our Facebook Group Connect with us on LinkedIn
myITforum.com, Powered by You.
you are not logged in

Articles

Newslinks

Links

Downloads

Site Services

Community Forums

Discussion Lists

Article Search

Newsletter

Web Blogs

FAQs

Live Support

myITforum TV

Take a Poll

Monthly Drawing

myITforum Network

User Group Directory

Our Partners

About Us

Register

Login

BRONZE PARTNER:

BRONZE PARTNER:



Industry News:




  Home : Articles : SQL Server print | email | | Forums |   print | email | | Blogs |   print | email | | Wiki |   print | email | | FAQs |   print | email | Article Search  
Tracking Advertisements That Have Been Received But Not Started


Bookmark and Share

By: Don Hite
Posted On: 5/1/2007

This article was Previously posted on Don Hite's Blog

This SQL query will provide you with an example that uses a SubSelect method to let you monitor all of the machines that have received a specified advertisement but have not yet stated the installation. The value added by this query is that it is good for advertisement tracking purposes.

To use this query you must Replace xxx With The Advertisement that You Wish To Track From Advertisements > Advertisement ID in the SMS console.

SQL Query:

Declare @ProgId NVarChar(128)
Set @ProgId = 'XXX'

Select
MachineName 'Received, Not Started'

From vStatusMessages Astat
Join StatusMessageAttributes att1
on Astat.RecordID = att1.RecordID

Where AttributeValue = @ProgId
And MessageID = 10002 -- Received Status Code
And MessageID <> 10003 -- Failures Status Code
And MessageID <> 10004 -- Failures Status Code
And MessageID <> 10021 -- Failures Status Code
And ModuleName = 'Sms Client'

And MachineName not in
(Select all MachineName
From vStatusMessages Astat
Join StatusMessageAttributes As att1
On Astat.RecordID = att1.RecordID
Where AttributeValue = @ProgId
And MessageID = 10005 -- Started Status Code
And ModuleName = 'SMS Client')


  myITforum.com ©2010 | Legal | Privacy