If I wanted to create another database with the exact same structure of our
current database, MINUS the data...is there an easy/quick way to do this?
If there's an automated way to "reset" the Identity fields as well, that
would be nice, but I could do that relatively quickly.just script the entire database out of Enterprise Manager.
(Right click on the DB and choose "all Tasks"..."Generate Script"
there are a few options you'll need to choose in the dialog (script all
objects, script database, script object level permissions, etc). after a few
tries, you'll be an old pro.
Greg Jackson
PDX, Oregon|||> (Right click on the DB and choose "all Tasks"..."Generate Script"
> there are a few options you'll need to choose in the dialog (script all
> objects, script database, script object level permissions, etc). after a
few
> tries, you'll be an old pro.
Thanks for the help. I ran through this process and "scripted" everything.
When I looked at the *.sql file it generates, it looks like it would drop my
current database and completely erase it essentially. This isn't what I'm
looking for. I want to create a new database with the exact same structure,
but the last thing I want to do is drop our current one.|||Use DTS...
Choose the "Copy objects and data between SQL Server databases"
Here is the key... on the next screen, uncheck "Copy Data"
"James" <letyoudown@.verizon.net> wrote in message
news:ej$kp2pdFHA.3880@.tk2msftngp13.phx.gbl...
> > (Right click on the DB and choose "all Tasks"..."Generate Script"
> >
> > there are a few options you'll need to choose in the dialog (script all
> > objects, script database, script object level permissions, etc). after a
> few
> > tries, you'll be an old pro.
> Thanks for the help. I ran through this process and "scripted"
everything.
> When I looked at the *.sql file it generates, it looks like it would drop
my
> current database and completely erase it essentially. This isn't what I'm
> looking for. I want to create a new database with the exact same
structure,
> but the last thing I want to do is drop our current one.
>|||Just uncheck the "drop existing" box in the script generation dialog, then
edit the db create line in the script, so it contains the new name.
"James" wrote:
> > (Right click on the DB and choose "all Tasks"..."Generate Script"
> >
> > there are a few options you'll need to choose in the dialog (script all
> > objects, script database, script object level permissions, etc). after a
> few
> > tries, you'll be an old pro.
> Thanks for the help. I ran through this process and "scripted" everything.
> When I looked at the *.sql file it generates, it looks like it would drop my
> current database and completely erase it essentially. This isn't what I'm
> looking for. I want to create a new database with the exact same structure,
> but the last thing I want to do is drop our current one.
>
>|||Thank you all...worked just fine. I just get nervous about doing anything
where one checked/unchecked box could cost me a ton of time restoring a
backup.|||yes you need to be careful....
you didnt see the fine print in my first post ?
:-)
Greg Jackson
PDX, Oregon
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment