SQL Sever 2012

Bhatt Himanshu 1 Reputation point
2020-11-18T05:20:14.547+00:00

Dear Sir,

Due to some mistake, I have applied the drop command in SQL server 2012, my all data is lost and my database is so much important. Please guide me on how may take back my all data including table structure and data.

It's very urgent help I need.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,629 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,620 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Dirk Hondong 871 Reputation points
    2020-11-18T05:35:01.017+00:00

    Hi there,

    so you droppped the whole database?
    In that case you need to restore your database from a valid backup.
    I hope that appropriate backup jobs where setup before, either native or through a 3rd party backup software which may is in use.

    If your SQL Server resides in a VM and the whole VM is backed up from time to time than you may extract the data and log file of the database from there as well.
    But keep in mind: data loss is inevitable (time gap between last succesful backup and drop command).

    0 comments No comments

  2. Shashank Singh 6,251 Reputation points
    2020-11-18T06:59:24.473+00:00

    The only way i see is restore the backup of the database using full and log backups on same instance as different name, script out table structure from new database restored and create table on old database from which table was dropped. Now use import export wizard to move data from new database to old.

    You can also try to restore the whole database but in this case the whole database will be unavailable during the restore period.

    0 comments No comments

  3. m 4,271 Reputation points
    2020-11-18T07:19:31.717+00:00

    Hi @Bhatt Himanshu ,

    Please guide me on how may take back my all data including table structure and data.

    What command do you use? You mean you drop one database? Or drop one table?
    If you have one backup, try to restore the backup files.If do not have one, you have to recreate it.

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

  4. m 4,271 Reputation points
    2020-11-19T01:16:23.49+00:00

    Hi @Bhatt Himanshu ,

    Is the reply helpful?

    BR,
    Mia


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.