SQL SERVER – Auto Recovery File Settings in SSMS – SQL in Sixty Seconds #034 – Video

Every developer once in a while facing an unfortunate situation where they have not yet saved the work and their SQL Server Management Studio crashes. Well, you can minimize the loss by optimizing auto recovery settings. In this video we can see how to set the auto recovery settings.

Go to SSMS >> Tools >> Options >> Environment >> AutoRecover

There are two different settings:

1) Save AutoRecover Information Every Minutes

This option will save the SQL Query file at certain interval. Set this option to minimum value possible to avoid loss. If you have set this value to 5, in the worst possible case, you can loose last 5 minutes of the work.

2) Keep AutoRecover Information for Days

This option will preserve the AutoRecovery information for specified days. Though, I suggest in case of accident open SQL Server Management Studio right away and recover your file. Do not procrastinate this important task for future dates.

Related Tips in SQL in Sixty Seconds:

What would you like to see in the next SQL in Sixty Seconds video?

Reference: Pinal Dave (http://blog.sqlauthority.com)

 

About these ads

8 thoughts on “SQL SERVER – Auto Recovery File Settings in SSMS – SQL in Sixty Seconds #034 – Video

  1. Thanks Pinal for sharing this piece of information.

    You asked in video, has it happened to you, my response is “Yes it happened to me couple of times. I had to re-write all code again”.

    This is a great feature. I wish they had this feature in SQL 2008/2005, but I see it is not available in SQL Server 2008, I guess Microsoft included this feature starting SQL Server 2012.

    Very useful feature by Microsoft.

    ~ IM.

  2. Hi Pinal,
    Thanks for this post, is there any way to do the same in SQL Server 2008?
    It’s really very helpful for SQL professionals.

  3. Hi,
    We are Agree this is the gud feature but if the SSMS crashes where this Auot recover option saved the file..And how do we get back script

    ~~Venkat

  4. Pingback: SQL SERVER – Wrap SQL Code in SSMS – SQL in Sixty Seconds #038 – Video « SQL Server Journey with SQL Authority

  5. Pingback: SQL SERVER – Remove Cached Login from SSMS Connect Dialog – SQL in Sixty Seconds #049 | SQL Server Journey with SQL Authority

  6. Pingback: SQL SERVER – Finding Object Dependencies in SSMS – SQL in Sixty Seconds #071 | Journey to SQL Authority with Pinal Dave

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s