<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Adam Machanic : metadata</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/tags/metadata/default.aspx</link><description>Tags: metadata</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Connect Item: Globally-Scoped Metadata Views</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2009/04/16/connect-item-globally-scoped-metadata-views.aspx</link><pubDate>Thu, 16 Apr 2009 15:09:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:13328</guid><dc:creator>Adam Machanic</dc:creator><slash:comments>4</slash:comments><comments>http://www2.sqlblog.com/blogs/adam_machanic/comments/13328.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/adam_machanic/commentrss.aspx?PostID=13328</wfw:commentRss><description>&lt;p&gt;Ever tried writing a more or less database-agnostic administrative script?&lt;br&gt;&lt;/p&gt;&lt;p&gt;If the experience didn't make your head spin, you either have a stronger constitution than most DBAs or your script doesn't actually work properly. The fact is, due to the way most of the metadata views are currently scoped in SQL Server, pulling data from multiple databases requires a rather annoying set of techniques, usually involving temporary tables, dynamic SQL, and cursors. For a real-world example, just take a look at &lt;a href="http://sqlblog.com/blogs/adam_machanic/archive/2009/03/30/who-is-active-v8-40-now-with-delta-power.aspx"&gt;my Who is Active? script&lt;/a&gt;.&lt;br&gt;&lt;/p&gt;&lt;p&gt;This could all be so much easier if the product simply exposed global views, available from anywhere, and keyed with a database_id column. The views could be internally partitioned to ensure great performance if you only need data from a single database, yet still flexible enough to provide data across the entire server. I think this feature would make the overall administrative experience much nicer, so I've created a Connect item, and I hope that you will vote for it (5, of course!):&lt;/p&gt;&lt;p&gt;&lt;a href="http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=432689"&gt;http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=432689&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Thanks for your support! &lt;br&gt;&lt;/p&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=13328" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/adam_machanic/archive/tags/metadata/default.aspx">metadata</category></item></channel></rss>