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

How to rename DB, DB File Names and DB File Locations

$
0
0

I'm sure this is a simple question for the DBA's out there (of which I am not one). I have a recovered/repaired copy of a database that needs to be brought online. Right now it's called 'recovered_MYDB ' with corresponding MDF and LDF files named that way.

I need to:

1. Replace the existing/active MYDB with the recovered one

2. Move the corresponding data files to the correct location

3. Make sure the DB is named MYDB.

4. Make sure the DB files are named mydb.mdf and mydb.ldf

As I said, i'm sure this is a fairly simple process, but I would appreciate some simple instructions on how to do this via SSMS. This is MS SQL Server 2008 R2 Express.


Viewing all articles
Browse latest Browse all 4871

Trending Articles



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