Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL server info- extended properties
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

4 Posts

Posted - 04/22/2013 :  03:12:00  Show Profile  Reply with Quote
Lets say i have 3 databases of type Device(might be three different versions),which will have different names like (Device1, Device2, Device3). Now i want to query and get all databases of type Device, which should return these 3 dbs. How do i do it ?

I thought of adding it as a extended property. By adding name = type, and value= "Device" and querying this back?

Whats the best mechanism to do it? and if possible can someone give the query too.


Aged Yak Warrior

737 Posts

Posted - 04/22/2013 :  03:25:48  Show Profile  Send ahmeds08 a Yahoo! Message  Reply with Quote
Why do you want to go for extended properties?
If it just for naming a database,
Usually lot of us use the naming convention
for eg:if we have three warehouses,we name them as databasename_DW1,databasename_DW2 etc...
so that anytime you want to query all the warehouse you can just use the query like:
select name from sys.databases where name like '%DW%'
Go to Top of Page

Starting Member

4 Posts

Posted - 04/22/2013 :  03:41:51  Show Profile  Reply with Quote
hmm.. but i don't want to restrict them in naming.. Usually we keep different name for different sites. So if we are considering that scenario what is better ?
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000