The questions I received in last two weeks:
“I do not have backup, is it possible to restore database to previous state?”
“How can restore the database without using backup file?”
“I accidentally deleted tables in my database, how can I revert back?”
“How to revert the changes, I have only logs but no complete backup?”
“How to rollback the database changes, my backup file is corrupted?”
Answer:
You need complete backup to rollback your changes. If you do not have complete backup you can not revert back. Sorry.
To restore the database to previous stage if you have full backup:
1) Restore the full backup
2) Restore the latest differential backup.
3) Restore the second most latest (latest - 1) transaction back. Now restore the log to the point step by step.
Reference :
Pinal Dave (http://www.SQLAuthority.com)
SQL SERVER - Restore Database Backup using SQL Script (T-SQL)
SQL SERVER - Recovery Models and Selection
BOL - Full Restore
BOL - Restore (T-SQL)
Microsoft Backup and Restore Links:
Overview of Backup in SQL Server
Backup Under the Simple Recovery Model
Backup Under the Full Recovery Model
Backup Under the Bulk-Logged Recovery Model
Introduction to Backup and Restore Strategies in SQL Server
Creating Full and Differential Backups of a SQL Server Database
Working with Transaction Log Backups
Working with Backup Media in SQL Server
Security Considerations for Backup and Restore
Overview of Restore and Recovery in SQL Server
Implementing Restore Scenarios for SQL Server Databases
Working with Restore Sequences for SQL Server Databases
Backing Up and Restoring System Databases
Using Marked Transactions (Full Recovery Model)
Disaster Recovery
Optimizing Backup and Restore Performance in SQL Server
Understanding Recovery Performance in SQL Server
Backup and Restore in Large Mission-Critical Environments
Backup and Restore APIs for Independent Software Vendors



hi pinaldave how are you.
please i want more information abot Partitioning table in SQL Server 2005 and SERVICE_BROKER
How to use service_broker in stored procedure……
if any notes or material please mail me
Please help me
Hi pinal,
I want to get all ur interview question. Could I get it in one book. Could u please tell me where to buy these all interview questions books.
Deepak Kumar
I have added tables to the NOTHWIND database. In the past, when I wanted to update NORTHWIND on a new computer to contain the additional tables, I would do the following in SQL Server 2000:
1)I would go to my development computer, that contains NORTHWIND with the additional files, and perform a backup to the disk file myfirstback using the enterprise manager.
2) on the new computer I perform a backup to the disk file myfirstbackup.
3) I overwrite myfirstbackup on the new computer with myfirstbackup from my development computer.
4) I perform a restore on the new computer. NORTHWIND database then contains the added tables.
Please assist me in that SQL SERVER 2005 is not permitting me to use the SQL SERVER 2000 back up file named myfirstback to restore. I created the disk file myfirstbackup while in SQL 2005, overwrite the file with the SQL 2000 version of myfirstbackup and then attempt the restore. SQL 2005 does not permit the operation as I did while in SQL 2000.
Regards,
drgorin
Hello,
What would I do to recover a database if a backup had not been made for 3 months (no transaction logs in that time either, only my current _log.ldf file)? Is this out of the question or could my current log hold the info to restore back from 3 months ago? (It says it’s 120 MB).
Love you blog, I’ve learned a lot.
Thanks,
Rob
i want to know how to get back last deleted table in sql server using query
hi pinaldave ,
May I Help me for this question :
when i use this command :
RESTORE DATABASE Anbartechnical
FROM DISK = ‘D:\anb1222.bak’
WITH NORECOVERY
Sqlserver 2k5 told me :
RESTORE cannot process database ‘Anbartechnical’
because it is in use by this session. It is
recommended that the master database be used
when performing this operation.
PLEASE HELP ME !
hello
i do not have any back up and my user delete the data how can i restore data from log file?it is very impportant for me to restore these data.would you please help me?
thanks for your answer
Hi,
I want to backup entitre database using C#, can I do that if no than how do I back up using T-SQL.
Thank You
Rajesh
how can i restore a differential bakup after a full backup .
i have full backup and diffential bakup on different backup sets
Hello dear Pinal
i want some information about backup from one computer to another computer
i hope help me THANK YOU.