zoukankan      html  css  js  c++  java
  • SQL Server 移动master 数据库

    第一步:

             告诉SQL Server 下次启动时master数据库的文件在哪里!我想们一定想到了(这样做是不对的,它对master不起作用,第二步开始正确的做法)

             alter database master
             modify file(name ='master',filename='E:master.mdf');
             go
             alter database master
             modify file(name ='mastlog',filename='E:mastlog.ldf');
             go

             移动物理文件新的位置

             再重新启动MSSQLSERVER; 

             查看:

             select *
             from sys.master_files mf
             where mf.database_id = DB_ID('master');
             go

             不幸的是它并不有变!

             

    第二步:

             告诉 sqlserver 下次启动时master 的位置

             1、运行sql server configuration manager

             2、找到sqlserver的服务

                

            3、属性-->启动参数

              

         4、更新参数-->应用

             

    第三步:

             上一步告诉了SQL server启动时master在哪?

             这一步先停止SQL Server 服务,再把就把文件移动到新的物理位置。

    第四步:

             重新启动sql server 服务

    第五步:

              查看是不是变了

              select *
              from sys.master_files mf
              where mf.database_id = DB_ID('master');
              go

              

    ----------------------------------------------------------------------------------------------------------------------------

     注意:

            如果你的还是不对,请看一下http://www.cnblogs.com/JiangLe/p/4038689.html   最后面的注意部分!

            我还想写第二次了。

  • 相关阅读:
    生产者—消费者模型
    使用wait/notify/notifyAll实现线程间通信的几点重要说明
    死锁
    python基础:协程详解
    python爬虫:multipart/form-data格式的POST实体封装与提交
    python爬虫:Multipart/form-data POST文件上传详解
    python爬虫:http请求头部(header)详解
    python爬虫:登录百度账户,并上传文件到百度云盘
    python爬虫:urlparse模块拆分url
    转:python爬虫:html标签(图文详解二)
  • 原文地址:https://www.cnblogs.com/JiangLe/p/4038914.html
Copyright © 2011-2022 走看看