Friday, February 24, 2012

creating a blank verion of the database

Hi all,
I need to create a blank version of my database. That is, all tabes are
empty ready for input. But also copy acroos all the triggers and sp's. This
on the same SQL server.
The purpose, is that I neede a completely fresh start for testing purposes
with different departments
Whats the best way to achieve this.
Thanks
RobertOne way is to generate DDL script from a database:
http://www.karaszi.com/SQLServer/in...rate_script.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Robert Bravery" <me@.u.com> wrote in message news:OCT9QLMWGHA.3800@.TK2MSFTNGP03.phx.gbl...[
color=darkred]
> Hi all,
> I need to create a blank version of my database. That is, all tabes are
> empty ready for input. But also copy acroos all the triggers and sp's. Thi
s
> on the same SQL server.
> The purpose, is that I neede a completely fresh start for testing purposes
> with different departments
> Whats the best way to achieve this.
> Thanks
> Robert
>[/color]|||if you're on SQL 2000, right click on your database, select all tasks
-> generate SQL script, then click show all, then go nuts with the
checkboxes, tick everything. This should give you a script that when
you run it will create a new database (so you'll have to change the
name it creates the db as if you're using the same server
Cheers
Will|||Script the database and execute the script for another database name.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--|||Obtain the full script for all the object bearing on mind the collation and
go on.
--
Please post DDL, DCL and DML statements as well as any error message in
order to understand better your request. It''s hard to provide information
without seeing the code. location: Alicante (ES)
"Jens" wrote:

> Script the database and execute the script for another database name.
> HTH, Jens Suessmeyer.
> --
> http://www.sqlserver2005.de
> --
>

No comments:

Post a Comment