Monday, March 19, 2012

How can I make a "template" of my database?

I have a situation where my database might be deleted every so oftern and I
would like to find a way to "import" sort of a "blank template" of the
original database. Is there a way to do this?
I realize that I could have my program code just create another database,
but that's kind of a hastle, so I was looking for an easier way.
res0gyio@.verizon.netIn Enterprise Manager, right click on the database, all tasks - Generate
script - then select the appropiate options you would like (I addtion to
selecting all your tables on the first tab, I suggest Indexs & defaults on
the last tab)
Mo
"michaaal" <res0gyio@.verizon.net> wrote in message
news:uBiT7mwCEHA.1600@.tk2msftngp13.phx.gbl...
> I have a situation where my database might be deleted every so oftern and
I
> would like to find a way to "import" sort of a "blank template" of the
> original database. Is there a way to do this?
> I realize that I could have my program code just create another database,
> but that's kind of a hastle, so I was looking for an easier way.
> res0gyio@.verizon.net
>|||Almost forgot to mention, you can run the script in Query Analyzer to
re-structure your databases (it'll also wipe it out first if you selected
the "drop table" option while creating the script)
Mo
"michaaal" <res0gyio@.verizon.net> wrote in message
news:uBiT7mwCEHA.1600@.tk2msftngp13.phx.gbl...
> I have a situation where my database might be deleted every so oftern and
I
> would like to find a way to "import" sort of a "blank template" of the
> original database. Is there a way to do this?
> I realize that I could have my program code just create another database,
> but that's kind of a hastle, so I was looking for an easier way.
> res0gyio@.verizon.net
>|||A lots of tools and options to generate DDL scripts:
http://www.karaszi.com/sqlserver/in...rate_script.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"michaaal" <res0gyio@.verizon.net> wrote in message
news:uBiT7mwCEHA.1600@.tk2msftngp13.phx.gbl...
> I have a situation where my database might be deleted every so oftern and
I
> would like to find a way to "import" sort of a "blank template" of the
> original database. Is there a way to do this?
> I realize that I could have my program code just create another database,
> but that's kind of a hastle, so I was looking for an easier way.
> res0gyio@.verizon.net
>

No comments:

Post a Comment