ShrinkDB/Shrinkfile - SQL2K

  • I've got a DB with a 4MB data file and a 30GB log file; the data file is in the primary filegroup, and the log file is in a null filegroup. (No, I have no idea how this happened.) I've done a shrinkdatabase (truncateonly), and tried a shrinkfile but SQL says "Could not locate file 'forumstest_Log' in sysfiles." What I want to do is move this database to another SQL2K server, obviously without the 30GB log file. Any suggestions?

    TIA,

    Al

  • Check out the Books OnLine (BOL) for backing up a log with truncate only. I believe the syntax is:

    BACKUP LOG <database_name> TO <device_name> WITH TRUNCATE ONLY

    That will truncate your log, then you shrink the log.

    -SQLBill

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply