SqlServer教程

Sqlserver修改文件目录,包括系统数据库

本文主要是介绍Sqlserver修改文件目录,包括系统数据库,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

 

 

转载: https://blog.csdn.net/zengcong2013/article/details/50354546/

 

修改系统数据库SQL

 
alter database master modify file ( name = master, filename ='C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data1\master.mdf');
alter database master modify file ( name = mastlog, filename ='C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data1\mastlog.ldf');

alter database model modify file ( name = modeldev, filename ='C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data1\model.mdf');
alter database model modify file ( name = modellog, filename ='C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data1\modellog.ldf');
 
alter database msdb modify file ( name = MSDBData, filename ='C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data1\MSDBData.mdf');
alter database msdb modify file ( name = MSDBLog, filename ='C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data1\MSDBLog.ldf');
  
alter database tempdb modify file ( name = tempdev, filename ='C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data1\tempdb.mdf');
alter database tempdb modify file ( name = templog, filename ='C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Data1\templog.ldf');
 
 

  

 

这篇关于Sqlserver修改文件目录,包括系统数据库的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!