Viewing 15 posts - 16 through 30 (of 129 total)
bopeavy (7/12/2011)
What is the purpose of doing this?
If you don't do it then you can't restore your production databases to a consistent state.
As it is impossible to backup multiple databases...
July 12, 2011 at 2:47 pm
Another solution to my original problem (unit testing t-sql - continuing after expected error)
I am surprised this works really - a more reliable check for sql server to make would...
November 19, 2010 at 5:28 am
something like
if (xact_state() = 0) begin
begin tran
set @towner = 1
end--if
if (xact_state() <> 0 and @towner = 1) begin
rollback tran
end--if
November 18, 2010 at 4:56 am
why should SELECT be immune from deadlocks?
even a SELECT from a single table can get deadlocked due to multiple indexes involved
(if index access is in different order)
two connections issuing "select...
November 18, 2010 at 4:41 am
ok
I understand now
any pain would be felt by a rebuild
but as my archiving is mostly in sequence anyway - even rebuilds won't be badly affected
The question that remains is whether...
October 25, 2010 at 5:48 am
I am positive that a clustered index defines the physical order of rows
from BOL:
Creates an index in which the logical order of the key values determines the physical order of...
October 22, 2010 at 3:34 pm
george sibbald (10/17/2010)
Kimberly tripp has a series of articles on log files. This is maybe related to vlf size?start here: http://www.sqlskills.com/BLOGS/KIMBERLY/post/Transaction-Log-VLFs-too-many-or-too-few.aspx
I am ashamed to admit this database had "autoshrink" enabled...
October 17, 2010 at 1:40 pm
If you don't want SQLServer to cache query plan add "OPTION(RECOMPILE)" to the end of your query!
oh yes
exec sp_executesql N'select getdate() option (recompile)'
that works nicely 🙂
but not this:
exec sp_executesql N'select...
August 12, 2010 at 10:33 am
I'd like to know how the server handles large quantities of distinct SQL statements with SP_EXECUTESQL
seems to me that all those cached plans will end up pushing out plans that...
August 12, 2010 at 8:29 am
2. The difference between GRANT SELECT and GRANT EXECUTE is huge:
While first permission allows only select from table/view, GRANT EXECUTE allows exeuting procedure which can perform SELECT and INSERT/UPDATE/DELETE if...
August 12, 2010 at 5:17 am
create some helper functions:
public static string SqlName(string name) {
return "[" + name.Replace("]", "]]") + "]";
}//method
public static string SqlString(string name) {
return "'" + name.Replace("'", "''") + "'";
}//method
if you're building...
August 12, 2010 at 3:26 am
cached query plans are not always good
if they are not reused they waste resources
and if they are dependent on parameters they are worse than compiling fresh
but if you are going...
August 11, 2010 at 10:10 am
Steve Jones - Editor (7/25/2010)
I fail to see how read locks to a temp table or to a user are substantially different
[edit]
ok I see where I am going wrong now...
July 25, 2010 at 12:29 pm
giving users SELECT access opens a big can of worms
related to read locks interfering with normal OLTP operations
I either give them access via stored procedure (that releases locks asap by...
July 25, 2010 at 10:56 am
I had a look at that ebook on defensive programming and the first thing I read was shocking:
ALTER PROCEDURE dbo.SetEmployeeManager
@EmployeeID INT ,
@ManagerID INT
AS
SET NOCOUNT ON ;
UPDATE dbo.Employee
SET ...
July 25, 2010 at 1:31 am
Viewing 15 posts - 16 through 30 (of 129 total)