Wednesday, November 30, 2011

How to Resolve SQL Server Error 3702?

A database administrator may need to drop a SQL server database table for personal reasons. For this, SQL server offers a command to do i.e. DROP Table command. This command also helps in maintaining the database. The Syntax for DROP Table command is given below.

DROP Table “Your-Table-Name”

Example: Suppose you want to drop employee table then syntax for you is:
DROP Table employee

Sometimes SQL server pops-up an error message in the error log when a database administrator tries to drop a table from the SQL server database. The error is:

Msg 3702, Level 16, State 3, Line 2
Cannot drop database “%.*ls” because it is currently in use.

Cause: As indicated by the error itself, you can't drop a table because table is in use. That means you are trying to drop a table that is already in use by you.

Resolution: To resolve the above error message, firstly you have to close the connection of table then run the syntax to drop the table.

Applied For:  All SQL server versions

Remarks: It is a quite common mistake done by users so be careful before drop a table.

Table Drop by Mistake: It is a common question, a table can be dropped by intentionally or by mistake. I have seen this type of question several times in the forums and blogs. Some similar questions like this are “how to recover drop table”, “drop table by mistake what to do”.

How to Recover Drop Table? The best and effective answer for this is Backup. Backup is a place where all the records are stored. A database administrator is responsible for maintaining proper backup for the database. If you have maintained the backup of database then restore dropped table from the backup, else try any third party database recovery software

Which is the best data recovery software? It is a very board question. I can't explain this, it’s totally depends upon you to choose the best database recovery software that suit your requirement and budget. You can try any search engine to find the best data recovery software.

1 comment:

  1. The blog was absolutely fantastic! Lots of great information and
    inspiration, both of which we all need!b Keep 'em coming... you all do
    such a great job at such Concepts... can't tell you how much I, for
    one appreciate all you do!