c# - How to store meta data in a SQL Server database to differentiate it from other databases? -
i have scenario need show many databases kind of database, done querying see if database has 4 tables:
select case count(*) when 4 'true' else 'false' end sys.tables upper(name) in ('a', 'b', 'c', 'd')
if returns true right db , should show in list. question is, other alternatives there storing sort of meta info access developer, c# decide more (instead of querying every single db) , accurately (someone might add together tables) if right database?
sql server objects have got extended properties associated them purpose. can set extended properties. covered in link http://technet.microsoft.com/en-us/library/ms190243(v=sql.105).aspx.
sp_addextendedproperty @name='isofinteresttome', @value=1
will create extended property of name , value on current database.
c# sql-server database metadata
No comments:
Post a Comment