473,473 Members | 1,614 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Creating Test Database

I need to create a test database on the live server for performance testing.
From time to time, as structural modifications are made to the live
database, I'd like to be able to delete the test database and replace it
with a new copy of the live database. Is there a simple way to do this with
a script or other? Thanks!
Nov 13 '07 #1
4 2754
I'd go for backup and restore. When you do the restore, specify a different database name and use
the MOVE option of the RESTORE command to specify new database file names.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Neil" <no****@nospam.netwrote in message news:EA******************@newssvr23.news.prodigy.n et...
>I need to create a test database on the live server for performance testing. From time to time, as
structural modifications are made to the live database, I'd like to be able to delete the test
database and replace it with a new copy of the live database. Is there a simple way to do this with
a script or other? Thanks!
Nov 13 '07 #2
And if there's an existing db with that name, it will overwrite it entirely?

"Tibor Karaszi" <ti***************************@hotmail.nomail.comw rote in
message news:F4**********************************@microsof t.com...
I'd go for backup and restore. When you do the restore, specify a
different database name and use the MOVE option of the RESTORE command to
specify new database file names.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Neil" <no****@nospam.netwrote in message
news:EA******************@newssvr23.news.prodigy.n et...
>>I need to create a test database on the live server for performance
testing. From time to time, as structural modifications are made to the
live database, I'd like to be able to delete the test database and replace
it with a new copy of the live database. Is there a simple way to do this
with a script or other? Thanks!

Nov 13 '07 #3
Neil (no****@nospam.net) writes:
And if there's an existing db with that name, it will overwrite it
entirely?
Yes. I always use the REPLACE option together the MOVE as suggested by
Tibor.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Nov 13 '07 #4
Thanks to both of you!

"Erland Sommarskog" <es****@sommarskog.sewrote in message
news:Xn**********************@127.0.0.1...
Neil (no****@nospam.net) writes:
>And if there's an existing db with that name, it will overwrite it
entirely?

Yes. I always use the REPLACE option together the MOVE as suggested by
Tibor.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx

Nov 14 '07 #5

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

Similar topics

12
by: mr_burns | last post by:
hi, i have recently used a system (oscommerce store) where you can backup your database. what happens is that when you click 'backup database', it creates an SQL string, stores it in a text file...
6
by: Dim St Thomas | last post by:
I am a developer working on a database client program. I am testing this program on a Windows XP machine (1.5 GHz AMD chip, 480 Mb RAM, 60 Gb disk) This machine has Oracle 9.2.0.1.0 and RedBrick...
0
by: MLH | last post by:
I used the following SQL to create a new table in a database on a remote MySQL server by copying one already there. I know the table exists SOMEWHERE in cyberspace. I can read its data, write to...
3
by: Robin Tucker | last post by:
Hi there, I have a database on my test machine that will need to be installed on users machines. I would like to create the database with the given schema on the users machine and also with...
4
by: Tony | last post by:
G'day My attempt to create an MDE file was unsuccessful. The attempt produced an error that effectively said the (MDB) file was to big. The MDB consists of about 30 tables, 50 forms and 3...
3
by: NWx | last post by:
Hi, I write an ASP,NET application who uses SQL Server (MSDE) as Back-end I'm an experienced developer, but haven't used SQL server before and I need some help. Since I don't have full SQL...
1
by: kaens | last post by:
So, I have a class that has to retrieve some data from either xml or an sql database. This isn't a problem, but I was thinking "hey, it would be cool if I could just not define the functions for...
3
by: dieselfuelonly | last post by:
<?php //Connect to the database and select the data from the table $username="asdfasdf"; $password="asdfasdf"; $database="asdfasdf"; mysql_connect(localhost,$username,$password);...
9
by: =?Utf-8?B?YmJn?= | last post by:
Hi all, I read somewhere "using kernel stuff in thread is not good.." if ManualResetEvent object is created in thread but not actually used, will it affect performance? Bob
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.