Posts tagged as:

database

Slow SQL Queries

December 2, 2009

Here is a query that works with SQL 2005 to pull the top 100 slowest queries of a database: SELECT TOP 100 [Object_Name] = object_name(st.objectid), creation_time, last_execution_time, total_cpu_time = total_worker_time / 1000, avg_cpu_time = (total_worker_time / execution_count) / 1000, min_cpu_time = min_worker_time / 1000, max_cpu_time = max_worker_time / 1000, last_cpu_time = last_worker_time / 1000, total_time_elapsed [...]

Continue reading –>

Thoughts on SQL Injections

August 26, 2009

Prevention 1.    Sanitize user input. It’s absolutely vital to sanitize user input to insure that it does not contain dangerous code. If the field is for a zip code in the US then it only needs to accept numbers. Even further US zip codes do not exceed 10 numbers so why even bother giving the [...]

Continue reading –>

Import a SQL Trace to a Table

August 3, 2009

How to import a SQL Trace file (.trc) into a table for easy querying and sorting.

Continue reading –>

© Agrypnia.com 2007-2010. All Rights Reserved.

Theme powered by Thesis.