D:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA

databaseName.mdf

databaseName.ldf

在Microsoft SQL Server文件里有保存我们的database record.

上面2个file代表了一个database.

如果我们想快速的把资料和配置搬到一台电脑上,可以copy这2个file

copy 时要先停止 sql 运行

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft SQL Server 2012\Configuration Tools\SQL Server Configuration Manager

可以打开这个stop all sql running 才copy.

paste to 另一台电脑的同一个目录下。file 要调permission哦,不然会paste不到的。

之后就开 management studio

左边database right click -> attach -> add -> ok !

Attach file to database的更多相关文章

  1. EF架构~Cannot attach the file as database

    回到目录 Cannot attach the file as database这个异常是在EF的code frist里经常出现的,解决方法很简单,只要重新启动一下V11实例即可. CMD> sq ...

  2. An attempt to attach an auto-named database for file

    在用VS自带的 .mdf读取(joint)时,报错: Server Error in '/' Application. An attempt to attach an auto-named datab ...

  3. Cannot attach the file as database

    Cannot attach the file as database这个异常是在EF的code frist里经常出现的,解决方法很简单,只要重新启动一下V11实例即可. CMD> sqlloca ...

  4. SQL SERVER – Attach mdf file without ldf file in Database

    Background Story: One of my friends recently called up and asked me if I had spare time to look at h ...

  5. Cannot attach the file as database 'membership'.

    Cannot attach the file 'D:\GitHome\cae\CAE\App_Data\membership.mdf' as database 'membership'. 说明: 执行 ...

  6. 异常处理:Cannot attach the file as database 'membership'.

    Cannot attach the file 'D:\GitHome\cae\CAE\App_Data\membership.mdf' as database 'membership'. 说明: 执行 ...

  7. Logging - MVC Using Log4net Save to File and Database

    第一步:创建Config文件夹和log4net.config 第二步:在log4net.confg黏贴以下配置 <?xml version="1.0" encoding=&q ...

  8. Checklist For Choosing The Right Database Engine

    http://sqlite.org/whentouse.html Appropriate Uses For SQLite SQLite is not directly comparable to cl ...

  9. I/O requests taking longer than 15 seconds to complete on file I/O瓶颈问题

    I/O requests taking longer than 15 seconds to complete on file I/O瓶颈问题 http://mssqlwiki.com/2012/08/ ...

随机推荐

  1. mac上安装redis

    1.从http://redis.io 下载redis包,这里选择了redis-3.2.3 2.将下载的 redis-3.2.3.tar.gz 包拷贝到 /user/local 目录 3.执行 sudo ...

  2. java垃圾回收算法

    1.标记-清除 2.标记-复制 3.标记-整理 4.分代混合算法

  3. 淘宝数据库OceanBase SQL编译器部分 源代码阅读--Schema模式

    淘宝数据库OceanBase SQL编译器部分 源代码阅读--Schema模式 什么是Database,什么是Schema,什么是Table,什么是列,什么是行,什么是User?我们能够能够把Data ...

  4. JAVA-1-学习历程1:基础知识1

     前言:此文属于个人学习中总结记录的较重要的知识点,分享一下.望对刚開始学习的人有点用. 视频04   语句.函数.数组 1.函数的重载 2.数组内存空间的划分 栈.堆 视频05    数组 1. ...

  5. yii图片上传

    http://wuhai.blog.51cto.com/2023916/953300 首先感谢这里的博主,提供了思路,不过在调用 $model->b_image->extensionNam ...

  6. hdu 1870

    水题.... AC代码: #include <iostream> #include <queue> using namespace std; int main() { char ...

  7. css position 应用(absolute和relative用法)

    1.absolute(绝对定位) absolute是生成觉对定位的元素,脱离了文本流(即在文档中已经不占据位置),参照浏览器的左上角通过top,right,bottom,left(简称TRBL) 定位 ...

  8. Html.Action、html.ActionLink与Url.Action的区别

    1.html.ActionLink返回的指向指定controller.指定action的超链接标签<a>标签.如果没有指定controller,则默认为本页面对应的Controller. ...

  9. 关于服务器防火墙和discuz论坛的问题

    今天做了一个b2b商城,其中的论坛用的是discuz论坛 .net版本,主页要取出其中三个板块的最新帖子数据,安装好后,帖子数据在dnt_posts1数据表里,其中的tid为外链表dnt_forums ...

  10. (转)SQL流程控制语句学习(二):begin…end if…else case

    1.begin…end 语法: begin {sql语句或语句块} end 注意:begin 和end要成对使用 2.if…else 语法: if  布尔表达式 {sql语句或语句块} else  布 ...