dbTalk Databases Forums  

Make a development copy af a DB

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Make a development copy af a DB in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Manpreet Singh
 
Posts: n/a

Default RE: Make a development copy af a DB - 08-21-2008 , 01:36 AM






backup/restoring is a ideal answer to this problem but it will take lot of
time (first you have to backup it then you have to restore it with different
name) the fastest way to make copy of database is to just detach database
copy mdf and ldf file in new location and then attach the original and copied
database . because coping is OS specific operation therefore it is much
fester then backup and restore .

you can attach datbase by using this script

USE [master]
GO
CREATE DATABASE [NEW_DB_NAME] ON
( FILENAME = N'FILE PATH OF MDF' ),
( FILENAME = N'FILE PATH OF LDF' )
FOR ATTACH
GO

"KSor" wrote:

Quote:
I want to copy a database to the same server but with a new name - in fact I
want to make a copy for developing

Can the "copy database wizard" be used for this ?

(Some users tells me, that the "copy database wizard" corrupts the source -
is that a fact or .. ?)

Best regards
KSor, Denmark




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.