Recover unsaved SQL query scripts

前端 未结 14 1705
旧巷少年郎
旧巷少年郎 2020-12-07 06:55

How to recover the unsaved scripts if the SSMS crashes / unsaved tab gets accidentally closed?

14条回答
  •  渐次进展
    2020-12-07 07:32

    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 lose 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.

提交回复
热议问题