April 21, 2008 at 8:32 am
I have an application that is currently running in VB & there is a project running to convert them to C#. This application will create databases in SQL Server 2000 & 2005 while the database name is passed as a parameter by the end user.
The users are complaining that database & objects (database, table, constraints, indexes created from a single script) in them are taking about 40 minutes to complete which I think is a huge amount of time. Is there a way to tune them or have a model of database shipped with the installation & use them as a template to copy/attach those databases?
Usually each database would grow upto 4GB to 8 GB in size but initially would be created with no data.
Any suggestions is appreciated.
Thanks,
April 21, 2008 at 8:56 am
Do you create each object separately? I used to have scripts for database, tables, procedures and other objects separately. Running them never took more than 30 seconds.
Piotr
...and your only reply is slàinte mhath
April 21, 2008 at 10:20 am
No. Its a single script, a single click at the front end would trigger a script to create database & all objects.
It has around 2000 objects table, indexes, functions, stored procedures, triggers, data types, etc., & database create script.
And, having 2000 plus script as a separate files would be difficult to maintain?
Thanks
April 21, 2008 at 10:23 am
Well, my database was much smaller.
How long does it take to run de script in SSMS?
Multiple scripts - it was easier for me, but you may have other idea - probably as good as mine 🙂
Piotr
...and your only reply is slàinte mhath
March 10, 2010 at 4:02 am
If you have created database's script from SSMS you could have enclosed starting file size i.e. 8GB.
It takes time for SQL Server to allocate big data file on physical storage. I know that creation of 4-8GB does not take 40 minutes but it could be additional factor which slows down whole process.
Cheers
Bartek
March 11, 2010 at 11:24 am
40 Mins for 8Gb. I'd take a long hard look at the server Disk I/Os and other issues like AV interference with SQL function. 40 Mins is crazy time.
AMO AMAS AMATIT AGAIN
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply