2008年6月27日 星期五

該不該動MOSS 資料庫的設定??

在做MOSS的開發時,其實很多開發人員常常想直接對資料庫下手,但是微軟是不建議這麼做的,找資料時剛好找到此篇KB,特此紀錄一下。

 

我之前也有過慘痛的經驗,在SPS2003的資料庫上掛上Trigger,結果行事曆檢視就出現問題了,資料顯示部完全,其實很難說到底是我上了trigger造成不正常還是這是系統bug只是剛好這個時間點發作??

 

所以強烈建議,若真的需要對資料庫作修改及設定,強烈建議在修改前將資料庫完整備份一份起來,在做修改,並詳細紀錄所有修改的內容,因為未來在上 Hofix 或是 ServicePack 時,更新可能會完全覆蓋掉你原有的設定,需要重新設定一次。

不建議對資料庫做的設定:

Unless Microsoft protocol documentation is followed precisely, Microsoft cannot reliably predict the effect to the typical operation of these products when parties other than Microsoft support change the database or run stored procedures.

Support for changes to the databases that are used by Office server products and by Windows SharePoint Services

下面動作都是微軟不建議對資料庫做的動作:

  • Adding database triggers
  • Adding new indexes or changing existing indexes within tables
  • Adding, changing, or deleting any primary or foreign key relationships
  • Changing or deleting existing stored procedures
  • Adding new stored procedures
  • Adding, changing, or deleting any data in any table of any of the databases for the products that are listed in the "Applies to" section unless Microsoft protocol documentation is followed exactly
  • Adding, changing, or deleting any columns in any table of any of the databases for the products that are listed in the "Applies to" section
  • Making any modification to the database schema
  • Adding tables to any of the databases for the products that are listed in the "Applies to" section

 

可以對資料庫做的設定:

if you use the Maintenance Plan Wizard to perform the tasks that are listed in the table as "safe to perform," you are likely to experience increased performance in SQL Server 2005.

所以如果你的資料庫環境為SQL 2005 SP2以上的環境,可以定期對資料庫作「維護計畫精靈」,以提高資料庫效能。

Information about the Maintenance Plan Wizard in SQL Server 2005 and about tasks that administrators can perform against SharePoint databases

  • Check database integrity
  • Reduce a database
  • Reorganize an index
  • Clean up the history
  • Update statistics(其實MOSS Timer已經有排程了,不需額外設定)
  • Rebuild an index(此動作需要在SQL 2005 sp2的環境上執行才會沒問題,請注意)

沒有留言: