Revert deleted entry

Now I have big problems. by mistake, I deleted the record (about 2,000,000) from the remote server table (SQL 2008). is there any way so i can return this entry.

please, help,

Thank you

optional * Server does not give me access to the backup file on the server side.

+3
source share
2 answers

Restore it from the backup database.

+6
source

for quick fix, except for problems with FK or cascading deletion:

1) restore the backup to a new database
2) in the database with deleted data, do the following:

INSERT INTO schema.YourTable
        (colA, colB, colC)
    SELECT
        colA, colB, colC
        FROM server.RESTORED_Database.schema.YourTable

: SET IDENTITY_INSERT (Transact-SQL)

+4

Source: https://habr.com/ru/post/1788979/


All Articles