رفع مشکل ریکاوری مد دیتابیس recovery mode sql

ساخت وبلاگ

سلام 

بعضی وقتا پیش میاد دیتابیس توی حالت ریکاوری مد گیر میکنه 

با کمک این سه مرحله میتونین دیتابیس رو از این حالت خارج کنین :) 

شاد باشین و پیروز 

1. Mark Database in Emergency Mode and Initiate Forceful Repair

Database EMERGENCY mode marks the database as READ_ONLY, disables logging, and grants access only to system administrators. Essentially, setting the db in this mode can bring the inaccessible database online. 

Note: Usually a database comes out of EMERGENCY mode automatically. If you are having issues restoring the db from this mode, read this Recover SQL Database from Emergency Mode to Normal Mode.

Once you have opened the db in EMERGENCY mode, try repairing the database using the DBCC CHECKDB command with the ‘REPAIR_ALLOW_DATA_LOSS’ option. To do so, open SSMS and execute the following set of queries:

ALTER DATABASE [DBName] SET EMERGENCY;
GO
ALTER DATABASE [DBName] set single_user
GO
DBCC CHECKDB ([DBName], REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS;
GO
ALTER DATABASE [DBName] set multi_user
GO
نوشته شده توسط:همسخن|۱۴۰۰/۰۹/۰۶ | 12:37 |لینک ثابت | موضوع: |

یه روز کوچولو ...
ما را در سایت یه روز کوچولو دنبال می کنید

برچسب : نویسنده : mershado بازدید : 156 تاريخ : دوشنبه 25 بهمن 1400 ساعت: 11:45