Showing posts with label dtproperties. Show all posts
Showing posts with label dtproperties. Show all posts

Friday, February 24, 2012

dtproperties table

I'm trying to get a list of all tables in a given database using:
USE DDMCONFIG
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
I wonder what is the meaning of dtproperties table which figures with the re
st of my tables list?
Thanks for any help
Best regards
ChrisYou can exclude non-user objects by checking the 'IsMSShipped' object
property like the example below. The dtproperties table is used by SQL
Server to store database diagrams.
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND
OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' +
QUOTENAME(TABLE_NAME)
), 'IsMSShipped') = 0
Hope this helps.
Dan Guzman
SQL Server MVP
"Krzysztof Kazmierczak" <krzysztof@.NO_SPAMsmartsolutions.pl> wrote in
message news:358CCDF2-7E2F-4861-846B-199ADA3BEA30@.microsoft.com...
quote:

> I'm trying to get a list of all tables in a given database using:
> USE DDMCONFIG
> SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
> I wonder what is the meaning of dtproperties table which figures with the

rest of my tables list?
quote:

> Thanks for any help
> Best regards
> Chris
|||Dan, thanks a lot for your help ;)
Best regards
Chris|||I'm glad I was able to help.
Dan Guzman
SQL Server MVP
"Krzysztof Kazmierczak" <krzysztof@.NO_SPAMsmartsolutions.pl> wrote in
message news:7AA7FB6B-C3BA-482A-97DE-5F4B9FC27BD4@.microsoft.com...
quote:

> Dan, thanks a lot for your help ;)
> Best regards
> Chris

dtproperties table

I'm trying to get a list of all tables in a given database using:
USE DDMCONFIG
SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
I wonder what is the meaning of dtproperties table which figures with the rest of my tables list?
Thanks for any help
Best regards
ChrisYou can exclude non-user objects by checking the 'IsMSShipped' object
property like the example below. The dtproperties table is used by SQL
Server to store database diagrams.
SELECT TABLE_SCHEMA, TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND
OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' +
QUOTENAME(TABLE_NAME)
), 'IsMSShipped') = 0
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Krzysztof Kazmierczak" <krzysztof@.NO_SPAMsmartsolutions.pl> wrote in
message news:358CCDF2-7E2F-4861-846B-199ADA3BEA30@.microsoft.com...
> I'm trying to get a list of all tables in a given database using:
> USE DDMCONFIG
> SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'
> I wonder what is the meaning of dtproperties table which figures with the
rest of my tables list?
> Thanks for any help
> Best regards
> Chris|||Dan, thanks a lot for your help ;
Best regard
Chris|||I'm glad I was able to help.
--
Dan Guzman
SQL Server MVP
"Krzysztof Kazmierczak" <krzysztof@.NO_SPAMsmartsolutions.pl> wrote in
message news:7AA7FB6B-C3BA-482A-97DE-5F4B9FC27BD4@.microsoft.com...
> Dan, thanks a lot for your help ;)
> Best regards
> Chris

dtproperties system table changed to user table in sysobjects?

