TRUNCATE TABLE master..sysdatabases

...and other neat SQL Server tricks
posts - 51, comments - 60, trackbacks - 14

September 2010 Blog Posts

Handy SQL Server Function (you may not have known about)

Have you ever scripted a stored procedure? Or dealt with indexed views?  Or wondered why Management Studio says you can't index or alter a table column?  Then you've been bitten by one or more of the the ANSI_NULLS, ANSI_PADDING, or QUOTED_IDENTIFIER settings!  These settings determine how (and sometimes if) SQL Server can process a query, and the wrong settings can cause a terminal error.  Wouldn't it be nice to know what your current settings are? With SQL Server 2005, the sys.dm_exec_sessions DMV can provide nearly all of them.  Since it's documented in Books Online I'll let the reader practice...

posted @ Wednesday, September 22, 2010 12:00 AM | Feedback (1) | Filed Under [ Coolness ]

Powered by:
Powered By Subtext Powered By ASP.NET