Showing posts with label pretty. Show all posts
Showing posts with label pretty. Show all posts

Friday, March 30, 2012

Long times for backup

Hi

I am trying to backup a sql server 2005 database of 12GB....It is residing on a windows 2003 server with pretty good configuration. It is taking extremely long time to do the backup...More than 10 mins elapsed but no backups...

Can some one suggest what the problem might be?

Regards

Imtiaz

What is your disk configuration?

Are you backing up to different disks from you the disks your data and log files reside?

I assume you are using a RAID configuration. How many disks are in your RAID arrays?

|||

We have 2 physical disks + 1 SAN

C drive -- Program files -- 12GB

D Drive -- not being used (empty) -- 55 GB

H Drive - (SAN- ATA) - 200 GB

Database files reside on H drive. Instance related infor/ master/model/tempdb databases resides on C: drive.

I am just backing upto H drive. Wehn I tried backing upto H: and D: the backup time was cut to 8 minutes totally...

This is really good but can I have further reduction in backup times.

Also, from this backup I am doing a restore of a different database on a different instance. How can I optimise my restore times also...The restore time is pretty much around 10 mins....

Thanks anyway for the reply.

|||

Without knowing much more about your hardware. To get better performance you need to have more disks in your disk groups/reduce contention in your SAN, increase CPU on your server, increase memory on your server. AS I don't know which one is the bottleneck I can say which one you need to address

You can look at thrid party backup solutions like Redgate SQL Backup and Litespeed from Quest

Wednesday, March 28, 2012

Long Running Query - Only from .NET

I have a pretty complex query that aggregates lots of data and inserts multiple rows of that data into a reporting table. When I call this SPROC from SQL Server Management Studio, it executes in under 3 seconds. When I try to execute the same SPROC using .NET's SqlCommand object the query runs indefinitely until the CommandTimeout is reached.

Why would this SPROC behave differently with the same inputs, but being called from .NET?


Thanks for your help!

Turn on debugging, make sure the query isn't causing exception.

ERic

|||

I am debugging in .Net, I don't get an exception until the Timeout is reached.

|||

I fixed it! It was the return method. I was using 'RETURN @.@.ROWCOUNT' rather than 'SELECT @.@.ROWCOUNT'

Thanks for your help