Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSMS Auto-recovery/Auto-save new (unsaved) queries Expand / Collapse
Author
Message
Posted Sunday, February 16, 2014 6:48 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 3:33 PM
Points: 102, Visits: 80
Since upgrading from SQL Server Management Studio 2008 R2, I've noticed that it no longer autosaves queries that have not been manually saved first. If a file has been manually saved the autorecover files end up in the following directory:
%appdata%\Microsoft\SQL Server Management Studio\11.0\AutoRecoverDat\Solution1

However, I have ended up in the situation where I have unsaved queries when my computer has crashed and have not been able to recover them.
I have also found references to .sql files stored in temp files in the following directory, but the files here seem to be very haphazardly caught:
%userprofile%\AppData\Local\Temp

I have seen recommendations to use SSMS Tools but this has fairly significant licensing fees.
I'm currently testing out another add-in called SSMSBoost (under the community license), which has a lot of nice features and will probably solve my problem, but it seems crazy to need to use a third party add-in just to have some basic auto recovery features.

Does anyone have any other solutions?
Post #1541960
Posted Sunday, October 5, 2014 12:34 PM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, November 11, 2014 1:02 PM
Points: 57, Visits: 138
This article points out the option to use the query statistic cache from SQL server. You can get the actual SQL using sys.dm_exec_sql_text.

Hope that helps:

http://ozkary.blogspot.com/2014/09/recover-sql-server-management-studio.html


http://ozkary.blogspot.com
http://og-bit.com
Post #1622931
Posted Sunday, October 5, 2014 11:15 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, December 22, 2014 2:05 AM
Points: 178, Visits: 260
Upgraded versions like 2012, only saves recovery files for queries that has already saved earlier. Files that have not been saved seem to get dumped in the path c:\ users\yourname\appdata\local\temp
Or u can check on this path c:\ users\yourname\documents\sql server management studio

If u r unable to find them on disk u can recover queries from procedure cache as well if they aren’t pushed out from the cache memory.

Thanks
Andrew
Post #1622953
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse