﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by Adam Aspin  / Extracting Extended Properties / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 20 Jun 2013 00:31:34 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Extracting Extended Properties</title><link>http://www.sqlservercentral.com/Forums/Topic1081711-1497-1.aspx</link><description>[quote][b]damian.wise (5/3/2011)[/b][hr]An excellent set of articles.  Does anyone know how to return the extended properties of Database Roles in the same way?Damian[/quote]Apply with:[code="sql"]EXEC sys.sp_addextendedproperty@name=N'name',@value=N'value',@level0type=N'USER',@level0name=N'databaserole'[/code]Query with:[code="sql"]SELECT  *FROM    sys.extended_properties AS xpINNER JOIN sys.database_principals AS dp    ON xp.major_id = dp.principal_id    AND xp.class_desc = 'DATABASE_PRINCIPAL'[/code]</description><pubDate>Tue, 03 May 2011 18:23:10 GMT</pubDate><dc:creator>Cade Roux</dc:creator></item><item><title>RE: Extracting Extended Properties</title><link>http://www.sqlservercentral.com/Forums/Topic1081711-1497-1.aspx</link><description>An excellent set of articles.  Does anyone know how to return the extended properties of Database Roles in the same way?Damian</description><pubDate>Tue, 03 May 2011 16:35:23 GMT</pubDate><dc:creator>damian.wise</dc:creator></item><item><title>RE: Extracting Extended Properties</title><link>http://www.sqlservercentral.com/Forums/Topic1081711-1497-1.aspx</link><description>Excellent article and great material.  Thanks for the template and script too.</description><pubDate>Tue, 22 Mar 2011 10:36:10 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: Extracting Extended Properties</title><link>http://www.sqlservercentral.com/Forums/Topic1081711-1497-1.aspx</link><description>Hi Patrick,Thanks for the feedback, and you are quite right, this is the wrong image. I'll try &amp; correct, but it might be a day or two...All the best,Adam</description><pubDate>Tue, 22 Mar 2011 09:52:20 GMT</pubDate><dc:creator>Adam Aspin</dc:creator></item><item><title>RE: Extracting Extended Properties</title><link>http://www.sqlservercentral.com/Forums/Topic1081711-1497-1.aspx</link><description>Great article/ series! Makes me want to start documenting my databases! :-P (Yea, I'm way behind on that)Your first image depicting the [i]sys.extended_properties[/i] view looks different from mine. I'm running SS2008R2, and my columns match your article description (ie major_id, minor_id, name, value), but your image has column names of PropertyType, SchemaName, TableName, etc). Was that the wrong image, or did you join the [i]sys.extended_properties[/i] view to other system views?Thanks!patrick</description><pubDate>Tue, 22 Mar 2011 09:45:47 GMT</pubDate><dc:creator>Patrick2525</dc:creator></item><item><title>RE: Extracting Extended Properties</title><link>http://www.sqlservercentral.com/Forums/Topic1081711-1497-1.aspx</link><description>Nice one cjs - shows how much you can do with this - and in so many ways - when you try!</description><pubDate>Tue, 22 Mar 2011 07:35:12 GMT</pubDate><dc:creator>Adam Aspin</dc:creator></item><item><title>RE: Extracting Extended Properties</title><link>http://www.sqlservercentral.com/Forums/Topic1081711-1497-1.aspx</link><description>Cool.  The Word template is what I've been looking for.  I built an aspx app to display table columns in a grid, but could not figure out how to get our doc pages in SharePoint to embed that output.For a particular table, I wanted the column attributes as well as the description info, so used something like this:SELECT C.ColumnName, DataType, Length, NullsAllowed, DefaultValue, Description FROM(SELECT COLUMN_NAME AS ColumnName,  DATA_TYPE AS DataType,  CHARACTER_MAXIMUM_LENGTH AS Length,  IS_NULLABLE AS NullsAllowed,  COLUMN_DEFAULT AS DefaultValue  FROM Information_Schema.Columns  WHERE Table_Name = @Table) AS CLEFT OUTER JOIN    (SELECT objname AS ColumnName, value AS Description    FROM fn_listextendedproperty (Default, 'schema', 'dbo', 'table', @Table, 'column', default)    WHERE name = 'MS_Description') AS DON C.ColumnName COLLATE Latin1_General_CI_AS = D.ColumnName</description><pubDate>Tue, 22 Mar 2011 07:28:07 GMT</pubDate><dc:creator>cjs</dc:creator></item><item><title>Extracting Extended Properties</title><link>http://www.sqlservercentral.com/Forums/Topic1081711-1497-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/Metadata/72608/"&gt;Extracting Extended Properties&lt;/A&gt;[/B]</description><pubDate>Mon, 21 Mar 2011 20:08:20 GMT</pubDate><dc:creator>Adam Aspin</dc:creator></item></channel></rss>