Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2004
    Posts
    5

    Question Unanswered: My log file has grow the disk full

    My logfile has grow the disk full - the logfil is 25 gb and I have 4 gb free.

    I can't shrink the log fil !

    Can I set the log file to null ??

    I have backup my datafil successfully!

    Help!

  2. #2
    Join Date
    Feb 2004
    Location
    PAKISTAN
    Posts
    106

    Re: My log file has grow the disk full

    Detach the database, and the delete the log-file manually. Re-Attach the Database, a new log file would be created.

  3. #3
    Join Date
    Mar 2004
    Posts
    5

    Talking Re: My log file has grow the disk full

    Thank you :-)

  4. #4
    Join Date
    Mar 2004
    Posts
    5

    Unhappy Re: My log file has grow the disk full

    Originally posted by TALAT
    Detach the database, and the delete the log-file manually. Re-Attach the Database, a new log file would be created.
    I get a : Error 1813: Could not open new database 'xxxx'. Create database is aborted. Device activation error. The fysical file name 'xx'
    may be incorrect.

    ????

  5. #5
    Join Date
    May 2002
    Location
    Timbaktu
    Posts
    185
    Detach the DB, rename the existing Log File and then attach the database and it will prompt for a new log file, say ok and you should be all set.
    Otherwise:

    Backup Tran DBName with No_log
    then do
    use dbname
    dbcc shrinkfile(logfilename,truncateonly)

  6. #6
    Join Date
    Mar 2004
    Posts
    5

    Question

    Originally posted by sqlserver2k
    Detach the DB, rename the existing Log File and then attach the database and it will prompt for a new log file, say ok and you should be all set.
    Otherwise:

    Backup Tran DBName with No_log
    then do
    use dbname
    dbcc shrinkfile(logfilename,truncateonly)
    How can I write the path ?? "e:\logfile\logfilename" don't work ???

    The SQLserver can't find the file in sysfiles!

    <dbcc shrinkfile(logfilename,truncateonly)> ?

  7. #7
    Join Date
    Feb 2004
    Location
    PAKISTAN
    Posts
    106
    What exactly are u doin? Restoring the DB? Check if the file name has an extension and u r missing the .tran or .bak extention in the Quotes.

  8. #8
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    By this time you might have detached the database using SP_DETACH_DB.

    Now delete the existing >LDF file from the path and use SP_ATTACH_SINGLE_FILE_DB to reattch the database which will create new log file as specified.

    Books online would be the best help in this regard.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  9. #9
    Join Date
    Mar 2004
    Posts
    5

    Talking

    Originally posted by Satya
    By this time you might have detached the database using SP_DETACH_DB.

    Now delete the existing >LDF file from the path and use SP_ATTACH_SINGLE_FILE_DB to reattch the database which will create new log file as specified.

    Books online would be the best help in this regard.
    Tanks for your reply :-)

    EXEC sp_detach_db @dbname = 'xxx'

    EXEC sp_attach_single_file_db @dbname = 'xxx',
    @physname = 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\xxx.mdf'

  10. #10
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Yes thats correct and what was the result.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

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