Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Capture Time

Author  Topic 

nguyenl
Posting Yak Master

128 Posts

Posted - 2008-09-03 : 18:14:28
Hi,

I am using the SQL 2005 Import\Export wizard. I was wondering if there was a way to time how long a process takes.

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-03 : 18:33:30
You could schedule it as a job and then check the job history.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-04 : 01:04:00
another method is to use a ssis package and use a log table and use getdate() function to get time involved. there will be two steps one before and one after your required step. the first step puts a record into log table as

INSERT INTO Your_Log (Step,Time)
SELECT 'Step Started',GETDATE()


followed by your step and finally

INSERT INTO Your_Log (Step,Time)
SELECT 'Step Completed',GETDATE()



now you can use datediff between these two dates to find time taken. you can also use ID value of package to identify the start and end records of particular run.
Go to Top of Page
   

- Advertisement -