Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 2nd, 2003, 02:31 AM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default Renaming a dB

Hopefully this is a simple question. I want to rename a SQL Server 2K database. E.g. from NorthwindBU to Northwind

Is it possible

Thanks
Ian
 
Old July 2nd, 2003, 02:41 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 215
Thanks: 0
Thanked 0 Times in 0 Posts
Default

sp_renamedb [@old_name =] 'old_name',
    [@new_name =] 'new_name'

eg:
sp_renamedb 'NorthwindBU', 'Northwind'

regards
David Cameron
 
Old July 2nd, 2003, 02:45 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

sp_renamedb 'Old_Name' , 'New_Name'

Always:),
Hovik Melkomian.
 
Old July 2nd, 2003, 02:48 AM
Authorized User
 
Join Date: Jun 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks guys, those lovely system SPs. Sorry for not using BOL :-)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Renaming File ayazhoda Access VBA 3 April 24th, 2007 05:43 AM
Renaming App_Code jacob .NET Web Services 5 July 4th, 2006 12:20 AM
Renaming filename simone_s Java Basics 2 May 18th, 2006 12:17 PM
Renaming File During Upload keph Beginning PHP 1 October 4th, 2005 02:46 PM
Problem Renaming an Element Morrislgn XSLT 2 May 31st, 2005 06:18 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.