December 3, 2007 at 11:40 am
Hi,
Im tottaly newbie in SQL 2005 and im asking for some help. I need to create a lot of databases ( more than 200! ) and I want to so a scripct to create they automactly in one shot.
The question is : How can I create a database in a full automated way specifying diferrent databases and log file locations and with AUTO UPDATE STATISTICS, TORN PAGE DETECTION, AUTO SHRTINK and AUTO UPDATE STATISTICS ONLY. Now, i do it manually (click on enterprise manager, right-click database, options and select only this ones )
I have the databases names, their locations to log and databases. If someone can help me to write a script that create a db with this options and in these locations Ill be grateful.
Thx in advance.
Regards
December 3, 2007 at 12:43 pm
Look up CREATE DATABASE in Books Online. This will give you the options and scripts to build a database. Do not use autoclose, autoshrink in your databases. They cause issues.
How do you have a list of names, file paths, etc. for the databases? You need this to drive your script. If you can post some samples so we know you are trying yourself and what you are trying to accomplish, we can help with the details.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply