SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Database Create from Application (VB & C#)


Database Create from Application (VB & C#)

Author
Message
RJ-476420
RJ-476420
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2362 Visits: 769
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,
Piotr.Rodak
Piotr.Rodak
SSCarpal Tunnel
SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)

Group: General Forum Members
Points: 4602 Visits: 1761
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
RJ-476420
RJ-476420
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2362 Visits: 769
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
Piotr.Rodak
Piotr.Rodak
SSCarpal Tunnel
SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)SSCarpal Tunnel (4.6K reputation)

Group: General Forum Members
Points: 4602 Visits: 1761
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 Smile

Piotr

...and your only reply is slàinte mhath
b.ozga
b.ozga
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1073 Visits: 1243
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
chapterthirteen
chapterthirteen
SSC Veteran
SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)SSC Veteran (211 reputation)

Group: General Forum Members
Points: 211 Visits: 70
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search