July 21, 2008 at 9:19 am
Hi All,
I am moving my database from one server to a new one, I am performing that by dettach-attach, copying my database files from one host to the other, but I want to change my DB name on the new one, I tried to follow just using SSMS using "rename"...but it didn't work.
Please any help, how can I do this?
Thanks.
July 21, 2008 at 9:25 am
use sp_renamedb
July 21, 2008 at 9:27 am
You should be able to use the CREATE DATABASE...FOR ATTACH syntax (see BOL). Or, you could do a backup/restore.
Joshua Jones
Director, Global Database Services
PGi
July 21, 2008 at 9:31 am
In SQL Server 2005 you can use Create Database [db_name] With Attach instead of sp_attachdb. You can also specify a new database name using sp_attachdb.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply