0

Here is what sp_helpfile says about my current database (recovery model is Simple) in SQL2000:

name                          fileid filename                            size         maxsize    growth      usage

MasterScratchPad_Data     1      C:\SQLDATA\MasterScratchPad_Data.MDF    6041600 KB   Unlimited  5120000 KB  data only
MasterScratchPad_Log      2      C:\SQLDATA\MasterScratchPad_Log.LDF     2111304 KB   Unlimited  10%         log only
MasterScratchPad_X1_Log   3      E:\SQLDATA\MasterScratchPad_X1_Log.LDF  191944 KB    Unlimited  10%         log only

I'm trying to prepare this for a detach then an attach to a sql2008 instance but I don't want to have the 2nd .LDF file (I'd like to have just one file for the log).

I have backed up the database. I have issued: BACKUP LOG MasterScratchPad WITH TRUNCATE_ONLY. I have run multiple DBCC SHRINKFILE commands on both of the LOG files.

How can I accomplish this goal of having just one .LDF? I cannot find anything on how to delete the one with fileid of 3 and/or how to consolidate multiple files into one log file.

4

1 に答える 1

0

REMOVE FILE オプションを指定して ALTER DATABASE コマンドを使用する必要があります。ただし、ファイルは「空でない限り削除できません」。ログファイルを空にする方法が完全にはわかりません。実行した手順で空にならない場合は、データベースをデタッチして再アタッチしてください。 ?

SQL 2000 にアクセスするようになってからしばらく経っているので、それ以上のことはできません。

于 2010-06-03T21:13:09.137 に答える