当前位置:网站首页>sql server数据库添加 mdf数据库文件,遇到的报错
sql server数据库添加 mdf数据库文件,遇到的报错
2022-07-03 02:33:00 【Lee魅儿】

右键添加数据库报错,提示无事务日志文件,

第一步,将mdf文件,放入安装文件夹下如上图

第二步,在系统数据库,master下面点击查询,输入下面语句,并且执行,不要管运行的报错,只要箭头所指向的ldf文件提示已经创建即可:
其中 dbname是你要添加的mdf的数据库名字,pysname是你第一步存放mdf文件的路径

USE MASTER
EXEC sp_detach_db @dbname = "MonitorHistory2021M8D30h5m30s1.mdf"
EXEC sp_attach_single_file_db @dbname = "MonitorHistory2021M8D30h5m30s1.mdf",
@physname = "F:\固阳安顺西\补充数据\2021年08月份CMS数据\08月份CMS数据\MonitorHistory2021M8D30h5m30s1.mdf"
第三步,刷新,即可看到你添加的对应mdf的数据库

边栏推荐
- xiaodi-笔记
- GBase 8c 触发器(一)
- UDP receive queue and multiple initialization test
- Memory pool (understand the process of new developing space from the perspective of kernel)
- 面试八股文整理版
- Principle and application of database
- Compréhension simple de SVG
- [translation] modern application load balancing with centralized control plane
- Detailed introduction to the deployment and usage of the Nacos registry
- Gbase 8C function / stored procedure parameters (I)
猜你喜欢

线程安全的单例模式

【翻译】后台项目加入了CNCF孵化器

oauth2.0鉴权,登录访问 “/oauth/token”,请求头Authorization(basicToken)如何取值???
![[hcia]no.15 communication between VLANs](/img/59/a467c5920cbccb72040f39f719d701.jpg)
[hcia]no.15 communication between VLANs
![[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)](/img/65/c1fe95f8c391394f7ff1b75c7d75b6.jpg)
[shutter] setup of shutter development environment (supplement the latest information | the latest installation tutorial on August 25, 2021)

Thread safe singleton mode

8 free, HD, copyright free video material download websites are recommended

Use go language to realize try{}catch{}finally

面试项目技术栈总结

《MATLAB 神经网络43个案例分析》:第43章 神经网络高效编程技巧——基于MATLAB R2012b新版本特性的探讨
随机推荐
[tutorial] chrome turns off cross domain policies CORS and samesite, and brings cookies across domains
通达OA 首页门户工作台
Why choose a frame? What frame to choose
Mathematical statistics -- Sampling and sampling distribution
What does "where 1=1" mean
2022-2028 global splicing display industry research and trend analysis report
Exception handling in kotlin process
Hcip137-147 title + analysis
How to change the panet layer in yolov5 to bifpn
Pytorch convolution network regularization dropblock
面试八股文整理版
GBase 8c 函数/存储过程定义
Choose it when you decide
GBase 8c触发器(二)
awk从入门到入土(1)awk初次会面
Startup mode and scope builder of collaboration in kotlin
Gbase 8C system table PG_ attribute
Oauth2.0 authentication, login and access "/oauth/token", how to get the value of request header authorization (basictoken)???
xiaodi-笔记
udp接收队列以及多次初始化的测试