DB Query

  • Last Night their were some DB's which were not functioning as the Transaction LOg was Full.. the Drive where the Logs are kept were full..

    as always one technician executed shringing of log.. all went well & the DB's were good.

    The same thing happened with different server..

    while shrinking of Logs .. One DB gave error

    Error - Cannot shrink db_Test Log as it is under transition...

    and so all DB's LOG files were Shrunk except the db_Test..

    Now when he used the query in query analyser

    Use db_Test

    error - No entry found with that name..

    i mean the DB does not exist :w00t:

    ************************************
    Every Dog has a Tail !!!!! :-D

  • :w00t: 37 views Zero replies :w00t:

    ************************************
    Every Dog has a Tail !!!!! :-D

  • Do a select on sys.sysdatabases to find if Db_test exists.

    On the other note why you want to shrink log file? If mast always take regular backup of TLogs.

    Read some BOL on Transaction log management.

  • Can't figure out from your description what the exact situation is and what the specific problem is.

    What happened (exactly, not vaguely)?

    What is the current situation (specifics)?

    What is the exact problem that you are trying to solve?

    p.s. Why is a technician shrinking logs 'as always'? That should be a very unusual action, something done very, very rarely.

    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
  • Neeraj - Regarding regular Log backup is fine.. but i have no understanding abt what to set the Intial size & Autogrowth of the LDF...

    Gail - I will have a detail info abt this from the technician n will let u know...

    I think due to the Drive full & continues DML transaction on that DB.. the File must hacve corrupted..

    ************************************
    Every Dog has a Tail !!!!! :-D

  • That's why I asked to read BOL on transaction log management.

    Now you have got Gail's attention. You will have an answer.

  • OnlyOneRJ (5/3/2013)


    I think due to the Drive full & continues DML transaction on that DB.. the File must hacve corrupted..

    Full log will send the DB read only, not corrupt the file. Still not a reason to shrink 'always'

    Please read through this - Managing Transaction Logs[/url]

    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

Viewing 7 posts - 1 through 6 (of 6 total)

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