read and learn
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
SQL Server 2000 <> SSIS
lookup xp_sendmail in BOL
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
' ' as PROJ08
can not be converted to decimal in the bottom query
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
not that i know off, run it after hours if you think something might happen
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
have you tried
EXECUTE sp_cycle_errorlog
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
lookup case in BOL
something like this
case when col2=0 then 0 else col1/col2 end
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
take a look here: How Can I Select Multiple TOP N Data Sets With SQL Server (2000 and earlier)
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
In case you don't believe me
select null * .75
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
so what is 25 percent of NULL? is it N? what about 75% is it NUL?
a percentage of null is NULL period!
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
I am sorry...but it jst too big
here is what you can do
have the proc and the code in 1 window, hit CTRL + K (in query analyzer) then F5
this will execute the code and show you the execution plan graphically
now look where the percentages are the most different focus on that code and post...
start here: http://www.sql-server-performance.com/tips/query_execution_plan_analysis_p1.aspx
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
Post here for a better answer
forum962
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
The one and only The Guru's Guide to Transact-SQL
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
set showplan_text on
--put your code here
set showplan_text of
[code]
set showplan_text on
--exec your proc here
set showplan_text of
[code]
first look at the differences in the plans and then paste the results here
Denis The SQL Menace
--------------------
SQL Server Code,Tips and...
read my previous reply
show the execution plans of both
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
select name from sys.sysdatabases
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
Use this as a workaround for now
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
example 5 might help you
http://www.owasp.org/index.php/Testing_for_SQL_Server
Denis The SQL Menace
--------------------
SQL Server Code,Tips and Tricks, Performance Tuning
SQL Server Programming Hacks
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.