1. 程式人生 > >sybase 建立裝置 擴大資料庫空間 清空事物日誌

sybase 建立裝置 擴大資料庫空間 清空事物日誌

是不是經常碰到Sybase資料庫空間不夠

或者執行Sql時 提示事務空間不足。

解決方法

1、建立驅動裝置
disk init
name='temp_log2',                                    -------------------命名驅動裝置
physname='c:\sybase\data\temp_log2',      -------------------存放驅動檔案位置
vdevno=6,                                                   -------------------標識在資料庫中唯一 可以使用1-9任意數字
size=409600                                                --------------------設定驅動空間大小

2、給資料庫增加空間
alter database res on temp_log=50            -------------------使用剛才建立的裝置給res資料庫加空間

3、清空事物日誌

dump   transaction   database_name   with   no_log             
dump   transaction   database_name   with   truncate_only        ----建議使用這種 清除不了使用上面那種