//
you're reading...
SQL Server

AutoRecover SQL BI Projects

Just in case you forgot where this setting is… It has saved my bacon more then once Or everything you ever wanted to know or not know about auto revocery in Visual Studio.

AutoRecover is perhaps a developers best friend. It can be a real life saver if the dev environment crashes or there is a power outage or your laptop just decides its done for the day. It’s very easy to set and use, simply go to Tools -> Options -> Environment -> AutoRecover:

image

TO turn AutoRecover off deselect the “Save AutoRecover information every” checkbox. Of course, if you do this all your colleagues will all laugh at you when you lose important work because you didn’t have it set, therefor you might want to leave it on–just saying.

Here is what the other options do, pretty self explanatory but I’ll explain anyway:

minutes – determines how often files have AutoRecover information saved. The default is 5 minutes but you can adjust up or down depending on usage. There is an inverse relationship between this value and the frequency of your updates to code. If you make more frequent updates to code then have a lower number here. Fewer updates to code mean you can increase this number if you desire. If you are going to make a mistake here make it on the side of a number that is too low rather than too high. It’s better to take any performance hit from file I/O than to lose a ton of work.

days – used to decide how long AutoRecover files are kept in the Backup Files directory. The default is 7 days which is usually adequate for most situations. If you work with a lot of projects over a short period of time then you may want to decrease this number to keep the Backup Files directory more clear. If you are going to guess on this value then it’s better to guess high and lower the number as needed.

Ok, AutoRecover is set now what?  To the question you’ve been dying to ask; What a is saved and where it is saved? First the where, recovered files are stored at \…\My Documents\Visual Studio <version>\Backup Files\<projectname>. However regarding the “What”, not every project file is saved here. Only the files that have changed and not been saved are AutoRecovered.

Here is the backup folder for a solution just created in Visual Studio:

image

How observant, no files you ask. Initially the backup folder will be empty, but lets see what happens after the save interval (5 mins in this case) has elapsed.

image

Still empty? Hmmm. Oh wait, I did make a change but saved my changes so no files where backed up to the auto recovery folder. This is because there is no need to recover a saved file. Now let me change to a file without saving it and wait another 5 minutes:

image

OK,  Now there is some AutoRecover information on the changed file because in the event of a crash we now have unsaved changes out there and will have to make a decision as to whether to recover the unsaved changes or keep the last saved version. This is essentially the function of AutoRecover.

When you do have to recover a file, this is the dialog you will get:

image

Recovered files – lists the file(s) that can be recovered with a a checkbox to select/deselect the file as well as basic information.

<File Name> Summary – shows detailed information about the currently selected file including date/time info, location of the backup file, and destination location where the file will be recovered to.

Recover Selected Files – performs a recovery action on the file(s) selected copying the recovered source file to the previously indicated destination.

Do Not Recover – closes the dialog box without recovering any of the files listed.

In addition to AutoRecovery I highly recommend that you just click it and save your work often

image

Advertisements

About ldgaller

Accomplished Data Warehouse Architect, DBA and Software Architect with over 15 years of professional experience and demonstrated success designing and implementing solutions that improve business functionality and productivity. Highly diverse technical background with proven ability to design, develop and implement technology on an enterprise level. I approach all projects with passion, diligence, integrity, and exceptional aptitude.

Discussion

No comments yet.

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

%d bloggers like this: