SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SQL Datafile Rename and format change
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sridharsridhar
Starting Member

India
21 Posts

Posted - 07/22/2013 :  09:38:20  Show Profile  Reply with Quote
Hi
we have installed SQL server 2008 and Restored previous Databases into new Databases. When we restored it to new database 2 Files created for every database 1 is mdf and 2nd one is ldf .

for 2 database when we restored it did not stored in the mdf format it was saved in Database name . can we rename this file

Thanks

sridhar

James K
Flowing Fount of Yak Knowledge

3327 Posts

Posted - 07/22/2013 :  10:03:03  Show Profile  Reply with Quote
The mdf and ldf extensions are extensions for primary data file and log file respectively by convention; they are not mandatory. So even if you did not rename your files there will be no issues. However, if you do want to rename them for consistency (which is a good idea), do what I suggested in your other question here: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=186994

You should follow that procedure exactly - don't simply rename the file without doing the other things. Also, test it in an environment before you do it for real.

Edited by - James K on 07/22/2013 10:03:53
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52249 Posts

Posted - 07/22/2013 :  10:16:37  Show Profile  Reply with Quote
you can rename it.

Use RESTORE DATABASE WITH MOVE option

http://msdn.microsoft.com/en-us/library/ms190447(v=sql.105).aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000