Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

SQL-server restore to point in time - the correct way to do it.

$
0
0

Hello,

I've been recently trying to learn how to restore an SQL database to a point in time. My database is in FULL recovery model, I run one weekly backup, daily incremental backups and one daily log backup. I did succeed restoring a database using the GUI and T-SQL. The sequence was:

1) Click on database -> restore

2) Used DEVICE, chose my FULL backup file

3) Chose Timeline - pointed the GUI to the time I wanted to restore to

4) Chose the following Options

-        Restore with Norecovery

-        Take tail log backup before restore

-        Leave source database in restoring state

-        Close existing connections to destination database

 

This leaves my database in Recover mode, I issued the command:

usemaster

restoredatabase My_database

withrecovery;

go

And my database is now fine.

 

What I cannot find in the documentation is how do I do the two main steps one in the GUI and the t-sql command all in the GUI in one go.

There's a lot of documentation and a lot of people trying to teach how to do it, but still cannot find a simple explanation.

MS-sql documentation usually talks in generic terms with almost no examples at all.

I'd appreciate some help in this matter.

 

Regards,

Richard.


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>