Viewing 15 posts - 61 through 75 (of 99 total)
SqlGuru... who, me? I was just illustrating the approach (I didn't declare/init @whatever, either). And yeah, use error trapping. I've used similar code in the past and it didn't appear...
January 15, 2010 at 7:33 pm
To gregory.anderson-- this is a dumb question, but no cursors are involved anywhere in this process, right? You said
...first, gathers statistics based on the type of requests that come through...
January 15, 2010 at 6:06 pm
I think this'll give you the same result with a lot less work:
declare @Foo table (drive char(1),mbfree int)
INSERT INTO @Foo EXEC master..xp_fixeddrives
IF @@rowcount = 26
SELECT...
November 17, 2009 at 4:33 pm
I was seeing objects in a db that were in user schemas and it took a bit to figure out why. It happened when they were not explicitly using "dbo"...
November 5, 2009 at 11:52 am
Jack Corbett (10/7/2009)
Jeff Moden (10/7/2009)
Excellent tip/reminder on the "next day" thing, Jack.
Thanks. I used to be a BETWEEN guy, but about a year ago I had a discussion here...
October 22, 2009 at 11:17 am
I thought the OP was trying to resolve a spid = -1; I poked around online and the only references to -1 spid were dealing with SQL 6.5(!)
As far as...
October 19, 2009 at 4:43 pm
This repeats tracy's post a bit, but what the heck.
Both of these require Database Mail. You send the email to a defined SQL Operator; An operator CAN be a domain...
September 24, 2009 at 4:08 pm
Followup and another question. We've installed SSAS 2008R2 on a test box and I've started fiddling with it but I don't see any differences that look like "big" differences. The...
September 22, 2009 at 3:14 pm
You need to tell the user the status of a job (sql job name is known) that was kicked off at a known date and time. Unless there's something else...
September 16, 2009 at 12:33 pm
Re <>
It was only a matter of time....
When a co worker sent this to me I replied with
However it was found that when suitable security and data...
September 16, 2009 at 10:40 am
Your elapsed minutes calculation is wrong (plug in an elapsed time exceeding 1 hour to see). Change old to new as shown below
--old
--cast(datediff(ss,BS.backup_start_date,BS.backup_finish_date)/60 as varchar(10))
--new
cast((datediff(ss,BS.backup_start_date,BS.backup_finish_date)/60) - (datediff(ss,BS.backup_start_date,BS.backup_finish_date)/3600) *...
September 16, 2009 at 10:25 am
There's probably a better way to do this, but this should get you started. Use COLLATEs on the temp table create if needed. Probably should add an index on the...
September 14, 2009 at 11:44 am
50 deadlocks over a weekend is not insane. (It's not terrific, but not insane)
You realize you can now (>=SQL2005) trap deadlocks in your TSQL with a try/catch (hereafter TC) block,...
September 10, 2009 at 10:21 am
Please post the table definitions and the code that copies a to b
September 9, 2009 at 2:24 pm
I do something similar-- but I do it daily. I don't try to restore/backup on UNCs since that can be slow and there can be reliability issues.
(I don't think linked...
September 3, 2009 at 12:20 pm
Viewing 15 posts - 61 through 75 (of 99 total)