Showing posts with label Notification Server. Show all posts
Showing posts with label Notification Server. Show all posts

Monday, 9 January 2012

Altiris performance problems caused by web debugging being enabled on Resource Management, Activity Center, and pcAnywhere

Problem

Performance problems caused by web debugging being enabled on Resource Management, Activity Center, and pcAnywhere

Cause

Web debugging is enabled on some pages for Resource Management, Activity Center, and pcAnywhere

Solution

Turn off .NET web debugging on Resource Management, Activity Center, and pcAnywhere.

1. Each component has a Web sub-folder where a web.config file is located.
2. In the web.config file, find debug and set its value to false.

http://www.symantec.com/docs/TECH175109

Don't forget to click on an Ad if you found this information useful.
thx,
Gert

Wednesday, 21 December 2011

Nice to know: 'Devices' view in Altiris Activity Center still shows a client in the (IsManaged='1') search filter even after uninstalling the Symantec Management Agent (AexNSAgent.exe)

Problem
After manually uninstalling the ‘AexNSAgent.exe’ from a discovered and previously manageable client system, the computer is still viewed in the Altiris 'Activity Center' under devices with an 'Installed Agent'
The filter, (IsManaged='1') is used to filter computers and as seen on the attached screenshots, the computers with the AexNSAgent uninstalled are still listed.  However, the icon is not active (grayed out).
Creating a filter set to, (IsActive='1') will NOT show the clients that have had their AexNSAgent.exe files uninstalled.
EXPECTED RESULTS:
If the AexNSAgent.exe file is uninstalled from the managed client, an (IsManaged='0') switch should be sent to the Notification Server to indicate it is no longer being managed. This should be reflected in both Altiris Activity Center and First Time Setup.
Cause
Known Issue. Altiris Symantec Management Agent (SMA or Altiris Agent) does not send any inventory information while uninstall of the agent itself. Only sub-agents (plug-ins) send the inventory information, using the agent which is still exist.
This is actually a design restriction, since the client-side uninstall could be performed when no NS connection is available. In that case we can't send the inventory neither postpone the uninstall process.
Solution
This issue has been reported to the Symantec Development team. They are working in providing a solution for this in a future release.


pls click on an AD if you found this information useful.

thx,

Gert

Monday, 19 December 2011

Beware : Altiris enhanced console views and updating to Altiris ITMS 7.1 SP2

http://www.symantec.com/docs/HOWTO61133

To update to enhanced console views 7.1 SP2 from a 7.1 SP1 environment
  1. Start Symantec Installation Manager.
  2. On the Installed Products page, click View and install updates.
  3. On the Product Updates page, search for Altiris Deployment Solution Complete Suite 7.1 SP1a MR1a and take one of the following actions:

    Option 1:
    If you find Altiris Deployment Solution Complete Suite 7.1SP1aMR1a in the list of updates on the Product Updates page, then you have an environment that does not include installed hot fixes.
    You must use the View and install updates option in Symantec Installation Manager to update to enhanced console views 7.1 SP2. You must select the Altiris Deployment Solution Complete Suite 7.1 SP1a MR1a update.

    Option 2:
    If you do not find Altiris Deployment Solution Complete Suite 7.1SP1aMR1a in the list of updates on the Product Updates page, then you have an environment that includes installed hot fixes.
    You must use the Install new products option in Symantec Installation Manager to update to enhanced console views 7.1 SP2. This option lets you install the 7.2 version of your product on top of the 7.1 version of your product.

    How to install New Products in SIM:

    1. On the Installed Products page, click Install new products.
    2. On the Install New Products page, select the 7.1 SP2 version of your Suite or individual Solution. For example, if you have IT Management Suite 7.1 SP1, select IT Management Suite 7.1 SP2.
    3. Click Next, and continue with the installation process.
Don't forget to click on an AD if you found this information useful.

thx,

