Registered member login:
Register Now
Altirigos » CMS 7 » pcAnywhere » PcAnywhere distribution report with host ip address included

» Current Poll
Do you leave the Aclient enabled?
YES - 82.50%
66 Votes
NO - 17.50%
14 Votes
Total Votes: 80
You may not vote on this poll.
» Stats
Members: 9,303
Threads: 11,614
Posts: 54,720
Top Poster: Nick (4,977)
Welcome our newest member, prem kapoor
» Online Users: 53
1 members and 52 guests
kerrybda
Most users online at once 294, 06-30-2007 at 01:24 PM.
» February 2010
S M T W T F S
31 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 123456
Reply
Old 06-19-2009, 04:57 AM   #1 (permalink)
 
Status: Junior Altiris Admin
Join Date: 10-28-2008
Location: australia
Posts: 19


PcAnywhere distribution report with host ip address included

Hi everyone,

I need to create a report for Pcanywhere installed in our pc environment, the current defaul report specify host name, but what I need is to include the ip address of the host too....

environment: altiris v7

this is a copy of the default sql

...........start script................

SELECT DISTINCT
i._ResourceGuid [Guid],
i.Name [Host Machine (Target)],
ISNULL(p.[pcA_Version_Major],'') +
CASE WHEN ISNULL(p.[pcA_Version_Minor],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Minor] END +
CASE WHEN ISNULL(p.[pcA_Version_Patch],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Patch] END +
CASE WHEN ISNULL(p.[pcA_Version_Build_Number],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Build_Number] END AS [pcAnywhere Host],
i.[OS Name] [OS]
FROM dbo.Inv_Symantec_pcAnywhere_Host_State hs
JOIN Inv_Symantec_pcAnywhere_Product_Info p
ON p._ResourceGuid = hs._ResourceGuid
JOIN Inv_AeX_AC_Identification i
ON i._ResourceGuid=p._ResourceGuid
JOIN CollectionMembership cm
ON i._ResourceGuid = cm.ResourceGuid
JOIN vCollection c
ON cm.CollectionGuid = c.Guid
WHERE upper(c.Guid) LIKE upper('%Collection%')
ORDER BY i.Name,
ISNULL(p.[pcA_Version_Major],'') +
CASE WHEN ISNULL(p.[pcA_Version_Minor],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Minor] END +
CASE WHEN ISNULL(p.[pcA_Version_Patch],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Patch] END +
CASE WHEN ISNULL(p.[pcA_Version_Build_Number],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Build_Number] END,
i.[OS Name]

...........end of report...........


If you know how to add extra lines to include the ip address on this report, I will really appreciate your help

Thanks

Last edited by periicles; 06-19-2009 at 05:23 AM..
periicles is offline   Reply With Quote
Old 06-19-2009, 09:36 AM   #2 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,977


I'm going off memory and didn't have a database to confirm but the dbo.Inv_AeX_Ac_TCPIP table should have what you need.

I made the changes (noted in red) to your report. It hasn't been tested though.

Hope it helps

Code:
SELECT DISTINCT 
i._ResourceGuid [Guid],
i.Name [Host Machine (Target)],
z.[IP Address],
ISNULL(p.[pcA_Version_Major],'') + 
CASE WHEN ISNULL(p.[pcA_Version_Minor],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Minor] END +
CASE WHEN ISNULL(p.[pcA_Version_Patch],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Patch] END +
CASE WHEN ISNULL(p.[pcA_Version_Build_Number],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Build_Number] END AS [pcAnywhere Host],
i.[OS Name] [OS]
FROM dbo.Inv_Symantec_pcAnywhere_Host_State hs
JOIN Inv_Symantec_pcAnywhere_Product_Info p
ON p._ResourceGuid = hs._ResourceGuid
JOIN Inv_AeX_AC_Identification i
ON i._ResourceGuid=p._ResourceGuid
JOIN Inv_AeX_AC_TCPIP z
ON z.[IP Address] = i._ResourceGuid
JOIN CollectionMembership cm
ON i._ResourceGuid = cm.ResourceGuid
JOIN vCollection c
ON cm.CollectionGuid = c.Guid
WHERE upper(c.Guid) LIKE upper('%Collection%')
ORDER BY i.Name,
ISNULL(p.[pcA_Version_Major],'') + 
CASE WHEN ISNULL(p.[pcA_Version_Minor],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Minor] END +
CASE WHEN ISNULL(p.[pcA_Version_Patch],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Patch] END +
CASE WHEN ISNULL(p.[pcA_Version_Build_Number],'') = '' THEN '' ELSE '.'+ p.[pcA_Version_Build_Number] END,
i.[OS Name]
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Old 06-21-2009, 04:35 AM   #3 (permalink)
 
Status: Junior Altiris Admin
Join Date: 10-28-2008
Location: australia
Posts: 19


Tcp info

Nick, I tested those entries, but the report still fail, the comment said "An unexpected SQL error occurred when running the RawSqlDataSource"

Sorry I did not know what else to check, I read some log generated but not much info for me to use at this time....

If there some info I can post for you to have an idea which way to approach it...
periicles is offline   Reply With Quote
Old 06-21-2009, 10:51 PM   #4 (permalink)
 
