locked
Someone please help RRS feed

  • Question

  •  

    I had a developer who has since emigrated who set up sql for me.

     

    The problem I have is someone has deleted my tables from my database. the backup was setup by him and backing up in a place I do not recognise (an e and c drive that do not have my local folders on).

     

    However I opened up the sql database on my local machine this morning through management studio express and still have it open with the tables on it. The online version has all the tables deleted.

     

    I am not an sql buff. Am I still in a position to use the tables, save them etc and then over write the online database  Or am I just seeing a ghost of these files.

     

    I need help

    Thursday, October 23, 2008 2:33 PM

Answers

  • Hi 

    I think the most important info you need as of now is where your DB Backups are going?

    use the below mentioned script to get the required info: "all you need to do is copy paste this script in your query analyzer\ssms and replace 'master' with <your db name>

    Use msdb
    go
    SELECT          physical_device_name,
                    backup_start_date,
                    backup_finish_date,
                    database_name
    FROM msdb.dbo.backupset b
    JOIN msdb.dbo.backupmediafamily m ON b.media_set_id = m.media_set_id
    WHERE database_name = 'master'
    ORDER BY backup_finish_date DESC

    source: http://stackoverflow.com/questions/4692141/where-is-database-bak-file-saved-from-sql-server-management-studio

    Now you can find how many last backups you have at that location and then find a suitable backup which shoudl have the data you need

    then you may use the script\link provided by vr.babu to restore your db with any other name and then export the table data.



    Sarabpreet Singh Anand

    Blog , Personal website

    This posting is provided , "AS IS" with no warranties, and confers no rights.

    Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

    Saturday, November 10, 2012 1:11 AM

All replies

  • hi there,

    yes you can restore all the data and tables.

    figure out which backup has the tables and data. how do you figure out this? trial and error.

    once you figure out the backup that contains the tables and data restore that full backup as a different database.

    create a new file group and move the table and data to that file group.

    back this file group and restore to the database you wanted.

    or

    you can use SSIS package to transfer the data, by creating the table structure.

    i hope this can help you.

    Friday, November 2, 2012 12:43 PM
  • What to know how databa was deleted then check this blog

    http://sqlservr.blog.com/2012/01/20/how-it-happen-so/

    restore a backup with other  name and take the backup of a single table from the database  and restore it

    http://sqlservr.blog.com/2012/04/09/how-to-take-backup-of-a-single-table/


    Ramesh Babu Vavilla MCTS,MSBI

    Friday, November 2, 2012 1:36 PM
  • Hi 

    I think the most important info you need as of now is where your DB Backups are going?

    use the below mentioned script to get the required info: "all you need to do is copy paste this script in your query analyzer\ssms and replace 'master' with <your db name>

    Use msdb
    go
    SELECT          physical_device_name,
                    backup_start_date,
                    backup_finish_date,
                    database_name
    FROM msdb.dbo.backupset b
    JOIN msdb.dbo.backupmediafamily m ON b.media_set_id = m.media_set_id
    WHERE database_name = 'master'
    ORDER BY backup_finish_date DESC

    source: http://stackoverflow.com/questions/4692141/where-is-database-bak-file-saved-from-sql-server-management-studio

    Now you can find how many last backups you have at that location and then find a suitable backup which shoudl have the data you need

    then you may use the script\link provided by vr.babu to restore your db with any other name and then export the table data.



    Sarabpreet Singh Anand

    Blog , Personal website

    This posting is provided , "AS IS" with no warranties, and confers no rights.

    Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

    Saturday, November 10, 2012 1:11 AM