deattach and attaching database while in recovery

  • hi

    i seems to have messed up..

    my database log file becomes too large that i run out of disk space... i cant shrink until full backup is done, which too failed because its can't write into log file

    Executing the query "BACKUP DATABASE [abc] TO DISK = N'\\server1\full\abc_backup_201201210956.bak' WITH NOFORMAT, NOINIT, NAME = N'adc_backup_20120121095653', SKIP, REWIND, NOUNLOAD, STATS = 10 " failed with the following error: "The transaction log for database 'abc’is full.

    thne i wanted to deattach database and move files, before doing that i just restart the server to clean up everything..however after restart my database goes into recovery mode.

    i dont wait for it (its going to take lont time for 100 + GB database) so i detach it, move files around and then try to attach...but it not ready even after mintues

    how long should i wait for it to reattach...any is there any way i can look into what's going on

  • What's the state of the database (state_desc in sys.databases) and what messages are in the error log for this DB?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • how long should i wait for it to reattach...any is there any way i can look into what's going on

    Are you getting any error message while attaching?

  • You might get some information if you look at sys.dm_exec_requests. It will show you if the process is waiting on something or blocked by something. It may also show you the percentage complete, but don't count on that.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 4 posts - 1 through 3 (of 3 total)

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