How to retrieve size information for all the tables in a SQL Server Database

In an older post, I described how you could rebuild all the indexes of a database in SQL Server by making use of the undocumented stored procedure “sp_MSforeachtable”. Another common task is when you want to retrieve size information for all the tables in a database. Again, by using “sp_MSforeachtable“, you can easily do that … Read more…

Retrieving Only the Date from a Datetime Value in SQL Server

This article discusses about retrieving only the date from a datetime value in SQL Server. There are many times where you might need to only retrieve the date from a datetime value. For example, you may have today’s datetime (2011-10-10 20:30:28.230) and you want to only get the following value: 2011-10-10. In SQL Server 2008 … Read more…

Sequence Objects in SQL Server

SQL Server “Denali” among other introduces Sequence Objects. I am sure that sequence objects are widely known but let’s provide their definition in plain words: A sequence object allows you to set a global counter of values within the scope of a DBMS instance. Whenever you call the sequence object it returns a unique value … Read more…

Executing Heavy Set-Based Operations Against VLDBs in SQL Server

In this article, we will discuss about executing heavy set-based operations against Very Large Datatabases (VLDBs) in SQL Server.   Introduction Recently I had to design and execute some heavy set-based T-SQL operations against a large number of very large databases (VLDBs) within a SQL Server instance. I won’t enter the debate of Row-Based vs. … Read more…

Using Unicode in SQL Server

In this article, we will be discussing about using Unicode in SQL Server.   Introduction Unicode is the standard used in the computing industry for encoding and representing any text in the most written languages (…). SQL Server supports Unicode, thus allowing the easy storage and manipulation of data in the most languages.   Example … Read more…