posted 10/1/2011 4:22:37 AM by Did You Know Did You Know - Views: [1132]
Did you know that apart from system catalogs, you can also use System Functions like DATABASEPROPERTYEX to extract metadata about a database.
For example to find out whether AutoShrink is ON or OFF, you can use the function this way:
SELECT DATABASEPROPERTYEX ('AdventureWorks','IsAutoShrink')
The function takes in the name of the database and the property name: another example; to find out the status of the database, you can use the function this way:
SELECT DATABASEPROPERTYEX ('AdventureWorks','Status')
RegardsDid-You-Know from SQLServerGeeks.com
Did You Know Did You Know (Member since: 7/22/2011 4:47:27 PM)
View Did You Know Did You Know 's profile
Leave a comment