|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 7:12 AM
Points: 77,
Visits: 426
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, May 10, 2013 3:55 AM
Points: 126,
Visits: 751
|
|
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?
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Yesterday @ 7:12 AM
Points: 77,
Visits: 426
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, December 06, 2010 9:30 AM
Points: 3,
Visits: 8
|
|
| 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!
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: 2 days ago @ 11:56 AM
Points: 84,
Visits: 480
|
|
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.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 103,
Visits: 2,396
|
|
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.
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: 2 days ago @ 11:56 AM
Points: 84,
Visits: 480
|
|
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.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, May 20, 2013 11:50 AM
Points: 5,
Visits: 40
|
|
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')
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 2:52 PM
Points: 1,322,
Visits: 1,071
|
|
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
|
|
|
|
|
SSCoach
         
Group: General Forum Members
Last Login: Today @ 10:25 AM
Points: 18,754,
Visits: 12,337
|
|
|
|
|