Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2009
    Posts
    1

    Unanswered: Error 9003: The LSN passed to log scan in database is invalid

    Situation:
    W2003 SERVER
    SQL server 2000 SP4
    Databasefiles *.MDF (~10gb) and the *.LDF (~180gb)

    Due to obvious problems with space, I wanted to copy these files to a Terrabyte USB harddrive.
    After copying (I stopped SQL) I did the following:
    Pause Local
    Detach the copied database
    Then attached the copied database from the new hardrive.

    The following message appears:

    Error 9003: The LSN passed to log scan in database is invalid

    1. harddive is write cache disabled
    2. The original files are good

    My guess is that copying of these huge files causes some corruption.

    Any idea to solve this matter

    Thankx in advance

    Hans

  2. #2
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    Hans, by the size of your ldf file, it seems your db is using the full recovery model with no log maintenance routines in place. Either put the routines in place, or switch your db to the simple recovery model and truncate and shrink your log. 180GB Wow, on a 10GB database file, you will eventually run out of space on the drive since the log file is not being truncated of inactive transactions.

    To Shrink Log:
    backup log databasename with truncate_only
    dbcc shrinkfile(logdevicename, NewSizeInMB)
    ie dbcc shrinkfile(securitymaster_log, 2048)

    you can obtain the log file name via select name from sysfiles for the current database, or via Enterprise Manager.

    switch your db to simple recovery model if you do not need recovery outside of the last full backup, or put jobs in place to backup the database log periodically.
    Last edited by PMASchmed; 02-03-09 at 10:11.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •