RE: SMS 2003 Query Software Distribution Status
- From: Kim Oppalfens <kim@xxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Jul 2005 11:36:29 +0200
A collection can only contain system resources, user resources or group
resources.
This statement would allow you to create a collection of all systems
that reported this specific status message.
select
SYS.ResourceID,SYS.ResourceType,SYS.Name,SYS.SMSUniqueIdentifier,SYS.Res
ourceDomainORWorkgroup,SYS.Client from SMS_StatusMessage as stat left
join SMS_StatMsgInsStrings as ins on stat.RecordID = ins.RecordID left
join SMS_StatMsgAttributes as att1 on stat.RecordID = att1.RecordID
inner join SMS_StatMsgAttributes as att2 on stat.RecordID =
att2.RecordID join sms_r_system as SYS on stat.machinename = SYS.name
where stat.ModuleName = "SMS Client" and stat.MessageID = 10007 and
att2.AttributeID = 401 and att2.AttributeValue = "S0020001"
Kim Oppalfens
MVP SMS
In article <553F83A6-72FA-4083-912B-7A597B0907A1@xxxxxxxxxxxxx>,
BrianCfromBoulder@xxxxxxxxxxxxxxxxxxxxxxxxx says...
> Thank you for your reply! Yes, the query now works as intended. Question: How
> to turn this into a collection.
>
> When I import the query I receive a message back when I click OK indicating
> "The query statement that you entered is not valid. Please enter a valid
> query statement."
>
> How can I use the query as a collection? Can a collection only contain
> System Resource?
>
> "Kim Oppalfens" wrote:
>
> > In article <6918E94F-B77B-4660-BBF9-D29203CC4CD8@xxxxxxxxxxxxx>,
> > BrianCfromBoulder@xxxxxxxxxxxxxxxxxxxxxxxxx says...
> > > I found a solution that sort of works for me, but I need help fine-tuning it.
> > > Basically I've modified the original script down to show me systems that
> > > failed, but I need to hard code the Advertisement ID so it will work in a
> > > collection and not prompt.
> > >
> > > The original code is...
> > > select stat.*, ins.*, att1.*, att1.AttributeTime from SMS_StatusMessage as
> > > stat left join SMS_StatMsgInsStrings as ins on stat.RecordID = ins.RecordID
> > > left join SMS_StatMsgAttributes as att1 on stat.RecordID = att1.RecordID
> > > inner join SMS_StatMsgAttributes as att2 on stat.RecordID = att2.RecordID
> > > where stat.ModuleName = "SMS Client" and stat.MessageID >= 10008 and
> > > stat.MessageID <= 10009 and att2.AttributeID = 401 and att2.AttributeValue =
> > > ##PRM:SMS_StatMsgAttributes.AttributeValue## and stat.SiteCode =
> > > ##PRM:SMS_StatusMessage.SiteCode## and att2.AttributeTime >=
> > > ##PRM:SMS_StatMsgAttributes.AttributeTime## order by att1.AttributeTime desc
> > >
> > > My modification is...
> > > select stat.*, ins.*, att1.*, att1.AttributeTime from SMS_StatusMessage as
> > > stat left join
> > > SMS_StatMsgInsStrings as ins on stat.RecordID = ins.RecordID left join
> > > SMS_StatMsgAttributes as att1
> > > on stat.RecordID = att1.RecordID inner join SMS_StatMsgAttributes as att2 on
> > > stat.RecordID =
> > > att2.RecordID where stat.ModuleName = "SMS Client" and stat.MessageID =
> > > 10070 and att2.AttributeID = 401 and att2.AttributeValue =
> > > ##PRM:SMS_StatMsgAttributes.AttributeValue##
> > >
> > > When I try and hard code AttributeValue it errors. Any help in getting this
> > > last step working is greatly appreciated!
> > >
> > > Original source for this code is
> > > http://myitforum.techtarget.com/articles/1/view.asp?id=843
> > >
> > > "Brian C. from Boulder" wrote:
> > >
> > > > Hi! I've been trying to create a query that I can then turn into a collection
--
Kim Oppalfens
MVP SMS
Computacenter Belgium
.
- Follow-Ups:
- RE: SMS 2003 Query Software Distribution Status
- From: Brian C. from Boulder
- RE: SMS 2003 Query Software Distribution Status
- References:
- SMS 2003 Query Software Distribution Status
- From: Brian C. from Boulder
- RE: SMS 2003 Query Software Distribution Status
- From: Brian C. from Boulder
- RE: SMS 2003 Query Software Distribution Status
- From: Kim Oppalfens
- RE: SMS 2003 Query Software Distribution Status
- From: Brian C. from Boulder
- SMS 2003 Query Software Distribution Status
- Prev by Date: Reporting Security
- Next by Date: collection based on AD group membership?
- Previous by thread: RE: SMS 2003 Query Software Distribution Status
- Next by thread: RE: SMS 2003 Query Software Distribution Status
- Index(es):
Relevant Pages
|