HaPpY hApPy
SQL Server error 9001: The log for database 'x' is not available 본문
정확한 원인은 모르지만, 잘 돌아가던 DB 하나가 맛탱이 가더니 갑자기 안돌아감.
아래 링크 주소 방법으로 시도중 Take Offline이 안됨.
http://www.sqlservice.se/dont-panic-the-log-for-database-name_here-is-not-available/
다시 검색해서 아래 사이트에서 방법찾음. (추천 제일 많이 받은 답변)
아래 명령어 하면 강제 종료 된다고 해서 사용(아마 Rollback 하면서 종료되는듯,,추천 젤 많이 받았으니 안전 하겠지?)
ALTER DATABASE [Staging-DB] SET OFFLINE WITH ROLLBACK IMMEDIATE
나는 해당 DB가 Staging 빌드용이라 걱정없이 했지만,,,문제 발생할수도 있을듯??
추가 2017/9/5
The error is discussed here:
The solution is related to a database property called Auto_Close:
http://sqlmag.com/blog/worst-practice-allowing-autoclose-sql-server-databases
This SQL SELECT statement returns one record; thiserrordatabase.com has auto_close set to TRUE.
select name, is_auto_close_on from master.sys.databases where is_auto_close_on = 1;
The property has been changed to FALSE.