---
title: "移动数据库日志文件"
author: "fengzi_015"
date: "2009-09-04T21:24:56Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2009-09-04T21:24:56Z"
id: 462425
url: "https://fengzi-nest.iteye.com/blog/462425"
---

use master
go
sp_detach_db @dbname='TestAttach'

sp_attach_db 'TestAttach','C:\Program Files\Microsoft SQL Server\MSSQL\Data\TestAttach_Data.MDF','D:\TestAttach_Log.LDF'