Solved

Changing SQL Server logical file names

Posted on 2007-03-31
4
157 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 142

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 142

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

757 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now