Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Using Extended Properties To Keep Everyone Informed Expand / Collapse
Author
Message
Posted Monday, November 29, 2010 10:15 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 1:48 PM
Points: 80, Visits: 521
Comments posted to this topic are about the item Using Extended Properties To Keep Everyone Informed
Post #1027726
Posted Tuesday, November 30, 2010 12:45 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, June 29, 2014 11:44 PM
Points: 131, Visits: 801
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?
Post #1027784
Posted Tuesday, November 30, 2010 6:51 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 23, 2014 1:48 PM
Points: 80, Visits: 521
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.
Post #1027947
Posted Tuesday, November 30, 2010 8:36 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, January 20, 2014 7:34 AM
Points: 3, 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!
Post #1028020
Posted Tuesday, November 30, 2010 9:18 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 12:29 PM
Points: 86, Visits: 549
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.



Post #1028056
Posted Tuesday, November 30, 2010 9:52 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, June 16, 2014 8:47 AM
Points: 120, Visits: 2,441
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.
Post #1028081
Posted Tuesday, November 30, 2010 10:24 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Wednesday, July 16, 2014 12:29 PM
Points: 86, Visits: 549
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.



Post #1028108
Posted Tuesday, November 30, 2010 12:26 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, January 2, 2014 1:49 PM
Points: 5, Visits: 45
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')


Post #1028189
Posted Tuesday, November 30, 2010 2:59 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, January 27, 2014 10:14 AM
Points: 1,322, Visits: 1,091
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
Post #1028306
Posted Tuesday, November 30, 2010 3:39 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 8:17 AM
Points: 21,213, Visits: 14,911
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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1028324
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse