THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » metadata   (RSS)
Showing page 1 of 4 (38 total posts)
  • Geek City: How old are my statistics?

    This post is basically to answer a question asked in class this week: How can we get the last statistics update date for ALL user tables in a database? After working on the query for a while, I realized that the new metadata function I posted about here can give you that info easily: SELECT object_name(sp.object_id) as object_name,name as ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on August 31, 2013
  • Geek City: sp_cacheobjects for SQL Server 2012

    In a post about 4 1/2 years ago, I gave you my version of a replacement for the old pre-2005 pseudotable syscacheobjects. I called it sp_cacheobjects and created it as a view in the master database. With the sp_ prefix, the view can be accessed from any database. When testing this on SQL Server 2012, I noticed that I almost always got a lot more ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on July 31, 2013
  • Did You Know? Turning Off Locking

    Back when the lock manager was rewritten for SQL Server 7, and row level locking was added to the product, the procedure sp_indexoption gave us the ability to turn OFF either row or page locks or both, for one particular index, or for a table and all the indexes on it. I must admit, I rarely found this option to be the solution to any sticky ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on May 7, 2012
  • SQL Server 2012 : Changes to system objects in RC0

    As with every new major milestone, one of the first things I do is check out what has changed under the covers. Since RC0 was released yesterday, I've been poking around at some of the DMV and other system changes. Here is what I have noticed: New objects in RC0 that weren't in CTP3Quick summary: We see a bunch of new aggregates for use with ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on November 18, 2011
  • Determining distribution of NULL values

    Today on the twitter hash tag #sqlhelp, @leenux_tux asked: How can I figure out the percentage of fields that don't have data ? After further clarification, it turns out he is after what proportion of columns are NULL. Some folks suggested using a data profiling task in SSIS. There may be some validity to that, but I'm still ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on November 17, 2011
  • T-SQL Tuesday #24 : Dude, where's the rest of my procedure?

    This month's T-SQL Tuesday is being hosted by Brad Schulz (blog) and the topic is one that should attract a lot of submissions: Procedures and Functions. Last week, I talked about the case against INFORMATION_SCHEMA views - I provided several examples where I feel the INFORMATION_SCHEMA views fall short of the catalog views, and expressed my ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on November 8, 2011
  • The case against INFORMATION_SCHEMA views

    In SQL Server 2000, INFORMATION_SCHEMA was the way I derived all of my metadata information - table names, procedure names, column names and data types, relationships... the list goes on and on. I used the system tables like sysindexes from time to time, but I tried to stay away from them when I could. In SQL Server 2005, this all changed with ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on November 3, 2011
  • Finding keyless tables across multiple servers

    Christina Leo (@christinaleo) asked this question on twitter today: So, if I ever needed a POSH script, today is the day. Having to inventory all prod databases to find tables missing primary keys.I have a query that returns what I need, but I need a report for each of 60+ databases across 3 servers I haven't joined the ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on October 20, 2011
  • A handy search procedure

    I often see questions about searching stored procedures, functions, etc. for specific keywords. Maybe it's an object reference they're looking for, or all of the places where they use built-in functions like GETDATE() (I once had to replace all of these with GETUTCDATE() to cater to servers where we couldn't control the time zone settings). Many ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on October 6, 2011
  • sys.sp_hexadecimal : A Quasi-System Object?

    In KB #918992 and KB #246133, which describe how to transfer logins between instances, Microsoft recommends creating a user procedure in master called sp_hexadecimal (with no schema prefix, tsk tsk). Since I know there have been a lot of people who have created this procedure in SQL Server 2008 R2 and Denali, in spite of the fact that the articles ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on August 6, 2011
1 2 3 4 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement