Home /

| RSS

Check If A Login Exists In SQL Server 2008

If you are creating a SQL Server login using a script then it is advisable to check if the login you are creating already exists. If you do not do this then SQL Server will throw an error. For example if I execute this statement when a login with name test_user already exists, I will [...]

[ More ] March 2nd, 2009 | No Comments | Posted in Programming |

SQL Server – Get Database Mail Configuration Settings

Database Mail configuration settings can be retrieved using sysmail_help_configure_sp stored procedure. Like other database mail object, this stored procedure also resides in msdb database. Running the stored procedure on my machine gives the following results.

sysmail_help_configure_sp

 

[ More ] February 23rd, 2009 | No Comments | Posted in Programming |

SQL Server 2008 – Get Space Used By a Table

You can easily get information on how much space a table is using by executing sp_spaceused stored procedure. Executing the following query on AdventureWorks database shows me how much space Person.Contact table is using. Information presented is detailed which includes the number of rows, reserved space, index size, space used by data and any unused [...]

[ More ] February 23rd, 2009 | No Comments | Posted in Programming |

T-SQL Return Empty String Instead Of Null

There are times when we want to return empty strings for column(s) which have NULL values. T-SQL makes this easy with ISNULL function. Two parameters for this function are:

The column in question
Replacement value

 
Here is an example query for Customers table in Northwind database. This query will select Region column [...]

[ More ] February 11th, 2009 | No Comments | Posted in Code Snippets |

Get A List Of All OLEDB Providers In SQL Server

SQL Server provides with a stored procedure which can be used to get a list of all OLEDB providers on a machine.
Stored procedure:
xp_enum_oledb_providers
Executing this stored procedure which is in master database with the following statement
EXEC master..xp_enum_oledb_providers

 
gives a list of all available OLEDB providers on my machine.

[ More ] February 11th, 2009 | No Comments | Posted in Code Snippets |

SQL Server 2008 Beta Exam Now Available

As per Beta Exams blog Exam 71-433 TS: Microsoft SQL Server 2008, Database Development is now open to all. you can find more details about it here.

[ More ] September 19th, 2008 | No Comments | Posted in News |

SQL Server 2008 Released

This is so hot of the press. SQL Server 2008 has gone RTM just few hours ago. I am heading over to MSDN Subscribers area for a delightful download.
Technorati Tags: SQL Server

[ More ] August 6th, 2008 | No Comments | Posted in News |
  • Page 2 of 2
  • <
  • 1
  • 2