Solved

Changing SQL Server logical file names

Posted on 2007-03-31
4
185 Views
Last Modified: 2010-03-19
Experts,

Is there any way of changing the logical filename of all files in a SQL Server 2005 database.

I'm using SQL Server 2005 Express and the Management Studio Express.

Thanks
0
Comment
Question by:PantoffelSlippers
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 18828369
yes:

ALTER DATABASE yourdb MODIFY FILE ( name = current_name , NEWNAME = new_name )
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 18828370
0
 

Author Comment

by:PantoffelSlippers
ID: 18828403
Thanks

That worked like charm.  I also found afterwards it's also very easy to just do it through Management Studio Express.  Always good to know the code as well.  Thanks
0
 

Author Comment

by:PantoffelSlippers
ID: 18828404
Hope I'm not breaking any rules with this:

I've got another question with no replies yet.  Maybe it just doesnt match a lot of searches....

Would someone pls have a look:
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_22457986.html

Thanks
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question