2016年11月8日 星期二

超過 249 個非叢集索引或資料行統計資料

SQL Server 2000,一個資料表上要建立索引時,出現以下訊息,

不得在一個資料表上建立超過 249 個非叢集索引或資料行統計資料

Cannot create more than 249 nonclustered indices or column statistics on one table.


 先查看索引數,當然不可能有249個,所以查詢了統計資訊。

select 'drop statistics '+object_name(a.id)+'.'+a.name 
   from  sysindexes a inner join .sysindexkeys b
     on a.id = b.id and a.indid = b.indid inner join syscolumns  c
     on b.id = c.id and b.colid = c.colid
  where indexproperty(a.id, a.name, 'IsStatistics') = 1 
    and object_name(a.id) = 'your_table'  


先確認是否已有249個統計值,如果有,就先刪除不要的,再建一次index應該就行了。

IIS 網站無法下載中文檔名檔案因為取消高位元字元

 網址+中文檔案名稱方式下載檔案顯示 404 - 找不到檔案或目錄。 但英數字檔案名稱則可下載。 因為設定GCB IIS,其中1項 將高位元字元預設取消勾選了。 27 TWGCB-04-014-0028 要求篩選與其他限制模組 允許高位元字元 這項原則設定決定查詢...