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.
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%'