当前位置:网站首页>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 .
边栏推荐
- Nftscan and nftplay have reached strategic cooperation in the field of NFT data
- The 30th day of question brushing
- Huawei releases harmonyos 3.0, taking another step towards "Internet of all things"
- What are the skills of API interface optimization?
- Error reporting: the network preview shows {xxx:['this field is required']}
- 保护性拷贝&无状态
- Brief introduction to compressed sensing
- 15.模型评估和选择问题
- 最长上升子序列
- Api 接口优化的那些技巧
猜你喜欢
Android必备的面试技能(含面试题和学习资料)
Alibaba code index technology practice: provide reading experience of local IDE for code review
Api 接口优化的那些技巧
最长上升子序列
数仓搭建——DWT层
Error reporting: the network preview shows {xxx:['this field is required']}
Summary of preprocessing methods for time series data
将行内元素转换为块元素的方法
Data warehouse construction - DWT floor
selenium对接代理与seleniumwire访问开发者工具NetWork
随机推荐
Oracle实例无法启动的问题如何解决
execute immediate 简单示例合集(DML)
将行内元素转换为块元素的方法
ORACLE not available如何解决
SQL Server 只有数据库文件,没有日志文件,恢复数据时报1813错误的解决方案
Educational Codeforces Round 132 (Rated for Div. 2)【A~C】
关于ThreadPool的一些注意事项
保护性拷贝&无状态
I don't recommend you use Select*
DRF - deserialization of serializer, fields and parameters, local and global hooks, use of modelserializer
DRF -- authentication, authority, frequency source code analysis, global exception handling, automatic generation of interface documents, RBAC introduction
Flash and seven cattle cloud upload pictures
时间序列数据的预处理方法总结
flask与七牛云上传图片
【开发教程10】疯壳·开源蓝牙心率防水运动手环-蓝牙 BLE 收发
Data warehouse construction - DWT floor
[development tutorial 11] crazy shell · open source Bluetooth heart rate waterproof sports Bracelet - explanation of the function code of the whole machine
SAP vl02n delivery note posting function WS_ DELIVERY_ UPDATE
【esn】 学习回声状态网络
armeabi-v7a架构(sv7a)