Hi Gurus,
I occasionally use some T-SQL to add a column or trigger to all usertables t
ables within a database.
It has always worked before but on one database I am having a problem becaus
e the "dtproperties" system table appears to have been changed to a user tab
le in the "sysobjects" table and is being returned in along with all the use
rtables by:
select [name] from dbo.sysobjects where OBJECTPROPERTY(id, N'IsUserTable') = 1
I can skip that table easily enough, but can anyone tell me why this may ha
ve changed and if I should change it back to a system table, if so how would
I go about that?
Regards,
Pauldtproperties is created when you create a database diagram. It is marked as
a user table by default so I suggest you exclude it by name in your script.
David Portas
SQL Server MVP
--
"Paul B" <paul.bunting@.archsoftnet.com> wrote in message
news:%234h2UcmxFHA.2728@.TK2MSFTNGP14.phx.gbl...
Hi Gurus,
I occasionally use some T-SQL to add a column or trigger to all usertables
tables within a database.
It has always worked before but on one database I am having a problem
because the "dtproperties" system table appears to have been changed to a
user table in the "sysobjects" table and is being returned in along with all
the usertables by:
select [name] from dbo.sysobjects where OBJECTPROPERTY(id,
N'IsUserTable') = 1
I can skip that table easily enough, but can anyone tell me why this may
have changed and if I should change it back to a system table, if so how
would I go about that?
Regards,
Paul|||... or also use IsMsShipped:
select [name]
from dbo.sysobjects
where OBJECTPROPERTY(id, N'IsUserTable') = 1
AND OBJECTPROPERTY(id, N'IsMSShipped') = 0
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:2f2dnarVIKxH5aPenZ2dnUVZ8t2dnZ2d@.gi
ganews.com...
> dtproperties is created when you create a database diagram. It is marked a
s a user table by
> default so I suggest you exclude it by name in your script.
> --
> David Portas
> SQL Server MVP
> --
> "Paul B" <paul.bunting@.archsoftnet.com> wrote in message
> news:%234h2UcmxFHA.2728@.TK2MSFTNGP14.phx.gbl...
> Hi Gurus,
> I occasionally use some T-SQL to add a column or trigger to all usertables
tables within a
> database.
> It has always worked before but on one database I am having a problem beca
use the "dtproperties"
> system table appears to have been changed to a user table in the "sysobjec
ts" table and is being
> returned in along with all the usertables by:
> select [name] from dbo.sysobjects where OBJECTPROPERTY(id, N'IsUserTable'
) = 1
> I can skip that table easily enough, but can anyone tell me why this may
have changed and if I
> should change it back to a system table, if so how would I go about that?
> Regards,
> Paul
>|||Thanks,
Was a bit puzzled as to the fact that it was shown as a system table by
Enterprise Manager and returned as a user table by "where
OBJECTPROPERTY(id, N'IsUserTable') = 1".
David mentioned it is added when you create a database diagram, is this
always the case?... the database I had the error did not have any diagrams
and never has (it was only created a couple of days ago), and a duplicate
database created at the same time returned "dtproperties" as a system table!
I had included an if statment to exclude that table, will probably switch it
to "OBJECTPROPERTY(id, N'IsMSShipped')" as suggested by Tibor... is there
any other tables that could be both system and user at the same time that
this problem may occur with?
Regards,
Paul
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eW7LtgpxFHA.2540@.TK2MSFTNGP09.phx.gbl...
> ... or also use IsMsShipped:
> select [name]
> from dbo.sysobjects
> where OBJECTPROPERTY(id, N'IsUserTable') = 1
> AND OBJECTPROPERTY(id, N'IsMSShipped') = 0
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
> news:2f2dnarVIKxH5aPenZ2dnUVZ8t2dnZ2d@.gi
ganews.com...
>|||EM is hard-wired to show dtproperties as a system table... The table might b
e created by other EM
GUI elements, like the design table dialog etc.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Paul B" <paul.no-email-please.bunting@.archsoftnet.com> wrote in message
news:Oduh6AsxFHA.2848@.TK2MSFTNGP15.phx.gbl...
> Thanks,
> Was a bit puzzled as to the fact that it was shown as a system table by En
terprise Manager and
> returned as a user table by "where OBJECTPROPERTY(id, N'IsUserTable') = 1
".
> David mentioned it is added when you create a database diagram, is this al
ways the case?... the
> database I had the error did not have any diagrams and never has (it was o
nly created a couple of
> days ago), and a duplicate database created at the same time returned "dtp
roperties" as a system
> table!
> I had included an if statment to exclude that table, will probably switch
it to
> "OBJECTPROPERTY(id, N'IsMSShipped')" as suggested by Tibor... is there any
other tables that could
> be both system and user at the same time that this problem may occur with?
> Regards,
> Paul
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:eW7LtgpxFHA.2540@.TK2MSFTNGP09.phx.gbl...
>

dtproperties

