Viewing 15 posts - 4,276 through 4,290 (of 7,619 total)
Jeff Moden (6/15/2016)
Sergiy (6/15/2016)
The only correct answer would be a question in response.
Probably, more that one question in response.
Until your requirements...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 16, 2016 at 7:42 am
I agree, definitely save, truncate and (re)load.
Btw, you should very likely change the clustered index on the table to insert datetime if it's currently based on an identity column. ...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 15, 2016 at 3:17 pm
I'd use separate dbs rather than separate schemas. We are client-based as well, and some of our clients demand that their data is isolated from the data of all...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 15, 2016 at 3:11 pm
Eric M Russell (6/15/2016)
Jeff Moden (6/14/2016)
Eric M Russell (6/14/2016)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 15, 2016 at 9:40 am
It's my understanding -- although I can't construct code right now that confirms it -- that:
SET LOCK_TIMEOUT
can cause that type of behavior. I had faith in that claim because...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 14, 2016 at 2:06 pm
Sean Lange (6/14/2016)
ScottPletcher (6/14/2016)
In autocommit mode, when can an UPDATE statement partially complete, some UPDATEs made, some not, where SQL does not roll it back?...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 14, 2016 at 1:47 pm
My advanced knowledge, "tricky" q is:
In autocommit mode, when can an UPDATE statement partially complete, some UPDATEs made, some not, where SQL does not roll it back?
Edit: And...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 14, 2016 at 1:35 pm
Maybe this:
insert into #mailing
(segment
,contact_number)
select @mailing + RIGHT('0' + CAST(base_value + row_num AS varchar(2)), 2)
,AccountNumber
from (
select distinct AccountNumber, ROW_NUMBER() over(order by AccountNumber) as row_num
...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 14, 2016 at 8:31 am
I'd make a slight adjustment, since I prefer to check conditions as near to the source as possible, and it might even be slightly more efficient:
SELECT X1,
...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 14, 2016 at 6:59 am
Eric M Russell (6/9/2016)
Sean Lange (6/9/2016)
Eric M Russell (6/9/2016)
patrickmcginnis59 10839 (6/9/2016)
Eric M Russell (6/7/2016)
Luis Cazares (6/7/2016)
This is what happens when you trust a...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 10, 2016 at 2:02 pm
GSquared (6/9/2016)
Sean Lange (6/7/2016)
Jeff Moden (6/7/2016)
Eric M Russell (6/7/2016)
They're asking the wrong type of questions for a job interview.
I think it's a great question. It shows whether or not...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 9, 2016 at 12:17 pm
SQL Server has built-in performance reports that could help you here.
Using SSMS, for the instance that contains the db having the problem:
1) right-click on the instance name
2) select "Reports"
3) select...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 8, 2016 at 12:50 pm
With just a quick look, I'd do something like below. I tried to follow your naming style, naturally change as needed.
Since we can't guarantee unique ProductNumbers across companies, we'll...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 3, 2016 at 11:45 am
Dennis Q Miller (6/1/2016)
Stacey Decker (10/30/2014)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 1, 2016 at 10:53 am
The best clustered index is almost always the single most critical performance factor for a table. You could gain some mild efficiencies looking at other things, but a far,...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
June 1, 2016 at 8:01 am
Viewing 15 posts - 4,276 through 4,290 (of 7,619 total)