473,326 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

duplicate database

Is there a way to copy/duplicate and rename a database on the same server? I
need to make a copy for another application. I appreciate any tips or advice
you can provide!

TIA - Rob
Jul 20 '05 #1
3 29546
You can do this by either detaching, renaming & attaching the database files
with a different name or you can backup the database & restore it as a
different name. For smaller databases, you can even do the Copy database
wizard which can create a copy of the database with a different name.

Please refer to SQL Server Books Online for details on any of these
approaches and check the following MSKB links :
http://support.microsoft.com/default.aspx?kbid=314546
http://support.microsoft.com/default...cid=kb;q224071

--
- Anith
( Please reply to newsgroups only )
Jul 20 '05 #2
Thanks for the reply! I can copy with a number of methods but I always loose
the database rules when I copy or import data (i.e. primary keys, identity,
default values, etc.). Any ideas or tips to keep the database and rules
intact?

TIA - Rob

"Anith Sen" <an***@bizdatasolutions.com> wrote in message
news:iy*****************@newsread3.news.atl.earthl ink.net...
You can do this by either detaching, renaming & attaching the database files with a different name or you can backup the database & restore it as a
different name. For smaller databases, you can even do the Copy database
wizard which can create a copy of the database with a different name.

Please refer to SQL Server Books Online for details on any of these
approaches and check the following MSKB links :
http://support.microsoft.com/default.aspx?kbid=314546
http://support.microsoft.com/default...cid=kb;q224071

--
- Anith
( Please reply to newsgroups only )

Jul 20 '05 #3
"Rob Wahmann" <ro*@dotcomstudio.biz> wrote in message news:<H0****************@newssvr26.news.prodigy.co m>...
Thanks for the reply! I can copy with a number of methods but I always loose
the database rules when I copy or import data (i.e. primary keys, identity,
default values, etc.). Any ideas or tips to keep the database and rules
intact?

TIA - Rob

"Anith Sen" <an***@bizdatasolutions.com> wrote in message
news:iy*****************@newsread3.news.atl.earthl ink.net...
You can do this by either detaching, renaming & attaching the database

files
with a different name or you can backup the database & restore it as a
different name. For smaller databases, you can even do the Copy database
wizard which can create a copy of the database with a different name.

Please refer to SQL Server Books Online for details on any of these
approaches and check the following MSKB links :
http://support.microsoft.com/default.aspx?kbid=314546
http://support.microsoft.com/default...cid=kb;q224071

--
- Anith
( Please reply to newsgroups only )


You shouldn't lose anything if you use backup/restore or
detach/attach, as they don't make any changes within the database.
Backup/restore has the advantage that the source database is always
online during the process.

Simon
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Dave | last post by:
Hi folks I know just enough about MS-SQL to be dangerous, so feel free to warn me off this it's too much for a non-expert. We are using SQL 2000 as the back-end for website. We would like to...
1
by: Trent | last post by:
Hello, I was wondering if anyone here could help with a Quest Central issue. I have two different hosts listed in Quest Central. Each host has a database on it, but the databases have the...
3
by: deko | last post by:
I'm using Access 2003 on WinXP-SP2. I open mydb.mdb from Windows Explorer, or from a shortcut that points to the mdb. The problem is every time I open mydb.mdb, a duplicate is created -...
3
by: Hai Nguyen | last post by:
Hi all I was attempting to insert multiple row by using a loop into a database.A table has 2 primary keys and one regular field (PR) (PR) ID Project Ans 1 2 a 1 ...
4
by: Martyn Fewtrell | last post by:
Hi there I am just canvassing some opinions so feel free to add yours. I mainly work with VB.Net on dynamic websites driven by Access and have more recently been trying to introduce Business...
0
by: B.N.Prabhu | last post by:
Hi, I have a DataTable with several rows. Its having 20 Columns. when i click the Insert button then i have to check the Database Rows. Whether these new rows are already available in the...
4
by: azura | last post by:
how i want to check if there is duplicate entry in my database?? i insert new record which is the same record that i had inserted before,it successfull insert into the database..i don't want that.....
0
by: ElArZ | last post by:
Hi, I have an application that inserts data to a sql server db when it receives input. The problem is that i see many duplicate entries in the table. I have checked my code and it shouldn't do...
1
by: lion cave | last post by:
Hello! Good day! I have a problem regarding to my MSSQL db. I have a database name named db1 with huge structure of tables and has a series of data also. I would like to copy the db1 to the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.