SQL SERVER - 2005 - Last Ran Query - Recently Ran Query

Posted by: Journey to SQL Authority with Pinal Dave, on 03 Jan 2008 | View original | Bookmarked: 0 time(s)

How many times we have wondered what were the last few queries ran on SQL Server? Following quick script demonstrates last ran query along with the time it was executed on SQL Server 2005.SELECT deqs.last_execution_time AS [Time], dest.text AS [Query]FROM sys.dm_exec_query_stats AS deqsCROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS destORDER BY deqs.last_execution_time DESCReference : Pinal Dave (http://www.SQLAuthority.com), BOL [...]...

Category: SQL | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 907 | Hits: 144

Similar Posts

  • Migrating to Postgresql with my friend NHibernate more
  • SQL SERVER Recently Executed T-SQL Query more
  • Adding users to a TFS project when youre not on the domain more
  • Deleting All Records In a Table EXCEPT For the N Most Recently Added Records more
  • Serialising Microsoft StreamInsight QueryTemplates more
  • An alternative to Crystal more
  • Caching Key Generation Considerations more
  • Checking for EF to TSQL Query Compilation Changes in VS2010 Beta1 more
  • An FAQ about EF/Astoria/LINQ to SQL: Is the data filtered on the server or on the client? more
  • Streaming Random Numbers for Effective Filtering more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD