Viewing 15 posts - 5,221 through 5,235 (of 7,619 total)
Eric Prévost (4/9/2015)
jdbrown239 (4/9/2015)
When the job runs it fails with the error: 'Procedure IndexOptimize, Line 505...
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".
April 9, 2015 at 11:56 am
If the string is within SSMS, you could try adding a backslash to the end of each line to continue the string. For example:
declare @varchar varchar(30)
set @varchar = 'abcdef'
print...
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".
April 9, 2015 at 9:49 am
CELKO (4/8/2015)
I have a column which needs to be 9 digits long.
I gave you a simple LIKE predicate to assure this, as per your request. I thought ...
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".
April 9, 2015 at 9:46 am
CROSS APPLY often works well in these types of lookups:
SELECT *
FROM @vehicle v
CROSS APPLY (
SELECT TOP (1) *
FROM @vehicleclass vc
...
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".
April 9, 2015 at 9:44 am
I think those are also uniqueidentifier columns, so fragmentation is to be expected. Unless you retain lots of backup info in msdb, and I would not recommend that, then...
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".
April 9, 2015 at 9:38 am
I think those are also uniqueidentifier columns, so fragmentation is to be expected. Unless you retain lots of backup info in msdb -- and I would not recommend that...
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".
April 9, 2015 at 9:38 am
You need to review the choice of clustering key; the clustering key is critical to performance, so never be lazy enough to allow the clustering key to default to identity....
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".
April 9, 2015 at 9:33 am
Yes, the index row length will be 20 bytes. That is normal. Since bigint is a fixed-size data type, even if the value is NULL, it will still...
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".
April 9, 2015 at 9:28 am
dwain.c (4/8/2015)
ScottPletcher (4/8/2015)
SELECT cust_id,...
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".
April 8, 2015 at 10:25 pm
I'm not seeing why you can't just use the code below. I'm sure someone can quickly explain the part of the problem that I'm missing :-).
SELECT cust_id,
...
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".
April 8, 2015 at 4:44 pm
I'd expect value -127 to take 2 bytes, since smallint is the smallest data type that can hold that value. Thus, it would still save 2 bytes vs. an...
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".
April 8, 2015 at 4:29 pm
You need to tell SQL how to match the multiple values. A couple of quick examples:
Set @KeywordSearch = 'Platform AND Customer AND Support'
Set @KeywordSearch = 'Platform NEAR Customer NEAR...
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".
April 8, 2015 at 4:26 pm
I would hope combining them into a single transaction with a held lock would prevent that problem:
begin transaction
select @result = Result
from Cache with (rowlock,updlock)
where [Hash] = @hash
-- A
if (@result...
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".
April 8, 2015 at 4:20 pm
If RCSI is on, you wouldn't have any need to use ALLOW_SNAPSHOT_ISOLATION.
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".
April 8, 2015 at 4:13 pm
This would be my only suggestion for an alternative. Don't think it's any better at all, other than that it can handle an input value this is only 4...
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".
April 6, 2015 at 1:54 pm
Viewing 15 posts - 5,221 through 5,235 (of 7,619 total)