Gert

    Altiris SQL Database growth issue : InvHist_Policy_Compliance_Status table

    Problem

    You are facing a database growth issue due to the InvHist_Policy_Compliance_Status table within your Altiris SQL environment.
    Cause
    Every time a compliance check is ran for a Managed Software Delivery policy a compliance status update is submitted.
    When the new status is updated into Inv_Policy_Compliance_Status a copy of all the existing compliance statuses for that client is added to the InvHist_Policy_Compliance_Status table.
    How large the table grows all depends on how many MSD policies each client has ran, number of clients running MSD policies, and how often the compliance check is scheduled to occur for each policy.
    Solution - http://www.symantec.com/docs/TECH146168
    Possible approaches:

    1. Change configuration so this table grows more slowly.
      This can be done by modifying MSD policies, so the policy compliance checks are run less often. If the policy check schedule to occur during a time range, the check may occur multiple times during that time range. So, changing the policy to check at certain times will reduce the number of times the check is perfomed, while accomplishing the desired results. If checks are peformed at specific times, consider how often these checks need to be performed. Perhaps daily or weekly will be sufficient.
      Slowing the growth will reduce the work which is done on the various managed computers, and the amount of data they forward to the SMP server, which the SMP server has to process.
      To see which policy are contributing the most to the recent growth of this table, use first attached SQL; the second query show the computers that are the largest recent contributors.
    2. Disable the saving of this historical information.
      If you have slowed the growth of this table, and it is still growing to rapidly, then you may want to disable the saving of the history for this data class. Note that this table is used by some reports.
      The history settings can be found in Settings\Notification Server\Resource and Data Class Settings\Resource History.
      Disable check box for this data class in history settings. Note that existing table is renamed to InvHist_Policy_Compliance_Status_Backup_1 (or similar). This table is no longer in use and can be deleted/moved to regain space.
    3. Slowing the growth of this table, will not reduce the size of this table immediately. The table should eventually shrink through the normal data class purge processes. But if want to free up this space immediately, then if appropriate precautions are taken, this table can be truncated.
      First perform a complete database backup, prior to implementing the following change.
      Second, the query can be used to truncate the table.
      TRUNCATE TABLE InvHist_Policy_Compliance_Status

    Following SQL queries can used to identify the problem
    Don't forget to click on an AD if you found this information useful.

    thx,

    Gert

      Thursday, 26 May 2011

      Running IE6, IE7 and IE8 Side-by-Side on Windows XP Using Symantec Workspace Virtualization

      More Information and a detailed how-to can be found on this page

      http://www.symantec.com/connect/articles/running-ie6-ie7-and-ie8-side-side-using-symantec-workspace-virtualization

      Symantec Workspace Virtualization is the successor of the Altiris Software Virtualization Solution ( SVS )

      If you find the information usefull please leave a comment and don't forget to click on an AD, thx !

      Tuesday, 26 October 2010

      Symantec Altiris - Find all tables that contain a specific GUID

      A very nice knowledgebase article which can help you during troubleshooting. Works for version 6 and version 7.

      The following SQL script will traverse an Altiris database and find all tables in which a specified GUID appears. It reports both the table and the column. The only requirement is to change the value of the guid being searched (Under the line that reads "Enter Search Guid here")

      http://www.symantec.com/docs/HOWTO1191

      Wednesday, 13 October 2010

      Using NS6 Custom Inventory in NS7

      Custom Inventory in NS7 is significantly different than in NS6. In fact, the two methods are incompatible. NS6 custom inventory will not run in an NS7 environment as an inventory process. However, by utilizing the data class creation and software management capabilities of NS7, it is possible to continue using the NS6 custom inventory files in an NS7 environment, thus preserving the investment in NS6 custom inventory

      More information and a How-To can be found here…

      http://www.symantec.com/docs/HOWTO10489

      Monday, 11 May 2009

      Upgrading Altiris Inventory Solution -- Best Practices

      http://www.symantec.com/connect/articles/upgrading-inventory-solution-best-practices

      Solution Upgrade

      The main solution upgrade will take the NS offline as it commences. This includes pausing the Server so no incoming NSE files will be processed. The queues will fill up with files as the NS Event Router is still moving files from the postevent.asp page to the respective queues. Other internal tasks (including client configuration updates) will not process during this time.
      The upgrade might take a long time if Normalization and other data class upgrades are required during the upgrade, and depending on the size of the Database. It is recommended to use the 'Update' button under the Solution Center to upgrade as this will check all prerequisites:

      Click to view.
      Note: Inventory Solution 6.1 SP2 requires Notification Server 6.0 SP3 R4 as Vista Support is added in these two products and versions.
      The following issues should be considered when Upgrading:
      • Upgrade completes but console items are missing: https://kb.altiris.com/article.asp?article=19921&p=1 Note: If you are using the SP1 or SP2 installer this should be resolved.
      • Error is reported in the Notification Server log when upgrading from Inventory Solution 6.0 to 6.1 SP1. When upgrading from Inventory Solution 6.0 to 6.1 SP1, the "Class Name: AeX HW ActiveTcpUdpPorts Class Guid: b50e2401-5865-43ed-95e7-75f06b77d7ce Trying to register a Split Table to a common data table that either does not exists or is not 'common' classtype" error is reported to the Notification Server log file. This error is reported because the AeX HW ActiveTcpUdpPorts data class being accessed in 6.1 SP1 did not exist in 6.0. Note: This error will not affect the upgrade process.
      • IMPORTANT > The upgrade deletes all custom files not originally part of the Inventory Agent Package (located at \Program Files\Altiris\Notification Server\NSCap\Bin\Win32\X86\Inventory Solution). This includes all custom scripts, INI files, custom inventory XML files, or any file not created by Inventory directly.

      Normalization

      The splitting of the data classes was done to improve performance of reporting. Since Inventory Solution's usefulness comes from reporting and secondly Collection usage, it is essential to get the most out of the upgrade by understanding what is occurring.
      A utility page for Normalization data classes has been provided in the Altiris Console. Under View > Configuration (Configuration tab in the 6.0 Console) > Solution Settings > Asset and Inventory > Inventory > Windows > Normalize:

      Click to view.
      Use the following steps to analyze if Normalization is required after an upgrade:
      1. After an upgrade is completed, browse to the above location. To check if it is completed, look in Task Manager for a dcsplit.exe process. If it is running, leave it running until it is completed.
      2. Grayed-out entries are already Normalized. If Normalization is not successful, browsing back to this page will show the entries 'active' again.
      3. Check the boxes if those classes to normalize. Note that this process takes considerable resources and time to complete depending on the size of the Inventory tables being split.
      4. It is recommended to check the 'View progress of Normalization' so that the status can be directly checked. Once running, do not try to access this page for additional normalization until the process is completed.
      The following issues should be considered when Normalizing the database:

      Special Group Deprecation

      New installations of Inventory Solution 6.1 Sp1 or SP2 do not have Special Groups. This document will not cover the use cases for Special Group Deprecation, but will cover the process of doing it. To see the reasons for deprecating Special Groups, please see Juice Article: Improve Inventory Solutions Performance: Deprecate Special Groups
      If you installed Inventory Solution 6.1 SP1 or SP2 as a new install, nothing needs to be done as Special Groups were never setup. Note that while they do not exist, the Special Group tab is still available for use.
      Upgrades to SP1 or SP2 will still have all default and custom Special Group Data classes present. To remove the default ones, a utility has been provided to accomplish this.
      1. Browse to the following folder: NS_install_path\Program Files\Altiris\Inventory\Special Groups Upgrade.
      2. Launch the .EXE: Altiris_SpecialGroupsUpgrade_6_1.exe.
      This executable removes the separate Special Group data classes from the Notification Database. It updates the files, such as AuditPls.ini, win32invFloppy1.exe, and AeXWebInvPkg.exe files. The Special Groups inventory will now be collected into the standard AeX SW Audit Software data class.
      For more information, please see the following Article:

      Data Class Upgrades

      Changes made to data classes outside of Normalization provide additional support and functionality previously unavailable. The following items detail the changes that have occurred to provide this functionality:
      1. UUID value captured > Previous to Inventory 6.1 SP1 we did not capture the system UUID with AeXSNPlus. Now we capture this as part of the AeX HW Serial Number table. Note: It is recommended to use SP2 as there was a known issue with the new UUID column that has been resolved. See the following KB for details: https://kb.altiris.com/article.asp?article=25625&p=1
      2. VM GUID column added > In Inventory 6.1 Sp1 the AeX VirutalMachine data class now has this column capturing the Guid of the virtual machine, allowing you to better distinguish between host and clients. Note that a bug caused this column to be empty until 6.1 SP2.
      3. Physical Memory Size > Previous to Inventory 6.1 SP1 we incorrectly reported memory sizes above 2GB. This has been corrected by both AeXMachInv and the database table that houses this information.
      4. Software File Size > Previous to Inventory 6.1 SP2 the data type for the file size column was an INT or Integer. This limited the largest size we were able to record to 2GB. Now the data type is BigINT, allowing a much larger size value to be captured.
      5. 64-bit Support > We've added support for 64-bit computers to Inventory 6.1 SP2. While we still captured some data in previous versions, we now officially support it and capture more data. In AeX OS Operating System we added an 'Architecture' column with the possible values of 32 or 64, respectively.
      6. Vista Support > In Inventory 6.1 SP2 we've added native support for Vista.
      7. CPU Core Count > We now track the CPU core count as of Inventory 6.1 SP2. Note: See the following KB for a known limitation: https://kb.altiris.com/article.asp?article=32370&p=1

      Inventory Agent Package

      Inventory Solution does not have a standard plug-in Agent for the Altiris Agent. The Inventory Agent is a collection of files including Inventory Agent 'EXE's that execute individually. These Agents have had improvements and upgrades made to them, some of which are required for the upgraded Data Classes.
      Normally after the upgrade the Agents running the Inventory Tasks will automatically update to the new version of the package. This is done through this process:
      1. The Altiris Agent requests a new configuration
      2. New snapshot information is received for the Inventory Agent Package.
      3. The Altiris Agent downloads the files that have changed.
      If Package Servers are used in the environment, make certain they are working properly and have received the new version of the Inventory Agent Package.
      Note: Failure to do so may result in Inventory being thrown out at the Server! If the old Inventory Agents send data to the new database schema, the NSE will likely be thrown out because the schema in the NSE containing the data will not match the database.

      Inventory Reports

      Don't forget to upgrade the Report Pack for Inventory Solution! The reports used to reside as part of the main Solution installer, but now the Reports install with a separate execution. This allows new builds of the reports to be released without touching the main Inventory Solution installation (most definitely recommended).
      The main version for SP1 and SP2 is Report Pack for Inventory Solution for Windows 6.2. The complete build numbers are as follows:
      • Inventory Solution 6.1 SP1 > 6.2.1036
      • Inventory Solution 6.1 Sp2 > 6.2.1046
      If you use the Solution Center, the Report Pack should automatically be upgraded to the correct version. If you are not using the Solution Center, you should download the Report Pack from http://www.solutionsam.com/solutions/6_0/; Filename: Altiris_ReportWinInv_6_2.exe.

      Friday, 20 March 2009

      During the Altiris Agent Installation window I get the following error: 'The following error occurred on the page InstallClient.aspx: Failed to Render the control'

      Problem/Symptoms

      During the Altiris Agent Installation window I get the following error:
      The following error occurred on the page 'InstallClient.aspx: Failed to Render the control'
      In the logs, the error looks like this one:
      Priority: 1
      Date: 10/4/2006 9:44:34 AM
      Tick Count: 183687687
      Host Name: NSServer
      Process: w3wp.exe (4592)
      Thread ID: 7528
      Module: AltirisNativeHelper.dll
      Source: global.asax
      Description: Unhandled exception.  Type=Altiris.NS.Exceptions.AeXException Msg=Failed to render the control.
      StackTrace=
         at Altiris.NS.UI.Controls.CollectionPickerCtrl.Render(HtmlTextWriter output)
         ....(obmitted section)

      Inner exception.  Type=Altiris.NS.Exceptions.AeXException Msg=Failed to get the names of the selected collections.

      Inner exception.  Type=Altiris.NS.Exceptions.AeXException Msg=Failed to fetch Collection datarow from database. No rows returned.

      Looking on the Notification Server logs, you may find another error like this one close to the error above:
      Priority: 1
      Date: 10/4/2006 9:45:01 AM
      Tick Count: 183715343
      Host Name: NSServer
      Process: aexsvc.exe (1740)
      Thread ID: 6720
      Module: AltirisNativeHelper.dll
      Source:
      Altiris.NS.StandardItems.Collection.DeltaCollectionUpdateSchedule
      Description: Error occurred during delta collection updating: Altiris.NS.Exceptions.AeXException: Failed to fetch Collection datarow from database. No rows returned.

      Resolution

      For this error, The following error occurred on the page 'InstallClient.aspx', please try the following article:
      Article ID: 18945 "Object reference not set to an instance of an object—Altiris Agent Installation Page"

      If you still get the same error please try the following:
      --Use the following query to find out if any defined collections are missing from Collection table:

      select guid, name
      from item
      where classguid in
          (
          select distinct classguid
          from item
          where guid in
          (select guid from collection)
          ) and
            guid not in
             (select guid from collection)

      --Use the following SQL query to move missing collections into a temporary table to be used for an insert into the Collection table.  This should resolve the collection inconsistencies causing the errors:

      SELECT Guid, '34BE747F-C855-4F8F-93E7-50176076A200' as LegacySolutionGroupGuid, createddate, modifieddate into #t
      FROM Item WHERE Guid in
          (select guid
          from item
          where classguid in
              (
              select distinct classguid
              from item
              where guid in
              (select guid from collection)
              ) and
                guid not in
                 (select guid from collection)
          )
      begin tran
      insert into collection (Guid, LegacySolutionGroupGuid, CreatedDate, ModifiedDate)
        select Guid, LegacySolutionGroupGuid, CreatedDate, ModifiedDate from #t
      commit tran
      drop table #t

      Monday, 19 January 2009

      Manually run Altiris Patch Management Inventory Policies on a client

      A command-line utility called "AeXPatchUtil.exe" is a new feature for Altiris Patch Management 6.2. It has been placed in the directory C:\Program Files\Altiris\Altiris Agent\Agents\PatchMgmtAgent and can be used on a computer with the Altiris Software Update Agent installed to run Inventory policies.

      There are four Inventory policies that the above Patch command line utility is supposed to run when used with the "/I" option.

      Under the Global folder:

      •   Default Windows OS Inventory Policy
      •   Default Windows Software Release Inventory Policy

      Under the Microsoft folder:

      •   Default Microsoft Software Inventory Policy
      •   Default Microsoft Vulnerability Analysis Policy

      When the user runs the Patch command line utility AeXPatchUtil /I only three of the four Global and Microsoft policies are run. Currently the Default Windows OS Inventory Policy is being missed. Additional information can be found on https://kb.altiris.com/article.asp?article=29549&p=1

      Friday, 16 January 2009

      Improving IIS and Altiris Notification Server response times

      Article ID: 33499

      Applies To     

      • AuditExpress 1.3
      • Carbon Copy 6.2
      • HPCMS 6.1
      • Inventory for Windows 6.0, 6.1
      • Local Security Solution (LSS)

      Some solutions still have debug-mode compiling enabled in their related web.config files. Debug-mode compiling can cause performance problems for any ASP.NET application. In particular, the following debug-mode behaviors impact Notification Server performance:

      • The compilation of ASP.NET pages takes longer (since some batch optimizations are disabled).
        • This can be seen in the initial viewing of each Notification Server console page.
      • Code can execute slower (since some additional debug paths are enabled).
      • Much more memory is used within the application at runtime.
        • This is of particular importance on Notification Servers with 2 GB of physical memory, and large client facing servers with multiple Altiris solutions enabled.
      • HTTP Runtime execution timeouts are enforced

      Additional information about debug mode is available at ScottGu's Blog
      Note: The current version of Altiris Notification Server utilizes ASP.NET 1.1  It is not currently possible to use the deployment retail="true" setting which is available for ASP.NET 2.

      Manual Resolution

      Make the following modification to each web.config file that is part of the Altiris installation (\Program Files\Altiris). The change will be implemented as soon as another request to the related page occurs. In most cases, this will involve a visit to the related configuration or task Notification Server console page.

      Before (web.config)

      <compilation
               defaultLanguage="c#"
               debug="true" />

      After (web.config)

      <compilation
               defaultLanguage="c#"
               debug="false" />

      Automated Resolution

      From a command line, execute the utility you can find here https://kb.altiris.com/utility/getfile.asp?rid=2411&aid=33499. It must be copied to the local file system on the Notification Server to meet .NET security requirements. All output will be sent to the console window, and important items will also be sent to the Notification Server log. Any modified web.config file will first be duplicated as "config.original" in the same folder. The utility offers two modes. 
      To perform a check to see which web.config files will be modified, use the following command:

      DisableWebDebug -check

      To update the web.config files, use the following command:

      DisableWebDebug -fix

      By default, the utility will check the registry for the primary Notification Server installation directory, such as C:\Program Files\Altiris. If necessary, a second parameter can be used to specify an alternate search path as depicted below:

      DisableWebDebug -fix "H:\Altiris2"

      It is not necessary to restart any services, automatic recompilation will occur upon the next related Web page request.

      For some other specific applications of this, see article 25655.

      Grtz,

      Gert

      ps. Feel free to leave a comment if you find this information helpfull and don't forget to click on an AD ;-) , THX once more

      Improving the Performance of Altiris NS 7 aka Symantec Management Platform

      Article ID: 45092

      If the SQL Server is on the same computer as Notification Server, we recommend that you optimize your SQL Server maximum memory settings. This can significantly improve product performance. We recommend 500-1000 MB for a 2 GB memory server and 1000 MB for other servers.

      For more information, see Microsoft KB 321363 and KB 319942.

      Because the root problem is the amount of memory swapping that takes place, running other applications on the same computer can also contribute to performance issues.

      Grtz,

      Gert

      ps. Feel free to leave a comment if you find this information helpfull and don't forget to click on an AD ;-) , THX once more


      Thursday, 15 January 2009

      Remote Troubleshooting of a NS Client - Remote Altiris Agent Diagnostics

      A guy on juice has created an application to make our life as Altiris Consultant much easier

      “Remote Altiris Agent Diagnostics” allows you to connect into a remotely Altiris Agent managed machine to view all the configurations and troubleshoot without having to RDP into the machine to look at the Agent UI.

      Check it out on

      http://www.symantec.com/community/download/9801/remote-altiris-agent-diagnostics

      and all credits to him !!

      Grtz,

      Gert

      ps. If you find the information usefull please leave a comment and don't forget to click on an AD ;-) , THX once more

      Wednesday, 14 January 2009

      Altiris Helpdesk Solution Upgrade guide

      A Technical white paper on upgrading your Altiris Helpdesk Solution software can be found on the Altiris knowledgebase

      https://kb.altiris.com/article.asp?article=24499&p=1

      grtz,

      Gert

      ps. Leave a comment if you found this information helpfull and if you want to "don't forget to click on an AD ;-)"

      Altiris Products Ports and Protocols for DS and NS

      Information about ports used by Deployment server and Notification Server

      https://kb.altiris.com/article.asp?article=1176&p=1

      Tuesday, 6 January 2009

      Multiple instances of the same filename, but different file path are not reported by Inventory Solution for Windows in Altiris Notification Server

      KB 35400

      Problem/Symptoms

      A Software Inventory scan using AeXAuditPls.exe does not report multiple instances of the same file. The Windows* operating system allows files to be named the same as long as they are in separate folders. As determined by inspecting the auditpls.nsi file on a client computer, files with the same name but different file paths are collected properly by AeXAuditPls.exe and sent to the Notification Server. However, only one of these files is added to the AeX SW Audit Software data class.


      Environment

      Inventory Solution for Windows 6.1 SP2 (6.1.1075) and all previous versions


      Cause

      The Notification Server dataloader uses the following properties to determine a unique row to be placed into the AeX SW Audit Software data class (Inv_AeX_SW_Audit_Software_spt and Cmn_SW_Common tables in the database):

      • Manufacturer
      • Product Name
      • Product Version
      • Language
      • File Name
      • File Size
      • InternalName
      • File Description

      The dataloader will ignore multiple instances of files that match on these properties. Note that "File Path" in not used to determine uniqueness, which is why only one instance of a file that occurs in multiple folders is inserted into the database.

      Also note that since "File Size" is used to determine uniqueness, data files (and executable files) with the same name, but with different sizes, will be inserted into the database. On the odd chance that data files with the same name contain different data, but have the same exact size, only one file will be inserted into the database.


      Resolution

      This resolution is provided "as is" and has not been reviewed by the developers of Inventory Solution for Windows. It may not be suitable for every environment.

      Important: Because this resolution updates the data in the database, back up the Altiris database first.

      A change to the DataClassAttribute Table will cause the Data Loader to use "File Path" to determine unique rows to insert into the database. The following SQL query will show the attributes the Data Loader uses to determine uniqueness.

      USE Altiris
      SELECT * FROM DataClassAttribute
      WHERE InvClassId = (SELECT id FROM DataClass WHERE Name = 'AeX SW Audit Software')
      ORDER BY AttrId

      You can use this SQL statement to change the "File Path" attribute so it is used to determine uniqueness.

      USE Altiris
      UPDATE DataClassAttribute
      SET KeyIndex = AttrId, Nullable = 0
      WHERE AttrName = 'File Path'
      AND InvClassId = (SELECT id FROM DataClass WHERE Name = 'AeX SW Audit Software')

      Note: This change may be overwritten if a upgrade or repair is made to Inventory Solution for Windows.

      Tuesday, 30 December 2008

      Error ''Item has already been added'' when trying to set Resource Type in a CMDB or Connector Rule

      Applies To

      • Altiris Connector 6.5
      • CMDB 6.5


      Problem/Symptoms

      After upgrading to CMDB/Asset 6.5, when trying to set the Resource Type within a CMDB or Connector rule, the following error may be shown:

      Module: AltirisNativeHelper.dll
      Source: global.asax
      Description: Unhandled exception.  Type=System.ArgumentException Msg=Item has already been added.  Key in dictionary: "8b92ef99-7bac-49a0-8694-48d7558bc7ee"  Key being added: "8b92ef99-7bac-49a0-8694-48d7558bc7ee"
      StackTrace=
         at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
         at System.Collections.Hashtable.Add(Object key, Object value)
         at Altiris.NS.Connector.Web.ImportExportRule.CreateDataClassesMappingsTable(Boolean bReloadColumns, Boolean bSetSavedValues)
         at Altiris.NS.Connector.Web.ImportExportRule.CreateAllMappingControls(Boolean bReloadColumns, Boolean bSetSavedValues)
         at Altiris.NS.Connector.Web.ImportExportRule.ResourceType_Change(Object sender, EventArgs e)
         at System.Web.UI.WebControls.ListControl.OnSelectedIndexChanged(EventArgs e)
         at System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
         at System.Web.UI.Page.RaiseChangedEvents()
         at System.Web.UI.Page.ProcessRequestMain()

      The following Resource Types have been reported as affected by this issue, others could be affected:

      Computer
      Monitor
      Network Printer
      Office Equipment
      Peripheral
      Scanner


      Cause

      This can be caused by having the Accounting Information data class directly associated to a child Resource Type and the child's Base Resource Type, Asset.


      Resolution

      1. Back up the Altiris database
      2. Run the following sql script against the Altiris database


      --Set up @ResourceTypeDataClassAssoc table variable
      DECLARE @ResourceTypeDataClassAssoc TABLE
      (
      ResourceType nvarchar(250),
      ResourceTypeGuid uniqueidentifier,
      depth bit,
      BaseResourceType nvarchar(250),
      BaseResourceTypeGuid uniqueidentifier,
      DataClass nvarchar(250),
      ResourceDataClassGuid uniqueidentifier
      )

      /*
      populate @ResourceTypeDataClassAssoc with data classes
      associated to resource types at each level in the hierarchy
      */
      INSERT INTO @ResourceTypeDataClassAssoc
      SELECT i.name as ResourceType, rth.ResourceTypeGuid, rth.depth, i2.name as BaseResourceType,
      rth.BaseResourceTypeGuid, i3.name as DataClass, rtdc.ResourceDataClassGuid
      FROM ResourceTypeHierarchy rth
      JOIN item i on rth.ResourceTypeGuid = i.Guid
      JOIN item i2 on rth.BaseResourceTypeGuid = i2.Guid
      JOIN ResourceTypeDataClass rtdc on rth.BaseResourceTypeGuid = rtdc.ResourceTypeGuid
      JOIN item i3 ON rtdc.ResourceDataClassGuid = i3.Guid

      /*
      Find resource types that have data classes associated directly, and indirectly through
      any base resource type in their hierarchy, and delete them from the ResourceTypeDataClass table
      */
      DELETE FROM ResourceTypeDataClass
      WHERE EXISTS
      (
      SELECT *
      FROM @ResourceTypeDataClassAssoc rt1
        JOIN @ResourceTypeDataClassAssoc rt2 ON rt1.ResourceTypeGuid = rt2.ResourceTypeGuid
        AND rt1.BaseResourceType != rt2.BaseResourceType
        AND rt1.ResourceDataClassGuid = rt2.ResourceDataClassGuid
      WHERE rt1.depth = 0
        AND ResourceTypeDataClass.ResourceTypeGuid = rt1.ResourceTypeGuid
        AND ResourceTypeDataClass.ResourceDataClassGuid = rt1.ResourceDataClassGuid
      )

      Thursday, 4 December 2008

      Altiris Notification Server (NS) reports for Altiris Deployment Server (DS)

      Following links will give you some NS reports for DS

      http://www.symantec.com/community/download/4659/ds-reporting-ns-6-pack-reports

      Reports:

      Shows a listing of all DS jobs that are currently (actively) deploying. 
      Count of all computers with pending DS jobs. Right-click option will list the jobs pending for the selected computer. 
      List of scheduled DS jobs that have been scheduled for more than X amount of days, with 30 as the default. 
      List of all scheduled DS jobs, but you have the option of entering full/partial computer name and DS Job name to filter your results. The default is a full list of all scheduled DS jobs for all computers. 
      Like report #2, but this is for Completed jobs, rather than pending. 
      Like report #4, but this is for Completed Jobs, rather than pending. 

      http://www.symantec.com/community/article/6349/reporting-deployment-solution-using-notification-server

      Reports:

      Report to give you jobs that are scheduled in the future for DS 
      Report to find all of your WOL proxies 
      Grtz,

      Gert

      Altiris Database Structure (Schema) of NS or any other database

      Article ID: 1485

      These are SQL scripts to show and capture the Database structure of the Notification Server or any other database.



      -- SQL Script to capture the database table structure
      select
      [table_name] as [Table Name],
      [column_name] as [Column Name],
      case [data_type]
      when 'varchar' then [data_type] + '(' + cast([character_maximum_length] as varchar) + ')'
      when 'nvarchar' then [data_type] + '(' + cast([character_maximum_length] as nvarchar) + ')'
      else [data_type]
      end as [Data Type],
      case [is_nullable]
      when 'No' then 'No'
      else 'Yes'
      end as [Nullable],
      isnull([column_default], '') as [Default Value],
      isnull(cast([numeric_precision] as nvarchar),'') as [Precision],
      isnull(cast([numeric_precision_radix] as nvarchar),'') as [Precision Radix],
      isnull([collation_name],'') as [Collation Name]
      from information_schema.[columns]
      where [table_catalog] like '%'
      and [table_schema] like 'dbo'
      and [table_name] like '%'
      and [column_name] like '%'
      and [data_type] like '%'
      order by [table_name], [ordinal_position]



      -- SQL Script to capture the names of the database objects
      select distinct
      case [xtype]
      when 'C' then 'CHECK constraint'
      when 'D' then 'DEFAULT constraint'
      when 'F' then 'FOREIGN KEY constraint'
      when 'L' then 'Log'
      when 'FN' then 'Scalar function'
      when 'IF' then 'Inlined table-function'
      when 'P' then 'Stored procedure'
      when 'PK' then 'PRIMARY KEY constraint'
      when 'RF' then 'Replication filter stored procedure'
      when 'S' then 'SYSTEM table'
      when 'TF' then 'Table function'
      when 'TR' then 'Trigger'
      when 'U' then 'User table'
      when 'UQ' then 'UNIQUE constraint'
      when 'V' then 'View'
      when 'X' then 'Extended stored procedure'
      end as [xtype],
      [name] as [Name]
      from [dbo].[sysobjects]
      where [xtype] in ('C', 'D', 'FN','P', 'PK', 'TR', 'U', 'V')
      and [name] like '%'
      order by [xtype], [name]



      -- SQL Script to capture the Names and Definitions of Views
      select
      [table_name] as [View Name],
      [view_definition] as [View Definition]
      from information_schema.[views]
      where [table_name] like '%'
      order by [table_name]



      -- SQL Script to capture the Names and Definitions of functions and procedures
      select
      [routine_type] as [Routine Type],
      [routine_name] as [Routine Name],
      [routine_definition] as [Routine Definition]
      from information_schema.[routines]
      where [routine_type] in ('FUNCTION','PROCEDURE')
      and [routine_name] like '%'
      order by [routine_name]

      -- SQL Script to capture the Names and Parameters of functions and procedures
      select

      [specific_name] as [Routine Name],
      [parameter_name] as [Parameter Name],
      case [data_type]
      when 'varchar' then [data_type] + '(' + cast([character_maximum_length] as varchar) + ')'
      when 'nvarchar' then [data_type] + '(' + cast([character_maximum_length] as nvarchar) + ')'
      else [data_type]
      end as [Data Type]
      from information_schema.[parameters]
      where [specific_name] like '%'
      order by [specific_name], [ordinal_position]



      -- SQL Script to capture the GUID and Table names
      -- This could help your SQL joins on what table have what guids.
      select
      [column_name] as [Guid Name],
      [table_name] as [Table Name],
      case [is_nullable]
      when 'YES' then 'Yes'
      else 'No'
      end as [Nullable],
      isnull([column_default], '') as [Default Value]
      from information_schema.[columns]
      where [table_schema] = 'dbo'
      and [data_type] like 'uniqueidentifier'
      order by [column_name], [table_name]



      -- To look at the table or view definition

      sp_help TableName
      sp_help ViewName

      sp_columns TableName

      -- To look at what indexes are in a table

      sp_helpindex TableName

      -- To look at the definition of a stored procedure or a view

      sp_helptext StoredProcedureName

      sp_helptext ViewName

      -- To look at the database object (tables, views, stored procedures) dependencies

      sp_depends DatabaseObject



      Notes:

      • Run these SQL scripts in Query Analyzer and save the result to a CSV file for study.
      • You will need to select the database (Altiris, Altiris_Incidents, express …) in Query Analyzer you wish to capture the schema.
      • In the where clause of the scripts, I left variables to filter (table_catalog, table_schema, table_name, column_name, data_type ...) and narrow your results.
      • These are SQL scripts will show you any database structure (Schema), but will not show the relationships between the tables (Data Dictionary).
      • The best joins for performance reasons will be on the columns that are indexed. Most table joins will be withuniqueidentifier (GUIDs) like (_ResourceGuid, Guid, ProductGuid, _KeyHash ...) or varchar/nvarchar (strings); so you may wish to filter on the data_type to see these.
      • To look at a text output (Ctrl + T) or a table output (Ctrl + D) use the control key combinations. Then viewing the output from the stored procedure sp_helptext, it is good to change the output to text.
      • The attached files (DatabaseTableRelationByGuid.txt, DatabaseTableRelationByString.txt) are SQL scripts that will show you the possible relations between tables and columns depending on the data that is in you database. These SQL scripts can be slow, due to the use of nested cursors in the script. There are variables in the scripts to filter /narrow you results to a set of tables.