Cannot drop,rename table

  • Hi

    I canot drop ,delete rows or rename a particular table in my DB.I facing time out error.Please let me know how to fix it.

    Thanx

    Usha

     

  • Usha

    check whthr any process has locked up your table.

    In EM - Management\CurrentACtivety\Locks/Object.

    "Keep Trying"

  • I have had this a couple of times and its always when I have used BEGIN TRANSACTION without the follow up COMMIT or ROLLBACK.

    Debbie

  • Thanx for your help.I ll try to fix the prob and let u know.

     

    Usha

  • If need be, you can kill all connections to the database except yours by setting it to single_user with rollback immediate. I use this in my restore commands. Like this:

     

    Alter Database MyDatabase Set Single_User With Rollback Immediate

    Drop Table dbo.MyTable

    Alter Database MyDatabase Set Multi_User

    However, if this is a production database, you should be aware that this will disconnect all users in the dataabase.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

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

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