Discussion:
Create index statement - wrong sequence for index options
(too old to reply)
WaraBurna
2010-07-13 16:05:44 UTC
Permalink
Hi,

I am defining an index on Powerdesigner 12.5.0.2169 for a sqlserver
2005 db specifying index options statistics_norecompute = on

The resulting generated script looks like:
create clustered index INDEX_NAME on dbo.TABLE_NAME (
Col1 ASC,
Col2 ASC,
Col3 ASC
)
on PARTITION_SCHEME (Col3)
with (statistics_norecompute= on)
go


the "with" Option should be before the "on".

when I check the dbms property file sqlsv2k5.xdb, the index options
template looks fine to me:
INDEX OPTIONS
with : composite=yes, separator=yes, parenthesis=yes, chldmand=yes
{
pad_index=%s : list=on|off
fillfactor=%d : default=10
sort_in_tempdb=%s : list=on|off
ignore_dup_key=%s : list=on|off
statistics_norecompute=%s : list=on|off
drop_existing=%s : list=on|off
online=%s : list=on|off
allow_row_locks=%s : list=on|off
allow_page_locks=%s : list=on|off
maxdop=%s
}
on : composite=yes
{
<partition scheme> %s : composite=yes, parenthesis=yes,
chldmand=yes
{
<column> %s
}
<filegroup> %s : category=storage, default=DEFAULT
}


Same for INDEX CREATE:
[%Type%=FULLTEXT?create fulltext index on [%TABLQUALIFIER%]%TABLE%
(%CIDXLIST%)
key index %INDEX%[%FullTextCatalog%?
on %FullTextCatalog.GeneratedName%][%ChangeTracking%?
with change_tracking = %ChangeTracking%]:create [%Type%=XML?
[%XMLPrimary%?primary ]xml :[%UNIQUE% ][%CLUSTER%?clustered :[%R%?
[nonclustered ]]]]index %INDEX% on [%TABLQUALIFIER%]%TABLE% (
%CIDXLIST%
)
[%Type%=XML?[%XMLPrimary%?:[%PrimaryXMLIndex%?using xml index
%PrimaryXMLIndex.GeneratedName%[ for %SecondaryXMLIndexType%]
]]:[%CLUSTER%?:[%IncludedColumns%?include (%IncludedColumns%)
]]][%OPTIONS%]]


Does anybody know a workaround? Thanks for the help.
Mark Brady
2010-07-16 18:00:29 UTC
Permalink
Post by WaraBurna
Hi,
I am defining an index on Powerdesigner 12.5.0.2169 for a sqlserver
2005 db specifying index options statistics_norecompute = on
create clustered index INDEX_NAME on dbo.TABLE_NAME (
Col1 ASC,
Col2 ASC,
Col3 ASC
)
on PARTITION_SCHEME (Col3)
with (statistics_norecompute= on)
go
the "with" Option should be before the "on".
when I check the dbms property file sqlsv2k5.xdb, the index options
INDEX OPTIONS
with : composite=yes, separator=yes, parenthesis=yes, chldmand=yes
{
pad_index=%s : list=on|off
fillfactor=%d : default=10
sort_in_tempdb=%s : list=on|off
ignore_dup_key=%s : list=on|off
statistics_norecompute=%s : list=on|off
drop_existing=%s : list=on|off
online=%s : list=on|off
allow_row_locks=%s : list=on|off
allow_page_locks=%s : list=on|off
maxdop=%s}
on  : composite=yes
{
   <partition scheme> %s : composite=yes, parenthesis=yes,
chldmand=yes
   {
      <column> %s
   }
   <filegroup> %s : category=storage, default=DEFAULT
}
[%Type%=FULLTEXT?create fulltext index on [%TABLQUALIFIER%]%TABLE%
(%CIDXLIST%)
   key index %INDEX%[%FullTextCatalog%?
      on %FullTextCatalog.GeneratedName%][%ChangeTracking%?
   with change_tracking = %ChangeTracking%]:create [%Type%=XML?
[%XMLPrimary%?primary ]xml :[%UNIQUE% ][%CLUSTER%?clustered :[%R%?
[nonclustered ]]]]index %INDEX% on [%TABLQUALIFIER%]%TABLE% (
%CIDXLIST%
)
[%Type%=XML?[%XMLPrimary%?:[%PrimaryXMLIndex%?using xml index
%PrimaryXMLIndex.GeneratedName%[ for %SecondaryXMLIndexType%]
]]:[%CLUSTER%?:[%IncludedColumns%?include (%IncludedColumns%)
]]][%OPTIONS%]]
Does anybody know a workaround? Thanks for the help.
Is your SQL Server in a compatibility mode for a previous version?
Loading...