Browse by Tags

  • M@d Skillz - Introducing a new degree of difficulty

    I've been getting some positive feed back on how much detail I've been putting into my posts and how appreciative people are that I include the full explainations for those people who don't know a thing about the topic, or don't know enough about it. But I've also been getting some...
    Posted to Number2 Blog - (Weblog) by jnelson on 11-19-2007
    Filed under: SQL, SCCM, SMS, SCOM, shell scripting, Winbatch, batch scripting, powershell, scripting, vbscript
  • SQL Oddity - OUTER JOINs with criteria act like INNER JOIN

    SYMPTOMS You have a query with an OUTER JOIN (aka LEFT JOIN, RIGHT JOIN, LEFT OUTER JOIN, RIGHT OUTER JOIN), and you need to put filter criteria on the table or view that is outer joined. But when you do that, the query acts like an inner join. Consider the following query: It's designed to show...
    Posted to Number2 Blog - (Weblog) by jnelson on 11-16-2007
    Filed under: SQL, SMS, SMS 2003, sql 2005, v_GS_SoftwareFile, right outer join, inner join, right join, join, v_FullCollectionMembership, left outer join, outer join, V_R_System, left join
  • SQL Performance - Indexes and the LIKE clause

    INDEXES AND THE LIKE CLAUSE Often times, people will make the generalization that when you have LIKE in your WHERE clause it won't use indexes. The real answer is a little more complicated than that, and I think it's important to understand SQL's behavior so you can make good decisions with...
    Posted to Number2 Blog - (Weblog) by jnelson on 11-16-2007
    Filed under: SQL, SMS, table scan, clustered index seek, SMS 2003, index, sql 2005, LIKE, web reports, clustered index scan, index scan, wildcard, index seek
  • SMS Web Report - Outlook machine counts by version (Plus a trick to order by version PROPERLY)

    RECOMMENDED READING First of all, you should read this article I wrote entitled " How to get the CORRECT order when sorting on version numbers like xx.xx.xx.xx " That article lays out a good explaination of the V_ProductFileInfo view, the CAST(dbo.udf_ItemExtract()) stuff, and information on...
    Posted to Number2 Blog - (Weblog) by jnelson on 11-15-2007
    Filed under: SQL, SMS, SMS 2003, Microsoft Systems Management Server, web report, webreport, outlook, v_ProductFileInfo, BIGINT, CAST, itemExtract, sql 2005, v_GS_SoftwareFile, v_GS_SoftwareProduct, GROUP BY, DISTINCT
  • SQL Performance Tips - Avoid putting indexed columns inside functions in your WHERE clause

    THE PROBLEM When designing a query, it is incredibly important for performance reasons that you keep in mind what columns are indexed. The SQL engine will use those indexes to quickly lookup the data you're requesting and return it faster with much less disk and memory overhead. But equally important...
    Posted to Number2 Blog - (Weblog) by jnelson on 10-23-2007
    Filed under: SQL, SMS, Query Performance, execution plan, SMS 2003, index, functions
  • Track table growth (or shrinkage) with a SQL job, a table and a multistatement table-valued user defined function

    THE PROBLEM Sometimes your SMS infrastructure seems to be swimming right along and everything is going right and then something you didn't think too much about happens. You start getting alerts that the disks are full or the backups are failing because of low disk space and you're wondering what...
    Posted to Number2 Blog - (Weblog) by jnelson on 10-12-2007
    Filed under: SQL, execution plan, table scan, Table size, coalesce, multistatement table-valued function, clustered index seek, UDF, user defined functions, table variable, inline function
  • SMS/SCCM Query Performance Tips - Addressing objects with the schema name (.dbo)

    A commonly overlooked little performance tip in SQL is addressing your objects (like tables, views, functions, procedures, etc.) using the schema (aka, the owner) name in front of the object. For example, usually people will write a simple SMS query like this: SELECT sys.resourceID , sys.name0 FROM v_R_System...
    Posted to Number2 Blog - (Weblog) by jnelson on 10-09-2007
    Filed under: SQL, SCCM, SMS, Query Performance, Schema
  • sms query/report for spyware?

    This question seems to pop up on the list quite frequently, so to save time, here it is. It was originally posted to the list by Mark Mears, so credit goes to him, attached is the sql and sample of what results you may get again from Mark Mears SQL select all RSYS.Name0 AS 'Computer', RSYS.User_Name0...
    Posted to Rickym61 @ (Weblog) by Rickym61 on 08-25-2008
    Filed under: sms, sql, spyware
  • SQL/WQL Tip - How to escape special SQL/WQL wildcard characters like % _

    THE PROBLEM You've written a SQL query or a WQL query (like an SMS/CM collection query) and you need to look for a string that has a percent % or underscore _ in it. The problem is, those characters are special wildcard characters to SQL/WQL. So how do you "escape" those characters and...
    Posted to Number2 Blog - (Weblog) by jnelson on 08-27-2008
    Filed under: SQL, wildcard, WQL, escape characters
  • PCs with the no logon information for 30 days

    SELECT distinct CS.Name0 AS 'Computer', isnull(CS.UserName0,HCS.UserName0) AS 'User Name' , CS.TimeStamp FROM v_GS_COMPUTER_SYSTEM CS Left outer join v_HS_COMPUTER_SYSTEM HCS on CS.ResourceID = HCS.ResourceID WHERE HCS.UserName0 is not NULL and datediff(dd,CS.TimeStamp,getdate()) >...
    Posted to Garth's Blog (Weblog) by Anonymous on 08-27-2008
    Filed under: ConfigMGr, SMS, Code, SQL
Page 4 of 40 (398 items) « First ... < Previous 2 3 4 5 6 Next > ... Last »
Copyright -, Inc. - 2010 All Rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems