myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Restrict results to one domain

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> Microsoft Systems Management Server >> Web Reporting >> Restrict results to one domain Page: [1]
Login
Message << Older Topic   Newer Topic >>
Restrict results to one domain - 7/15/2008 8:33:53 AM   
cjones464

 

Posts: 69
Score: 0
Joined: 7/23/2004
From: UK at the moment
Status: offline
Sigh….
Now they tell me they only want results from one domain…..
They have a single SMS covering 2 Domains.

I’ve customised (with a little help from here) the “computers with a specific filename” report to replace the prompt with the specific file they have asked for. 7 filenames – 7 reports.
Like so….
select SYS.Netbios_Name0, SF.FileName, SF.FileDescription, SF.FileVersion, SF.FileSize, SF.FileModifiedDate, SF.FilePath
From v_GS_SoftwareFile SF
join v_R_System SYS on SYS.ResourceID = SF.ResourceID
Where (SF.FileName = "notes.exe") and (sys.netbios_name0 like "W%")
ORDER BY SYS.Netbios_Name0


Now they tell me they only want results from one of the domains.
I cant work out how to add a “where Domain = xyz” statement to these queries.

Would anyone like to enlighten me ?

I also need to restrict the default Report 25 “computers with low memory (less than or equal to specified MB) to doman xyz.

Oh and yes I have asked the project to fund a “proper” SQL scripter LOL
Post #: 1
RE: Restrict results to one domain - 7/15/2008 2:15:15 PM   
jnelson993


Posts: 900
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
You need one more AND in your WHERE clause to add the domain from the v_R_System view(which you already have there as SYS)

AND (sys.Resource_Domain_OR_Workgr0 = 'YOURDOMAIN')

(add it right before the ORDER BY clause)


_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to cjones464)
Post #: 2
RE: Restrict results to one domain - 7/16/2008 10:55:42 AM   
cjones464

 

Posts: 69
Score: 0
Joined: 7/23/2004
From: UK at the moment
Status: offline
Cheers John - This works fine.
I'm not 100% sure how/why (no need to explain) I have found the myitforum guide to making reports from queries and from a speed read the answer seems to be there.
I'll be looking at this this weekend to try fully grasp what I am doing.
I may make a SMS report writer yet.

_____________________________

Implementing SMS since 1995.
Dont ask me about scrips and stuff but if you wanna know how to bolt the tecky bits togeter with the business Requirement I could have some tips

(in reply to jnelson993)
Post #: 3
Page:   [1]
All Forums >> [Management Products] >> Microsoft Systems Management Server >> Web Reporting >> Restrict results to one domain Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.219