Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

How to detach, rename and attach mdf and ldf files for a database in SQL

$
0
0

Hello,

I am using Microsoft SQL server (2008 r2). I have requirement that need to detach a DB, then rename the old mdf and ldf files and attach the DB with new mdf and ldf files.

I want to do those with command line ( cmd ). Is there any command lines to do that ?


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>