当前位置:网站首页>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的数据库
边栏推荐
- Gbase 8C system table PG_ amproc
- [tutorial] chrome turns off cross domain policies CORS and samesite, and brings cookies across domains
- Codeforces Round #418 (Div. 2) D. An overnight dance in discotheque
- Kotlin middle process understanding and Practice (I)
- easyPOI
- SPI机制
- QT qcombobox add qccheckbox (drop-down list box insert check box, including source code + comments)
- require. context
- 【翻译】后台项目加入了CNCF孵化器
- Return a tree structure data
猜你喜欢
What does "where 1=1" mean
基于线程池的生产者消费者模型(含阻塞队列)
Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
【翻译】后台项目加入了CNCF孵化器
Choose it when you decide
Matlab tips (24) RBF, GRNN, PNN neural network
Random shuffle note
Job object of collaboration in kotlin
线程安全的单例模式
[Flutter] dart: class; abstract class; factory; Class, abstract class, factory constructor
随机推荐
【 tutoriel】 Chrome ferme les cors et les messages de la politique inter - domaines et apporte des cookies à travers les domaines
awk从入门到入土(0)awk概述
Leetcode (540) -- a single element in an ordered array
[hcia]no.15 communication between VLANs
GBase 8c系统表-pg_class
udp接收队列以及多次初始化的测试
定了,就选它
Apple releases MacOS 11.6.4 update: mainly security fixes
awk从入门到入土(2)认识awk内置变量和变量的使用
Tongda OA homepage portal workbench
Hcip137-147 title + analysis
Current situation and future of Web3 in various countries
Use go language to realize try{}catch{}finally
xiaodi-笔记
require.context
Error when installing MySQL in Linux: starting mysql The server quit without updating PID file ([FAILED]al/mysql/data/l.pid
Face recognition 6-face_ recognition_ Py based on OpenCV, face detection and real-time tracking using Haar cascade and Dlib Library
GBase 8c 创建用户/角色 示例二
Monitoring and management of JVM
Packing and unpacking of JS