Feeds:
Posts
Comments

Archive for the ‘SQL System Table’ Category

Earlier I blogged about SQL SERVER – What Kind of Lock WITH (NOLOCK) Hint Takes on Object?. After reading the post, I got question by one of the blog reader. “Hi Pinal, I see in your blog post you have Database ID which is 32767. Everytime I want to get the name of the database from [...]

Read Full Post »

I used to run the following script to generate random large results. However, when I ran this on Denali I noticed a very interesting behavior: SELECT o1.OBJECT_ID,o1.name, o2.OBJECT_ID, o2.name FROM sys.all_objects o1 CROSS JOIN sys.all_objects o2 I noticed lots of negative object_ID’s on Denali, whereas my experience on SQL Server 2008 R2 as well as [...]

Read Full Post »

I have seen people running the following script quite often, to know the list of the tables from the database: SELECT * FROM sys.tables GO The script above provides various information from create date to file stream, and many other important information. If you need all those information, that script is the one for you. [...]

Read Full Post »

In one of my recent Performance Tuning assignment I was asked how do someone know how many transactions are happening on server during certain interval. I had handy script for the same. Following script displays transactions happened on server at the interval of one minute. You can change the WAITFOR DELAY to any other interval [...]

Read Full Post »

I was recently looking for syntax where I needed a query running in any particular session. I always remembered the syntax and ha d actually written it down before, but somehow it was not coming to mind quickly this time. I searched online and I ended up on my own article written last year SQL [...]

Read Full Post »

Older Posts »

Follow

Get every new post delivered to your Inbox.

Join 15,916 other followers