» Site Navigation |
|
|
» Stats |
Members: 10,090
Threads: 12,230
Posts: 57,322
Top Poster: Nick (4,991)
|
| Welcome our newest member, garcia |
» September 2010 |
| S |
M |
T |
W |
T |
F |
S |
| 29 | 30 | 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
|
29
|
30
| 1 | 2 |
|
 |
06-19-2009, 03:57 AM
|
#1 (permalink)
|
Status: Junior Altiris Admin
Join Date: 10-28-2008
Location: australia
Posts: 24
|
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 04:23 AM..
|
|
|
06-19-2009, 08:36 AM
|
#2 (permalink)
|
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,991
|
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)
|
|
|
06-21-2009, 03:35 AM
|
#3 (permalink)
|
Status: Junior Altiris Admin
Join Date: 10-28-2008
Location: australia
Posts: 24
|
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...
|
|
|
06-21-2009, 09:51 PM
|
#4 (permalink)
|
Status: Super Altiris Admin
Join Date: 03-08-2006
Location: Baltimore, MD
Age: 30
Posts: 681
|
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
|
|
|
06-21-2009, 10:42 PM
|
#5 (permalink)
|
Status: Junior Altiris Admin
Join Date: 10-28-2008
Location: australia
Posts: 24
|
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 12:41 AM..
|
|
|
06-22-2009, 10:11 AM
|
#6 (permalink)
|
Status: Altiris Architect (Site Founder)
Join Date: 01-01-2005
Location: RDU, North Carolina, USA
Posts: 4,991
|
<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
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)
|
|
|
06-23-2009, 10:16 PM
|
#7 (permalink)
|
Status: Super Altiris Admin
Join Date: 03-08-2006
Location: Baltimore, MD
Age: 30
Posts: 681
|
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
|
|
|
07-02-2009, 05:46 AM
|
#8 (permalink)
|
Status: Junior Altiris Admin
Join Date: 10-28-2008
Location: australia
Posts: 24
|
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 06:46 AM..
|
|
|
 |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|