Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Changing SQL Server logical file names

Posted on 2007-03-31
4
Medium Priority
?
209 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 1000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

704 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