TRYDL's Avatar
 
Status: Super Altiris Admin
Join Date: 03-08-2006
Location: Baltimore, MD
Age: 29
Posts: 555


Code:
 
JOIN Inv_AeX_AC_TCPIP z
ON z.[IP Address] = i._ResourceGuid
can't join on that, an IP address wont match to an object GUID

try

on z._ResourceGuid = i._ResourceGuid

If that air lookup doesnt work, I'll throw it into SSMS and write it up for you.
__________________
3rd Floor Garage Door Operator
TRYDL is offline   Reply With Quote
Old 06-21-2009, 11:42 PM   #5 (permalink)
 
Status: Junior Altiris Admin
Join Date: 10-28-2008
Location: australia
Posts: 19


Code On z

I tried ON z._ResourceGuid = i._ResourceGuid and that did the trick, fantastic

Thank you for you help, Trydl and Nick, much appreciated


By the way Trydl, I know is not under same script query, but may I ask you where o how to get sample to create a raw queries to collect group of machines base on name (from AD or workgroup) to populate a new filter..I posted a question some time ago but I have not have much luck with respond to that......

Again thank you very much for your help....

Last edited by periicles; 06-22-2009 at 01:41 AM..
periicles is offline   Reply With Quote
Old 06-22-2009, 11:11 AM   #6 (permalink)
 
Nick's Avatar
 
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,977


<laugh> Wow, where was my thought process when I was writing that? Thanks for pointing out my error and correcting it.

Quote:
Originally Posted by TRYDL View Post
Code:
 
JOIN Inv_AeX_AC_TCPIP z
ON z.[IP Address] = i._ResourceGuid
can't join on that, an IP address wont match to an object GUID

try

on z._ResourceGuid = i._ResourceGuid

If that air lookup doesnt work, I'll throw it into SSMS and write it up for you.
__________________
Scire potentia est (knowledge is power)
Nick is offline   Reply With Quote
Old 06-23-2009, 11:16 PM   #7 (permalink)
 
TRYDL's Avatar
 
Status: Super Altiris Admin
Join Date: 03-08-2006
Location: Baltimore, MD
Age: 29
Posts: 555


Quote:
sample to create a raw queries to collect group of machines base on name (from AD or workgroup) to populate a new filter
If I understood you correctly, you want to create groups of computers by their NetBIOS name?

Something like

Code:
Select Guid from vComputer where Name LIKE 'ZoneA-%'
will be sufficient.

The % is a wildcard in SQL.

Nick - no worries
__________________
3rd Floor Garage Door Operator
TRYDL is offline   Reply With Quote
Old 07-02-2009, 06:46 AM   #8 (permalink)
 
Status: Junior Altiris Admin
Join Date: 10-28-2008
Location: australia
Posts: 19


Thumbs up Computer Name

Hi Trydl, before I continue I would like to thanks you for your help

Regarding to the filter, that is correct I need to populate a filter with machine base on the NetBIOS name....

I tried the "Code" you mentioned and it worked good to get machine names....If I want to import machine from AD to filter, can I include a code here!!!!!! or better do it different way...

.................................

By the way, I would like to ask you one more question (sorry) about the code for Ip address. I wanted to include the IP information in different queries??? this time for a report for machines with altiris agent (see sample) but it did not work...sorry still learning.....how to include the variable for this query....

................start of sample............................
DECLARE @v1_TrusteeScope varchar(99)
SET @v1_TrusteeScope = '%TrusteeScope%'
IF %ResultType% = 1
SELECT DISTINCT TOP %N% vComputer.Guid AS '_ItemGuid', vComputer.Name, vComputer.Domain, vComputer.[OS Name], vComputer.Guid AS [Machine Guid], vComputer.Server
FROM Inv_AeX_AC_Client_Agent
INNER JOIN vComputer ON vComputer.Guid = Inv_AeX_AC_Client_Agent._ResourceGuid
INNER JOIN [fnGetTrusteeScopedResources](@v1_TrusteeScope) AS [fnGTSR_3] ON [vComputer].[Guid] = [fnGTSR_3].[ResourceGuid]
WHERE (vComputer.Domain LIKE '%Domain%') AND (vComputer.[OS Name] LIKE '%OSName%') AND (vComputer.Name LIKE '%Name%') AND
(UPPER(Inv_AeX_AC_Client_Agent.[Agent Name]) IN ('ALTIRIS EXPRESS NS CLIENT', 'ALTIRIS AGENT')) AND (vComputer.Guid IN
(SELECT vComputer.Guid
FROM Inv_AeX_AC_Client_Agent
INNER JOIN vComputer ON vComputer.Guid = Inv_AeX_AC_Client_Agent._ResourceGuid
WHERE (UPPER(Inv_AeX_AC_Client_Agent.[Agent Name]) IN ('ALTIRIS EXPRESS ACLIENT', 'DEPLOYMENT AGENT FOR WINDOWS (ACLIENT)'))))
............end of sample...........

Thanks in advance if you have the opportunity to reply....( In the meantime I am waiting for my boss to send me to some training for these sort of sql for altiris too....I hope soon)

Last edited by periicles; 07-02-2009 at 07:46 AM..
periicles 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 07:57 AM.


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