Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Database Create from Application (VB & C#) Expand / Collapse
Author
Message
Posted Monday, April 21, 2008 8:32 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 1:56 PM
Points: 610, Visits: 720
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,
Post #488003
Posted Monday, April 21, 2008 8:56 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, May 10, 2012 9:49 AM
Points: 800, Visits: 1,759
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
Post #488028
Posted Monday, April 21, 2008 10:20 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 1:56 PM
Points: 610, Visits: 720
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

Post #488091
Posted Monday, April 21, 2008 10:23 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, May 10, 2012 9:49 AM
Points: 800, Visits: 1,759
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
Post #488093
Posted Wednesday, March 10, 2010 4:02 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Friday, November 14, 2014 9:13 AM
Points: 595, Visits: 1,046
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
Post #880066
Posted Thursday, March 11, 2010 11:24 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, June 26, 2014 12:41 AM
Points: 84, Visits: 64
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
Post #881223
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse