SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Using Extended Properties To Keep Everyone Informed


Using Extended Properties To Keep Everyone Informed

Author
Message
Eric B-295769
Eric B-295769
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 Visits: 574
Comments posted to this topic are about the item Using Extended Properties To Keep Everyone Informed
liebesiech
liebesiech
Mr or Mrs. 500
Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)

Group: General Forum Members
Points: 580 Visits: 863
Thanks for the article!

There is a small typo in the following query

SELECT a.[name] AS 'Logical Name',
, a.[server_name] AS 'Server Name'
, b.[name] AS 'Group Name'
, a.[description]
FROM [msdb].[dbo].[sysmanagement_shared_registered_servers] a
JOIN [msdb].[dbo].[sysmanagement_shared_server_groups] b
ON a.[server_group_id] = b.[server_group_id]
ORDER BY b.[name] ASC, a.[server_name] ASC



The comma at the end of SELECT a.[name] AS 'Logical Name', is too much. :-)
Question: This is for SQL Server 2008 and newer only?
Eric B-295769
Eric B-295769
SSC-Enthusiastic
SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)SSC-Enthusiastic (112 reputation)

Group: General Forum Members
Points: 112 Visits: 574
Thanks for catching the typo... when I figure out how to correct it I will!

As far as what version: CMS is a SQL Server 2008+ feature, although you can use it to "manage" 2000+. Extended properties were actually introduced in 2000 I believe, but this article is aimed at 2005+, no guarantee any of the statements will work with 2000.
Louise Mitchell
Louise Mitchell
Grasshopper
Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)Grasshopper (11 reputation)

Group: General Forum Members
Points: 11 Visits: 9
Well, it's another list to keep track of, but at least it's centralized. It can get out of date, but so can everything else. It's nice that it links stakeholders directly to the think they are a stakeholder of!
boumerlin
boumerlin
SSC-Addicted
SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)

Group: General Forum Members
Points: 423 Visits: 680
In lieu of using extended properties, I've done something similar with a table that maps 1-1 to the sysmanagment_shared_registered_servers, creating a central repository for all the server meta-data.

We're still in the same predicament as you with many undocumented servers and many stakeholders, but it is getting better as a result of CMS. We're also spitting out a dynamic Sharepoint spreadsheet from the data for those more comfortable working from Excel, as well as a weekly spreadsheet to be used as a backup in the event of the CMS server failing.

I am toying with the idea of extended properties on the individual databases, but frankly we're just not that far along yet.

Also, I have grouped our servers by edition in CMS, as many of our scripts used in multi-instance queries do not work with SQL 2000, as I'm sure you have discovered.



Mark Starr
Mark Starr
Mr or Mrs. 500
Mr or Mrs. 500 (515 reputation)Mr or Mrs. 500 (515 reputation)Mr or Mrs. 500 (515 reputation)Mr or Mrs. 500 (515 reputation)Mr or Mrs. 500 (515 reputation)Mr or Mrs. 500 (515 reputation)Mr or Mrs. 500 (515 reputation)Mr or Mrs. 500 (515 reputation)

Group: General Forum Members
Points: 515 Visits: 2571
Hello,
My foray into extended properties at the database-level (SQL2005) was stopped short when I found that only users with elevated rights, such as Control or View Definition, could read them. Has this changed with SQL 2008?
Mark

Mark
Just a cog in the wheel.
boumerlin
boumerlin
SSC-Addicted
SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)SSC-Addicted (423 reputation)

Group: General Forum Members
Points: 423 Visits: 680
You know, I really don't know about the permission level for adding/reading the properties. As I mentioned in my post, it is still just an idea I'm toying with. I suppose if security was an issue, it could be addressed by a role allowing users the rights they need for extended properties, and then adding those users or groups to the role.

We have so many other issues to tackle it just hasn't been high priority and there is also a push to get some sort of third-party tool in here for capturing meta data. I believe many of the third-party tools use extended properties as well, so I've been holding off to see where that goes.



Paxman
Paxman
SSC Rookie
SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)SSC Rookie (29 reputation)

Group: General Forum Members
Points: 29 Visits: 48
Here is a view that I add to my databases that I use to create a column level data dictionary. I think I will incorporate the ideas from this article into it.

CREATE VIEW [dbo].[DataDictonary]  AS 
SELECT schemas.name AS SchemaName
,all_objects.name AS TableName
,syscolumns.id AS ColumnId
,syscolumns.name AS ColumnName
,systypes.name AS DataType
,syscolumns.length AS CharacterMaximumLength
,sysproperties.[value] AS ColumnDescription
,syscomments.TEXT AS ColumnDefault
,syscolumns.isnullable AS IsNullable
FROM syscolumns
INNER JOIN sys.systypes ON syscolumns.xtype = systypes.xtype
LEFT JOIN sys.all_objects ON syscolumns.id = all_objects.[object_id]
LEFT OUTER JOIN sys.extended_properties AS sysproperties ON (sysproperties.minor_id = syscolumns.colid AND sysproperties.major_id = syscolumns.id)
LEFT OUTER JOIN sys.syscomments ON syscolumns.cdefault = syscomments.id
LEFT OUTER JOIN sys.schemas ON schemas.[schema_id] = all_objects.[schema_id]
WHERE syscolumns.id IN (SELECT id
FROM sysobjects
WHERE xtype = 'U')
AND (systypes.name <> 'sysname')



James Goodwin
James Goodwin
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1667 Visits: 1107
I'm uncomfortable with this solution. It seems to be a bit too esoteric/arcane for my tastes. My solution is to have a couple of small tables that handle the information and then a front end on the company intranet to handle data entry, updating status, sending email, etc.

It seems to me that extended properties are too hidden and too easily lost to make for a good repository for this data. Even if you have documented how and why and where, the next person in your position has to find that documentation and unravel it. If you put this data in a database that is visible from the console it becomes very easy for the next person to find.

Also, extended properties seem quite limited as you show by having to store a list instead of scalar values. You wouldn't want to do this with data under normal circumstances, so why now?
--
JimFive
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)SSC Guru (66K reputation)

Group: General Forum Members
Points: 66663 Visits: 18570
Thanks for the article. This gives a nice option for one to use for self documenting a database.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search