1 頁 (共 1 頁)

[SQL Server]Moving table(s) to a different filegroup in SQL

發表於 : 2009年 5月 21日, 18:47
tim
http://decipherinfosys.wordpress.com/20 ... -sql-2005/

這篇文章很有用, 在於移動資料表於不同的 filegroup 上時, 很方便好用的操作方式. 利用 alter table drop constraint with move to 的語法, 這個很俱實用性.

Re: [SQL Server]Moving table(s) to a different filegroup in

發表於 : 2009年 7月 17日, 15:34
sjstone
請問一下,(在SQL Server 2005中)
如果原來的table沒有clustered Index,那該如何移資料到新的File Group中ㄋ?
先建一個嗎??? :?
還是有其他指令或方法?
謝謝...

Re: [SQL Server]Moving table(s) to a different filegroup in

發表於 : 2009年 7月 17日, 18:42
tim
可以利用 sp_help 先 check 一下該 table 是否有 clustered index, 若沒有的話, 只能用先建一個再做, 不過 table 筆數少, 就直接建新的分好 file group 來放, insert 過去再 sp_rename 即可, 若資料筆數多的話, 建 clustered index 可能會很久, 不過相信你要做 partition table 的狀況下, 肯定是資料筆數很多的情形, 還蠻兩難的.

Re: [SQL Server]Moving table(s) to a different filegroup in

發表於 : 2009年 10月 8日, 23:43
sjstone
請問一下,(因為我不是DBA,所以可能問些蠢問題,請多包涵 :lol: )
在本標題中,搬移大量資料時是否要將資料庫切到某種模式中,因為常會遇到鎖定失敗狀況!
還是???
謝謝。