THE SQL Server Blog Spot on the Web

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

Browse by Tags

All Tags » metadata   (RSS)
Showing page 2 of 4 (34 total posts)
  • 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
  • Using the catalog views : clearing out a "botched" schema

    A user on StackOverflow had populated a custom schema with a bunch of tables, and needed to replace them with a new set of tables due to various changes. But he couldn't just drop them all in any arbitrary order, because there were foreign keys in place. His workaround was to just run a ''drop all tables'' script multiple times until there were no ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on July 7, 2011
  • Geek City: Plan Caching Internals

    This Friday is the last of my summer seminars. On August 27, I am presenting on plan caching, plan reuse and recompile and plan cache metadata. This is one of my favorite topics to talk about, because a lot of the information is not very widely known, and you can have a tremendous performance impact by making sure when plans are reused when that ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on August 23, 2010
  • Geek City: My Big Fat Partitioning Query

    When SQL Server first introduced table and index partitioning in SQL 2005, it was the same version that all the metadata changed. So I decided that I could learn a lot about metadata and a lot about the organization and storage of partitions if I tried to write a query, and then a view, that included almost everything anyone would ever need to ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on July 26, 2010
  • Connect Digest : 2010-01-22

    Give us easier to read execution plansMichelle Ufford (@SQLFool) recently asked for help pinpointing the most expensive node(s) in a complicated execution plan.  Mladen Prajdic (@MladenPrajdic) has a useful workaround; he coded up a quick query to parse the showplan XML and order results by cost descending.  The Connect item that would ...
    Posted to Aaron Bertrand (Weblog) by AaronBertrand on January 22, 2010
  • Geek City: Exploring the Transaction Log Structure

    As I mentioned last October, my PASS preconference seminar was a whole day about the transaction log. I told the attendees all kinds of things about the structure of the log, and told them about one of the best tools for exploring the structure: the command DBCC LOGINFO. This command is officially undocumented, but numerous bloggers have discussed ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on December 21, 2009
  • Geek City: How Many Rows?

    In my last post, I told you I'd post something technical before I left for Sweden. I almost made it. I wrote this in the Seattle airport, but wasn't able to post it until I got to Stockholm. For as long as I've been working with SQL Server, I've been hearing/reading questions about how to quickly get a count of the number of rows in a table. ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on December 7, 2009
  • Geek City: What do you intend with that lock?

    Way back in the olden days, prior to SQL Server 7, I already knew that the lock manager was one of the most complex and resource intensive parts of SQL Server. Keeping track of every lock held, who was waiting for that lock, who could be granted the lock, and who was next in line for the data if the lock was released was a lot for SQL Server to ...
    Posted to Kalen Delaney (Weblog) by Kalen Delaney on September 11, 2009
Privacy Statement