WEB开发网
开发学院数据库MySQL 在附加多个.MDF文件时重新建立日志 阅读

在附加多个.MDF文件时重新建立日志

 2010-06-21 00:00:00 来源:WEB开发网   
核心提示: 让我们分离这个数据库并删除所有的.MDF 文件。usemaster go sp_detach_dbMyDB1 go execmaster..xp_cmdshell'Delc:\data\mydb1.ldf' go execmaster..xp_cmdshell'Delc:

让我们分离这个数据库并删除所有的.MDF 文件。

 use master
  go
  sp_detach_db MyDB1
  go
  exec master..xp_cmdshell 'Del c:\data\mydb1.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb2.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb3.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb4.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb5.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb6.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb7.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb8.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb9.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb10.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb11.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb12.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb13.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb14.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb15.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb16.ldf'
  go
  exec master..xp_cmdshell 'Del c:\data\mydb17.ldf'
  go

上一页  1 2 3 4  下一页

Tags:附加 多个 MDF

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接