|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
sysdiagrams is marked as user tableMy software exports the tables and views of the database catalog and tries to exclude system tables. Therefore it checks the table type. If you click on the menu "Database Diagrams - New Database Diagram" in the "SQL Server Management Studio Express", you'll be ask to create support objects (the table sysdiagrams): "This database does not have one or more of the support objects required to use database diagramming. Do you wish to create them?" You can add tables in a new dialog after answering with yes (or just close the dialog). Afterwards there is the table sysdiagrams under the menu "Tables - System Tables". The sysdiagrams table is marked as user table: select * from sys.tables where name like 'sys%' sysdiagrams 1803153469 NULL 1 0 U USER_TABLE 2006-11-02 17:22:39.550 2006-11-02 17:22:39.583 0 0 0 1 NULL 5 0 1 0 0 0 0 0 0 0 Other system tables are marked as system (i.e. sysallocunits). Is it a bug in the Management Studio ? Microsoft SQL Server Management Studio Express 9.00.2047.00 Microsoft Data Access Components (MDAC) 2000.085.1117.00 (xpsp_sp2_rtm.040803-2158) Microsoft MSXML 2.6 3.0 4.0 5.0 6.0 Microsoft Internet Explorer 7.0.5730.11 Microsoft .NET Framework 2.0.50727.42 Operating System 5.1.2600 Thank you in advance Daniel Daniel,
SSMS is able to distinguish it as a "pseudo system table" due to an extended property added for this purpose, which you could also use. Cheers, Paul Ibison SQL Server MVP, www.replicationanswers.com . To wit, as long as you don't mark any of your own objects with the same
extended properties: SELECT o.* FROM sys.objects o LEFT OUTER JOIN sys.extended_properties ep ON o.[object_id] = ep.major_id AND ep.class_desc = 'OBJECT_OR_COLUMN' AND ep.[name] = 'microsoft_database_tools_support' WHERE o.is_ms_shipped = 0 AND ep.major_id IS NULL; Personally, I think that the diagram objects should be marked as is_ms_shipped = 1, even though they are not installed by default. Show quote "Paul Ibison" <Paul.Ibi***@Pygmalion.Com> wrote in message news:eVlIXsz$GHA.1224@TK2MSFTNGP04.phx.gbl... > Daniel, > SSMS is able to distinguish it as a "pseudo system table" due to an > extended property added for this purpose, which you could also use. > Cheers, > Paul Ibison SQL Server MVP, www.replicationanswers.com . > > Personally, I think that the diagram objects should be marked as is_ms_shipped = 1, even though I agree...> they are not installed by default. -- Show quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "Aaron Bertrand [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message news:%234rzuV3$GHA.3380@TK2MSFTNGP04.phx.gbl... > To wit, as long as you don't mark any of your own objects with the same extended properties: > > > SELECT o.* > FROM sys.objects o > LEFT OUTER JOIN > sys.extended_properties ep > ON o.[object_id] = ep.major_id > AND ep.class_desc = 'OBJECT_OR_COLUMN' > AND ep.[name] = 'microsoft_database_tools_support' > WHERE > o.is_ms_shipped = 0 > AND ep.major_id IS NULL; > > > Personally, I think that the diagram objects should be marked as is_ms_shipped = 1, even though > they are not installed by default. > > > > "Paul Ibison" <Paul.Ibi***@Pygmalion.Com> wrote in message > news:eVlIXsz$GHA.1224@TK2MSFTNGP04.phx.gbl... >> Daniel, >> SSMS is able to distinguish it as a "pseudo system table" due to an extended property added for >> this purpose, which you could also use. >> Cheers, >> Paul Ibison SQL Server MVP, www.replicationanswers.com . >> > > Aaron Bertrand [SQL Server MVP] (ten.xoc@dnartreb.noraa) writes:
> Personally, I think that the diagram objects should be marked as I completely agree with the sentiment. I guess the problem is that Mgmt> is_ms_shipped = 1, even though they are not installed by default. Studio is just another user client without access to secret hooks, and thus it does not have access to that flag. But I think that is a limitation that Microsoft should find a solution for. -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx Sounds like this should be put on connect...
Show quote "Erland Sommarskog" <esq***@sommarskog.se> wrote in message news:Xns9870F023679EFYazorman@127.0.0.1... > Aaron Bertrand [SQL Server MVP] (ten.xoc@dnartreb.noraa) writes: >> Personally, I think that the diagram objects should be marked as >> is_ms_shipped = 1, even though they are not installed by default. > > > I completely agree with the sentiment. I guess the problem is that Mgmt > Studio is just another user client without access to secret hooks, and > thus it does not have access to that flag. > > But I think that is a limitation that Microsoft should find a solution > for. > > > -- > Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se > > Books Online for SQL Server 2005 at > http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx > Books Online for SQL Server 2000 at > http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx Aaron Bertrand [SQL Server MVP] (ten.xoc@dnartreb.noraa) writes:
> Sounds like this should be put on connect... OK.https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=235466 -- Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se Books Online for SQL Server 2005 at http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx Books Online for SQL Server 2000 at http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx |
|||||||||||||||||||||||