How to Manipulate Data using the Altiris Connector White Paper

How to Manipulate Data using the
Altiris Connector
White Paper
January 11, 2017
© 2007 Altiris Inc. All rights reserved.
ABOUT ALTIRIS
Altiris, Inc. is a pioneer of IT lifecycle management software that allows
IT organizations to easily manage desktops, noteb ooks, thin clients,
handhelds, industry-standard servers, and heterogeneous software
including Windows, Linux, and UNIX. Altiris automates and simplifies IT
projects throughout the life of an asset to reduce the cost and complexity
of management. Altiris client and mobile, server, and asset management
solutions natively integrate via a common W eb -based console and
repository. For more information, visit www.altiris.com.
NOTICE
INFORMATION IN THI S DO CUMENT: ( I) IS PRO VIDED FOR I NFORMATIONAL PURPOSES O NLY W ITH
RESPECT TO PRODUCTS OF ALTIRI S OR ITS SUBSI DIARI ES (“PRODUCT S”), (II) REPRESENTS ALTIRI S’
VIEW S AS OF THE DAT E OF PUBLICATION OF THIS DO CUMENT, (III) IS SUBJECT TO CHANGE W ITHOUT
NOTICE, AND (I V) SHO ULD NOT BE CONSTRUED AS ANY CO MMIT MENT BY ALTIRI S. EXCEPT AS PROVI DED
IN ALTIRI S’ LICENSE AGREEMENT GOVERNING ANY PRO DUCTS OF ALTI RIS OR IT S SUBSIDIARIES
(“PRODUCT S”), ALTIRIS ASSUMES NO LIABILIT Y W HATSOEVER, AND DI SCLAI MS ANY EXPRESS OR IMPLIED
W ARRANTIES RELATING TO THE USE OF ANY PRODUCT S, INCL UDING W ITHOUT LIMITATION, W ARRANTIES
OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, O R INF RINGEMENT OF ANY THIRD PARTY
INTELLECTUAL PROPERTY RIGHTS. ALTIRIS ASSUMES NO RESPO NSI BIL ITY FOR ANY ERRORS OR
OMISSIONS CO NTAINED IN THI S DO CUMENT AND ALTIRIS SPECIFICALL Y DISCLAI MS ANY AND ALL
LIABILITIES AND/O R OBLIG ATIONS F OR ANY CL AIMS, SUITS O R DAMAGES ARI SING FRO M O R IN
CONNECTION W ITH THE USE OF, RELIANCE UPON OR DISSEMINATION O FTHIS DOCUMENT AND/OR THE
INFORMATION CO NT AINED HEREIN.
Altiris may ha ve patents or pending patent applications, trademarks, cop yrights, or other intellectual property
rights that relate to the Products referenced herein. The furnishing of this docu ment and other materials and
information does n ot provide any license, express or i mplied, by estoppel or otherwise, to any foregoing
intellectual property rights.
No part of this docu ment may be reproduced, stored in a retrieval system, or transmitted in any form or by any
means without the e xpress written con sent of Altiris, Inc.
Custo mers are solely responsible for assessing the suitability of the Products for use in particular applications.
Products are not intended for use in medical, life saving, life sustaining, critical control or safety syste ms, or in
nuclear facility applications.
Copyright © 2006, Altiris, Inc. All rights reserved.
Altiris, Inc.
588 W est 400 South
Lindon, UT 84042
Phone: (801) 226-8500
Fax: (801) 226-8506
*Other co mpany na me s or products me ntioned are or may be trade mar ks of th eir respective owners.
Infor mation in this document is sub ject to change without notice. For the latest docu mentation, visit
www.altiris.com.
www.altiris.com
CONTENTS
Introduction ................................................................................... 1
Resolution Summary .................................................................... 1
Step 1: Create a ODBC Server DSN .......................................... 1
Step 2: Create the Altiris Connector Data Source ...................... 7
Step 3. Create the Altiris Connector Import Rule ....................... 9
www.altiris.com
INTRODUCTION
Use has created a custom dataclass called “Asse t Classification”. This
class has an attribute called “Asset Classification” that can take on a
number of different values. The customer wants all Monitors and
Computers to take on the value of “Primary”.
Resolution Summary
The Altiris Connector is used to change the status of this attribute. Since
both Monitors and Computers need to be changed, this process will need
to be completed twice, once for Monitors and once for Computers
Step 1: Create a ODBC Server DSN
1. From the Administrative Tools select Data Sources (ODBC).
2. Select the System DSN tab.
www.altiris.com
How to Manipulate Data using the Altiris Connector > 1
3. Click the Add button. The Create New Data Source dialog appears:
2 < How to Manipulate Data using the Altiris Connector
www.altiris.com
4. Select the SQL Server driver from the list. The Create a New Data
Source to SQL Server dialog appears:
5. Enter a unique name for the data source.
6. Give a description for the data source.
7. Select the server where the Altiris database resides.
www.altiris.com
How to Manipulate Data using the Altiris Connector > 3
8. Click Next to continue.
9. Select the proper SQL Server authentication.
10. Click Next. The following dialog appears:
4 < How to Manipulate Data using the Altiris Connector
www.altiris.com
11. Change the default database to Altiris.
12. Click Next to continue. The following dialog appears:
13. The settings on this dialog can be left at the default values.
14. Click Finish. The following dialog appears:
www.altiris.com
How to Manipulate Data using the Altiris Connector > 5
15. Click Test Data Source. If the System DSN has been configured
properly the message “TESTS COMPLETED SUCCESSFULLY!” will
appear.
16. Click OK. The newly created system DSN appears in the list.
6 < How to Manipulate Data using the Altiris Connector
www.altiris.com
17. Click OK to close the dialog.
Step 2: Create the Altiris Connector Data Source
1. Navigate to the Configuration tab > Server Settings > Notification
Server Infrastructure > Data Replication > Data Sources.
2. Right-click the Data Sources folder and select New > Odbc Data
Source.
3. Enter a unique name for the new data source.
4. Enter the name of the system DSN created in step 1.
5. Using query analyzer to create your query.
This query returns the list of Monitors.
SELECT r1.Guid AS '_ItemGuid', 'Primary' as 'Asset Classification' from
vResourceItem r1
left outer join inv_asset_classification ac on r1.guid = ac._resourceguid
WHERE ResourceTypeGuid = 'FE46D9CE-B71C-4DE4-B790242A9EF1A5D3' ORDER BY [Name]
This query returns the list of Computers.
www.altiris.com
How to Manipulate Data using the Altiris Connector > 7
SELECT r1.Guid AS '_ItemGuid', 'Primary' as 'Asset Classification' from
vResourceItem r1
left outer join inv_asset_classification ac on r1.guid = ac._resourceguid
WHERE ResourceTypeGuid = '493435f7-3b17-4c4c-b07f-c23e7ab7781f'
ORDER BY [Name]
Note: In this query a custom dataclass called Asset Classification has
previously been created and linked to both computers and monitors. The
query sets the value to “Primary” which is the value that all monitors and
computers need to be set to. The “Left Outer Join” will include all
computers or monitors in the vResourceItem table including those that
also already have an entry in the Inv_Asset_Classification table.
Note: GUID '493435f7-3b17-4c4c-b07f-c23e7ab7781f' is the GUID that
represents the “Computer” resource type.
GUID 'FE46D9CE-B71C-4DE4-B790-242A9EF1A5D3' is the GUID that
represents the ‘Monitor’ resource type.
6. Insert the query in the Import Query field.
8 < How to Manipulate Data using the Altiris Connector
www.altiris.com
7. Click Save.
8. Click Test Data Source to verify that the query is valid.
9. Click Test Data Source. A W eb page containing the expected query
results appears:
10. Close the Data Source View Data Page down.
Step 3. Create the Altiris Connector Import Rule
1. Navigate to the Configuration tab > Server Settings > Notification
Server Infrastructure > Data Replication > Import/Export Rules.
2. Right-click on the Import/Export Rules folder and select New –
Resources Import/Export Rule.
3. Give the new rule a unique name.
4. Select the data source created in Step 2.
5. Select Monitor as the Resource Type.
6. Select Import as the replication direction.
7. Select Allow Resource Update only.
8. Set Removed Asset should be to Left unchanged in the NS.
9. Set the Resource Lookup Key to _ItemGuid.
10. Set the Column Mappings Resource Name: to _ItemGuid.
www.altiris.com
How to Manipulate Data using the Altiris Connector > 9
11. In the Asset Classification section select Asset Classification. This
represents the “Asset Classification” entry in the query. It has a value
of “Primary”.
12. Save the settings.
13. Test the rule to make sure it will run OK.
14. When the import rule runs, the Monitors/Computers will be reinserted
with the Asset Classification of Primary.
10 < How to Manipulate Data using the Altiris Connector
www.altiris.com