How to restore SQL server 2000 to accidentally delete data
Today, I accidentally deleted more than one thousand pieces of data from the database of the customer, but I didn't back up the data before. It was really depressing. Later I found a tool on the Internet, which was very convenient to use, let me escape.
First, let's take a look at the interface:
Enter the server address, user name and password, and click Connect to enter the following interface:
Here, select the database for data recovery and Use On-line Log (if you back up the file again, you don't need to Use this tool, and you can Use SQL directly ). Click Attach to go to the following interface:
We can see that there are many functions in the menu on the left. To restore data, first we need to View the logs and find the Log records of misoperations. Click View Log under Browse:
In this way, we can see all the operation logs of this database. We can filter out what we need based on the date and other conditions:
After the log is filtered, it is time To Export the data. This tool provides two methods: First, Export the data To an XML or HTML File (corresponding To the Export To File in the left menu ), the second is To create a new table directly in the database, and then import the data (Export To SQL ).
Let's take a look at the import To SQL. First, click the Export To SQL option:
Enter the Database and Table name, and then Finish.
In this way, there are several tables in your data database:
TestTable
TestTable_dll
TestTable_details
TestTable_Keys
TestTable_Login
The recovered data is in the TestTable_details table, but the data format has changed. You also need to write the stored procedure or use other methods to import it to the original table.
The above is a solution for restoring the accidental deletion of data on SQL server 2000. During work and study, you may encounter accidental deletion of database data, with the methods provided by xiaobian, I hope to help you.