Description | | Via CR 365309, support was added for RowGuidCol for MS SQL Server 2000.
When reverse engineering via ODBC, the metadata for this object is not reverse engineered. However, they are reversed via script.
Upon inspection of the XDB, this column is not being retrieved as part of the SqlListQuery for the column object.
Customer has provided the following query to reverse engineer these values:
{OWNER, TABLE, S, COLUMN, DTTPCODE, LENGTH, SIZE, PREC, COMPUTE, NOTNULL, IDENTITY, DOMAIN, DEFAULT, ExtIdentitySeedInc, COMMENT, ExtCollation, ExtIdtNotForReplication, ExtDeftConstName, ExtRowGuidCol}
select
u.name,
o.name,
c.colid,
c.name,
case when (s.usertype < 100) then s.name else x.name end,
c.prec,
c.length,
c.scale,
z.text,
case (c.status & 8) when 8 then 'NULL' else 'NOTNULL' end,
case (c.status & 128) when 128 then 'identity' else '' end,
case when (s.usertype < 100) then '' else s.name end,
case (v.text) when '('''')' then '~''''~' else v.text end,
case (c.status& 128) when 128 then
convert(varchar(10), ident_seed(u.name + '.' + o.name))
+ ', '
+ convert(varchar(10), ident_incr(u.name + '.' + o.name))
else '' end,
convert(varchar, p.value),
c.collation,
case (c.colstat & 9) when 9 then 'true' else 'false' end,
case (d.status & 6) when 2 then d.name else '' end,
case (COLUMNPROPERTY ( o.id , c.name , 'IsRowGuidCol')) when 1 then 'true' else 'false' end as ExtRowGuidCol
from
dbo.sysusers u
join dbo.sysobjects o on (o.uid = u.uid and o.type in ('U', 'S', 'V'))
join dbo.syscolumns c on (c.id = o.id)
left outer join dbo.systypes s on (c.usertype = s.usertype and s.xtype = c.xtype and c.usertype >= 0)
left outer join dbo.systypes x on (s.usertype > 100 and s.xtype = x.xtype and x.usertype not in (0, 18, 80) and x.usertype < 100)
left outer join dbo.syscomments z on (z.id = o.id and z.number = c.colid)
left outer join dbo.sysobjects d on (d.id = c.cdefault and d.category <> 0)
left outer join dbo.syscomments v on (v.id = d.id)
left outer join dbo.sysproperties p on (p.id = o.id and p.smallid = c.colid)
where 1 = 1
[ and u.name = %.q:OWNER%]
[ and o.name=%.q:TABLE%]
order by 1, 2, 3
To reproduce:
Generate the following table to the database and then reverse via ODBC:
create table MyUniqueTable (
UniqueColumn UNIQUEIDENTIFIER RowGuidCol null default NEWID(),
Characters VARCHAR(10) null
)
go
1/31/2006
This issue has been resolved in the PowerDesigner/PowerAMC 12.0.0 release. |
|