当前位置:网站首页>SQL server only has database files and no log files. The solution to the 1813 error in restoring data times
SQL server only has database files and no log files. The solution to the 1813 error in restoring data times
2022-07-29 00:53:00 【Braised corky】
Unable to open new database 'ASR'.CREATE DATABASE suspend .
File activation failed . Physical file name 'E:\SqlServer\MSSQL\Data\ASR_log.LDF' It may not be right .
Unable to regenerate log , The reason is that there are open transactions when the database is closed / user , The database has no checkpoints or the database is read-only . If the transaction log file is manually deleted or lost due to hardware or environmental problems , This error may occur . (Microsoft SQL Server, error : 1813)
Solution :
1、 Create a new database with the same name .
2、 Stop database service , Overlay the new database master file ( Tips : It's best to put it in the same disk , Delete or move the new database master file , Then cut the main database file to be restored , This will save time .)
3、 Start database service , The database becomes suspect or suspicious . Then run in the query analyzer :
alter database Database name without log file set emergency
Set to emergency .
4、 Run again :
alter database Database name without log file set single_user
perhaps :
Sp_dboption ' Database name without log file ', 'single user', 'true'
Set to single user mode .
5、 Check and rebuild the log file , function :
dbcc checkdb(' Database name without log file ',REPAIR_ALLOW_DATA_LOSS)
This is a long time . Wait patiently ! If there is an error prompt , Run again :
dbcc checkdb(' Database name without log file ',REPAIR_REBUILD)
Make repairs . If there are no mistakes , You can skip .
6、 Revert to multi-user mode
alter database Database name without log file set multi_user
perhaps :
Sp_dboption ' Database name without log file ', 'single user', 'false'
Refresh database , You can see the repaired database .
边栏推荐
- Techo hub Fuzhou Station dry goods attack | talk with developers about new industrial intelligence technology
- 【开发教程10】疯壳·开源蓝牙心率防水运动手环-蓝牙 BLE 收发
- IMG tags prohibit dragging pictures
- DRF - deserialization of serializer, fields and parameters, local and global hooks, use of modelserializer
- 云函数实现网站自动化签到配置详解【Web函数/Nodejs/cookie】
- Anomaly detection and unsupervised learning (1)
- Tips for API interface optimization
- flask与七牛云上传图片
- 16. Influence of deviation, variance, regularization and learning curve on the model
- The 30th day of question brushing
猜你喜欢

IMG tags prohibit dragging pictures

Brief introduction to compressed sensing

Some considerations about ThreadPool

关于ThreadPool的一些注意事项

I was asked several questions about string in the interview. Can you answer them?

16.偏差、方差、正则化、学习曲线对模型的影响

Statistical analysis of time series

Educational Codeforces Round 132 (Rated for Div. 2)【A~C】

芯驰科技发布G9系列最新旗舰产品,配备6个1.8Ghz主频的A55核心

Jupyter notebook中5个有趣的魔法命令
随机推荐
SQL Server 只有数据库文件,没有日志文件,恢复数据时报1813错误的解决方案
seleniumwire获取百度指数
Protective copy & stateless
将行内元素转换为块元素的方法
Tips for API interface optimization
UE4 调试常用的打印信息方法
MySQL的隔离级别、可能出现的问题(脏读、不可重复读、幻读)及其解决方法
追踪伦敦银实时行情的方法有哪些?
Armeabi-v7a architecture (sv7a)
最长上升子序列
“吃货联盟定餐系统”
Download the latest version of visual studio code and connect to the server remotely (very detailed)
15. Model evaluation and selection
Andriod6.0 low power mode (turn off WiFi, Bluetooth, GPS, screen brightness, etc.)
Jupyter notebook中5个有趣的魔法命令
【开发教程10】疯壳·开源蓝牙心率防水运动手环-蓝牙 BLE 收发
Outlier detection and open set identification (1)
【MySQL 8】Generated Invisible Primary Keys(GIPK)
Camera Hal OEM module ---- CMR_ preview.c
Techo hub Fuzhou Station dry goods attack | talk with developers about new industrial intelligence technology