Client Management Suite

 View Only
  • 1.  Attached error while trying to run a SQL report in Altiris version 6

    Posted Feb 04, 2011 10:54 AM
      |   view attached

    Hi,

    I get the attached error while trying to run a SQL report in Altiris  version 6. It appears to time out. Does anyone have any ideas or suggestions as to why this is doing this?

    All feed back appreciated.

     

    Regards,

     

    Gary

     

    Attachment(s)

    doc
    Altiris error.doc   583 KB 1 version


  • 2.  RE: Attached error while trying to run a SQL report in Altiris version 6
    Best Answer

    Posted Feb 04, 2011 11:36 AM

    The SQL Management Studio, can you try running your query in there, just to make sure the results are valid? It's a bit of a misleading error, as you are indeed hitting a timeout error, but it could be because the query if FUBAR'ed. Also, running it straight in SQL can give you an idea of how long the query itself takes to run "unfettered" by any outside processes like client communication and the web app itself.

    If it never finishes in SQL, it's not going to finish in Altiris.

    In any case, you can set the SQL timeout under the Configuration, Server settings, database settings. Default is 600 seconds, but  you can up this based on the needs of your system.

    Keep in mind, if your SQL is onbox or otherwise overloaded you could just be seeing a deadlock in the request, depending on what else is occuring.



  • 3.  RE: Attached error while trying to run a SQL report in Altiris version 6

    Posted Feb 04, 2011 12:17 PM

    Can you post the query?



  • 4.  RE: Attached error while trying to run a SQL report in Altiris version 6

    Posted Feb 07, 2011 07:00 AM

    Hi mclemson, the query is:

     

    SELECT     ConfigRequestTbl.Name, DATEDIFF(d, ConfigRequestTbl.LastConfigRequest, GETDATE()) AS [Days since in contact with NS], CASE WHEN DATEDIFF(d,
                          ConfigRequestTbl.LastConfigRequest, GETDATE()) > 5 THEN 1 ELSE 0 END AS [>5days Since Last contact with NS],
                          dbo.Inv_AeX_HW_Serial_Number.[System Manufacturer], CASE WHEN dbo.Inv_AeX_HW_Serial_Number.[Computer Type] IS NULL
                          THEN 'Unknown' WHEN dbo.Inv_AeX_HW_Serial_Number.[Computer Type] = 'Low Profile Desktop' THEN 'Deskop' WHEN dbo.Inv_AeX_HW_Serial_Number.[Computer Type]
                           = 'Main Server Chassis' THEN 'Server' WHEN dbo.Inv_AeX_HW_Serial_Number.[Computer Type] = 'Mini Tower' THEN 'Desktop' WHEN dbo.Inv_AeX_HW_Serial_Number.[Computer Type]
                           = 'Notebook' THEN 'Laptop' WHEN dbo.Inv_AeX_HW_Serial_Number.[Computer Type] = 'Portable' THEN 'Laptop' WHEN dbo.Inv_AeX_HW_Serial_Number.[Computer Type]
                           = 'Space Saving' THEN 'Server' WHEN dbo.Inv_AeX_HW_Serial_Number.[Computer Type] = 'Tower' THEN 'Desktop' ELSE dbo.Inv_AeX_HW_Serial_Number.[Computer Type]
                           END AS [Asset Type], dbo.Inv_AeX_HW_Serial_Number.[Serial Number], LOG_HD.[Total Size in GB] AS [Total Logical Disk Size (GB)],
                          LOG_HD.[Total Free Space in GB] AS [Total Logical Disk Free Space(GB)], LOG_HD.[Number of disks ],
                          dbo.Inv_AeX_HW_Memory.[Total Physical Memory] / 1048576 AS [Total Ram(MB)], dbo.vComputer.[OS Name]
    FROM         (SELECT DISTINCT
                                                  _ResourceGuid, ROUND(SUM([Size in MBytes] / 1024), 3) AS [Total Size in GB], SUM([Free Space in MBytes] / 1024)
                                                  AS [Total Free Space in GB], COUNT(Name) AS [Number of disks ]
                           FROM          dbo.Inv_AeX_HW_Logical_Disk
                           WHERE      (Description = 'Local Disk')
                           GROUP BY _ResourceGuid) AS LOG_HD LEFT OUTER JOIN
                          dbo.vComputer ON LOG_HD._ResourceGuid = dbo.vComputer.Guid RIGHT OUTER JOIN
                          dbo.Inv_AeX_HW_Serial_Number ON dbo.vComputer.Guid = dbo.Inv_AeX_HW_Serial_Number._ResourceGuid RIGHT OUTER JOIN
                              (SELECT     MachineNames.Name, LastConfigReq.EventTime AS LastConfigRequest, MachineNames.Guid
                                FROM          (SELECT DISTINCT i.Name, i.Guid
                                                        FROM          dbo.Item AS i CROSS JOIN
                                                                               dbo.Evt_NS_Client_Config_Request AS nscr
                                                        WHERE      (i.Guid IN
                                                                                   (SELECT     ResourceGuid
                                                                                     FROM          dbo.Evt_NS_Client_Config_Request AS nscr)) AND
                                                                               (i.ClassGuid LIKE '539626D8-A35A-47EB-8B4A-64D3DA110D01') AND (i.Guid NOT IN
                                                                                   (SELECT DISTINCT _ResourceGuid
                                                                                     FROM          dbo.Inv_AeX_AC_Identification
                                                                                     WHERE      ([OS Type] LIKE '%server%'))) AND (i.Guid IN
                                                                                   (SELECT DISTINCT _ResourceGuid
                                                                                     FROM          dbo.Inv_AeX_AC_Client_Agent
                                                                                     WHERE      ([Agent Name] LIKE 'Altiris Agent')))) AS MachineNames LEFT OUTER JOIN
                                                           (SELECT     ResourceGuid, MAX(_eventTime) AS EventTime
                                                             FROM          dbo.Evt_NS_Client_Config_Request
                                                             GROUP BY ResourceGuid) AS LastConfigReq ON MachineNames.Guid = LastConfigReq.ResourceGuid) AS ConfigRequestTbl ON
                          dbo.vComputer.Guid = ConfigRequestTbl.Guid LEFT OUTER JOIN
                          dbo.Inv_AeX_HW_Memory ON dbo.vComputer.Guid = dbo.Inv_AeX_HW_Memory._ResourceGuid
    WHERE     (ConfigRequestTbl.Name IS NOT NULL)
     



  • 5.  RE: Attached error while trying to run a SQL report in Altiris version 6

    Posted Feb 07, 2011 11:51 PM

    If you toss this into SQL Studio from the SQL server, is your query successful?  If so, how long does it take the query to execute?  It looks a little heavy, and the timeout could be because of performance reasons (inadequate hardware) or structure reasons (heavy query).



  • 6.  RE: Attached error while trying to run a SQL report in Altiris version 6

    Posted Feb 08, 2011 09:44 AM

    Hi McLemon,

     

    Yea it runs perfectly within SQL Studio. I think i'll just use it in SLQ Studio and export the report manually into excel.

     

    Thanks for your help!

    Gary



  • 7.  RE: Attached error while trying to run a SQL report in Altiris version 6

    Posted Feb 08, 2011 11:22 AM

    I also ran it successfully in Studio last night.  I didn't look into what the hiccup might be within Altiris.