what is the significance of dtproperties tables
Giri
Is hold the "extended properties" information. Read about it in Books Online for information about
what "extended properties" is.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:06ba01c49fa6$dc6cc580$a601280a@.phx.gbl...
> what is the significance of dtproperties tables
> Giri
|||Giri,
It is an MS supplied table so although it is shown as a User table, it
in fact isn't. This can bite you if you write scripts that look at the
SystemTable property. A better one to use if you're looking for all
system tables, or all user tables is to use IsMsShipped.
ie.
select * from sysobjects
where objectproperty (id, 'IsMsShipped') = 0
will show you all objects in the current database that MS didn't ship.
(i.e. ones you created). Notice that dtproperties is not here.
However if you run:
select * from sysobjects
where objectproperty (id, 'IsSystemTable') = 0
and name = 'dtproperties'
You get one row back.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
anonymous@.discussions.microsoft.com wrote:
> what is the significance of dtproperties tables
> Giri
|||Thanks Mark..Ofcourse it was killing me on conversion
scripts...I am using information_schema.columns view to
find out some meta info...I had no other option than to
filter out by not in ('dtproperties').
Giri
>--Original Message--
>Giri,
>It is an MS supplied table so although it is shown as a
User table, it
>in fact isn't. This can bite you if you write scripts
that look at the
>SystemTable property. A better one to use if you're
looking for all
>system tables, or all user tables is to use IsMsShipped.
>ie.
>select * from sysobjects
>where objectproperty (id, 'IsMsShipped') = 0
>will show you all objects in the current database that MS
didn't ship.
>(i.e. ones you created). Notice that dtproperties is not
here.
>However if you run:
>select * from sysobjects
>where objectproperty (id, 'IsSystemTable') = 0
>and name = 'dtproperties'
>You get one row back.
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602m.html
>
>anonymous@.discussions.microsoft.com wrote:
>.
>

dtproperties

What is the purpose of the table dtproperties? It is a system table but has
xtype = 'U' in the sysobjects table?
It's not really a system table but it's displayed as such by
Enterprise Manager. The table is used for diagrams you
create through Enterprise Manager.
-Sue
On Thu, 14 Jul 2005 16:15:29 -0700, "docsql"
<docsql@.noemail.nospam> wrote:

>What is the purpose of the table dtproperties? It is a system table but has
>xtype = 'U' in the sysobjects table?
>

dtproperties

What is the purpose of the table dtproperties? It is a system table but has
xtype = 'U' in the sysobjects table?It's not really a system table but it's displayed as such by
Enterprise Manager. The table is used for diagrams you
create through Enterprise Manager.
-Sue
On Thu, 14 Jul 2005 16:15:29 -0700, "docsql"
<docsql@.noemail.nospam> wrote:
>What is the purpose of the table dtproperties? It is a system table but has
>xtype = 'U' in the sysobjects table?
>

dtproperties

what is the significance of dtproperties tables
GiriIs hold the "extended properties" information. Read about it in Books Online for information about
what "extended properties" is.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
<anonymous@.discussions.microsoft.com> wrote in message
news:06ba01c49fa6$dc6cc580$a601280a@.phx.gbl...
> what is the significance of dtproperties tables
> Giri|||Giri,
It is an MS supplied table so although it is shown as a User table, it
in fact isn't. This can bite you if you write scripts that look at the
SystemTable property. A better one to use if you're looking for all
system tables, or all user tables is to use IsMsShipped.
ie.
select * from sysobjects
where objectproperty (id, 'IsMsShipped') = 0
will show you all objects in the current database that MS didn't ship.
(i.e. ones you created). Notice that dtproperties is not here.
However if you run:
select * from sysobjects
where objectproperty (id, 'IsSystemTable') = 0
and name = 'dtproperties'
You get one row back.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
anonymous@.discussions.microsoft.com wrote:
> what is the significance of dtproperties tables
> Giri|||Thanks Mark..Ofcourse it was killing me on conversion
scripts...I am using information_schema.columns view to
find out some meta info...I had no other option than to
filter out by not in ('dtproperties').
Giri
>--Original Message--
>Giri,
>It is an MS supplied table so although it is shown as a
User table, it
>in fact isn't. This can bite you if you write scripts
that look at the
>SystemTable property. A better one to use if you're
looking for all
>system tables, or all user tables is to use IsMsShipped.
>ie.
>select * from sysobjects
>where objectproperty (id, 'IsMsShipped') = 0
>will show you all objects in the current database that MS
didn't ship.
>(i.e. ones you created). Notice that dtproperties is not
here.
>However if you run:
>select * from sysobjects
>where objectproperty (id, 'IsSystemTable') = 0
>and name = 'dtproperties'
>You get one row back.
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602m.html
>
>anonymous@.discussions.microsoft.com wrote:
>> what is the significance of dtproperties tables
>> Giri
>.
>

dtproperties

What is the purpose of the table dtproperties? It is a system table but has
xtype = 'U' in the sysobjects table?It's not really a system table but it's displayed as such by
Enterprise Manager. The table is used for diagrams you
create through Enterprise Manager.
-Sue
On Thu, 14 Jul 2005 16:15:29 -0700, "docsql"
<docsql@.noemail.nospam> wrote:

>What is the purpose of the table dtproperties? It is a system table but ha
s
>xtype = 'U' in the sysobjects table?
>