SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 index Exection time not Capturing the from query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kond.mohan
Posting Yak Master

India
140 Posts

Posted - 07/27/2012 :  01:42:42  Show Profile  Reply with Quote
Dear all

we have designed SSIS (Sql server 2008 r2) Packages.Pkg has Designed

1.truncate all tables using Execute Sql Task( inside task using Stored Procedure )

2. truncate all ReportTables using Execute Sql Task( inside task using Stored Procedure )

3.Drop Index Container(Sequence Container used here)

inside of this container 10 Execute Sql Tasks are Existing .Each Execute Sql task is calling one Stored procedure.Each Stored procedure is having Droping Existed indexes on tables

After that i am loading the Data next

Create index container(Sequence Container used here)

inside of this container 10 Execute Sql Tasks are Existing .Each Execute Sql task is calling one Stored procedure.Each Stored procedure is having Creating indexes on tables.

here i have Configured Text log file i capturing the data i have Exported the data into my sql server 2008 r2(flat file to oledbdestination)

here we have created Sql query for to find how much time is taking by containers on Everyday At execution

query is fetching the all taskExecution time but

My Query is NOT FETCHING THE CREATE DROP INDEX CONTAINER(tasks) EXECUTION TIME

my query is existed like this

SELECT * FROM(
SELECT MIN(starttime)starttime,MAX(endtime)Endtime,
DATEDIFF(MI,MIN(starttime),MAX(endtime))AS [Time Taken In Minutes],
[SOURCE],CONVERT(varchar,starttime,103)etl_date FROM sysssislog
WHERE
starttime >= '19-JULY-2012' and starttime < '19-JULY-2012'
and [event] in ('OnPreExecute','OnPostExecute')

GROUP BY source, CONVERT(varchar,starttime,103)
)a --where [source] like '%import4%'

--ORDER BY etl_date,[Time Taken In Minutes] desc
union all

SELECT * FROM(
SELECT MIN(starttime)starttime,MAX(endtime)Endtime,DATEDIFF(MI,MIN(starttime),MAX(endtime))AS [Time Taken In Minutes],[SOURCE],CONVERT(varchar,starttime,103)etl_date FROM sysssislog
WHERE
starttime >= '19-JULY-2012' and starttime < '2012-07-19 16:45:33.000'
and [event] in ('OnPreExecute','OnPostExecute')

GROUP BY source, CONVERT(varchar,starttime,103)
)a --where [source] like '%import4%'

ORDER BY --[source],
[Time Taken In Minutes] desc

how to fetch my create and drop index container Execution time from the query

pls guide me

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3328 Posts

Posted - 07/27/2012 :  06:03:33  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
Have you looked to see what data is in the log?

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000