Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Nakul Vachhrajani is a Technical Specialist & Systems development professional with iGATE. He holds a MCTS (SQL Server 2008: Implementation & Maintenance)
Browse by Tags · View All
#SQLServer 304
SQL Server 303
Administration 252
DBA 241
T-SQL 234
#TSQL 232
Development 226
Tips 216
Guidance 148
Best Practices 119

Archive · View All
April 2011 14
March 2012 11
December 2011 11
March 2011 11
December 2012 10
October 2011 10
January 2011 10
September 2013 9
January 2013 9
November 2012 9

#0157–SQL Server 2012–Deprecated features-DATABASEPROPERTY replaced by DATABASEPROPERTYEX

May 3 2012 12:00AM by Nakul Vachhrajani   

As I document the the database engine features that have been deprecated  in SQL Server 2012, one of the most important ones has to be the deprecation of DATABASEPROPERTY. I am yet to see a production code that does not use this function.

For those who came in late, DATABASEPROPERTY is a function that returns the named database property value for the specified database and property name. Here’s an example that uses the DATABASEPROPERTY function to see if the ANSI NULLS property is ON or OFF by default (runs on SQL Server 2008/R2).

SELECT DATABASEPROPERTY('AdventureWorks2008','IsAnsiNullDefault') AS IsAnsiNullDefault

/* Result Set
IsAnsiNullDefault
-----------------
0
*/

This function was quite old and did not cover some of the newly introduced properties like the comparison style for a collation. Also, the return type of the current function – DATABASEPROPERTY was an integer, which means that the function could not return a character or other data types.

Microsoft SQL Server 2005 therefore shipped with a new, replacement function – DATABASEPROPERTYEX. While the syntax is the same as the function it replaces, the return types are different. The extended, DATABASEPROPERTYEX now returns a sql_variant and therefore has the capability to return a string. We can therefore do the following which was not possible with the previous function.

SELECT DATABASEPROPERTYEX('AdventureWorks2012','Collation') AS Collation,
       DATABASEPROPERTYEX('AdventureWorks2012','Status') AS Status

/* Result Set
Collation                       Status
------------------------------  -------
SQL_Latin1_General_CP1_CI_AS    ONLINE
*/

I have already started replacing instances of the old DATABASEPROPERTY with DATABASEPROPERTYEX. Have you?

Reference:

Until we meet next time,

Be courteous. Drive responsibly.

Tags: #SQLServer, SQL Server, #TSQL, T-SQL, Development, Tips, Series, DBA, Administration, Best Practices, Denali


Nakul Vachhrajani
4 · 36% · 11606
11
 
0
Lifesaver
 
 
0
Learned
 
0
Incorrect



Submit

2  Comments  

  • Crystal Clear Information !!!! Thanks for sharing Nakul.....

    commented on May 7 2012 12:35AM
    Chirag Prajapati
    197 · 1% · 238
  • You are most welcome, Chirag!

    commented on May 7 2012 12:42PM
    Nakul Vachhrajani
    4 · 36% · 11606

Your Comment


Sign Up or Login to post a comment.

"#0157–SQL Server 2012–Deprecated features-DATABASEPROPERTY replaced by DATABASEPROPERTYEX" rated 5 out of 5 by 11 readers
#0157–SQL Server 2012–Deprecated features-DATABASEPROPERTY replaced by DATABASEPROPERTYEX , 5.0 out of 5 based on 11 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]