Viewing 15 posts - 4,771 through 4,785 (of 7,619 total)
You're right. I hadn't search thru the Profile settings before, but time zone was in there, and was somehow wrong for my location.
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".
September 28, 2015 at 1:09 pm
NOT EXISTS might also be an option here.
I don't see anything in the original code that indicates that Blocked or Doc Type must match in the CR Log, but naturally...
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".
September 28, 2015 at 1:05 pm
Unfortunately I can't get the files from my web link at work due to internal issues (seemingly neverending!).
Rather than actual partitioning, try clustering the table on CustomerID, start date 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".
September 28, 2015 at 12:36 pm
Not if: (1) you have software assurance on the active node and (2) it is truly passive.
From MS's licensing docs [emphasis added by me]:
"
Beginning with SQL Server 2014, each active...
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".
September 23, 2015 at 3:12 pm
SQL's priority is to use the index with fewer pages, because of less I/O which equal less overhead. Thus, to link FKs to the clustered index, you need to...
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".
September 23, 2015 at 12:30 pm
You would need an explicit transaction. In fact, the ROLLBACK itself will give you an error unless a transaction is active, so even with an explicit trans, you need...
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".
September 22, 2015 at 12:44 pm
SELECT LEFT(column_name, CHARINDEX('_', column_name + '_') - 1) AS before_underscore,
SUBSTRING(column_name, CHARINDEX('_', column_name + '_') + 1, 2000) AS after_underscore
FROM table_name
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".
September 22, 2015 at 12:42 pm
Luis Cazares (9/21/2015)
WayneS (9/21/2015)
Kristen-173977 (9/20/2015)
GilaMonster (9/19/2015)
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".
September 22, 2015 at 8:53 am
This really looks like a trigger. Check for db-level (DDL) triggers. If not, check for server-based triggers (that seems unlikely in this case, though). For example:
SELECT t.*
FROM...
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".
September 21, 2015 at 1:45 pm
SQL provides some help here.
You can use missing index views
sys.dm_db_missing_index*
and the index stats view:
sys.dm_db_index_usage_stats
to help determine what indexes to create.
First and absolutely foremost, you need to determine and implement the...
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".
September 21, 2015 at 10:55 am
If you don't require an nvarchar search, you can use varchar and get 900 chars to search.
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".
September 21, 2015 at 8:28 am
Since you're always searching at the start of the string, you could add a persisted computed column of ~900 bytes and search on that:
ALTER TABLE ourtable
ADD bigcolumn_search AS CAST(LEFT(bigcolumn, 450)...
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".
September 18, 2015 at 4:06 pm
Here's another method to try, just in case:
SELECT
ta.last_name,
ta.first_name,
tb.ID
FROM
TableA ta
INNER...
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".
September 18, 2015 at 2:20 pm
That code is dependent on the DATEFIRST setting, and I don't believe it's accurate anyway. Maybe this?:
--additional dates for testing/verification
INSERT INTO #weekdays (datevalue, numericvalue) VALUES
('20150101', 1000),
('20150102', 1001),
('20150103', 1001),
('20150104', 1001),
('20150105',...
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".
September 17, 2015 at 1:11 pm
The design is basic, but it seems workable for very straightforward messaging.
Just some possibilities, not necessarily better than what you have:
1) I agree with an identity column on the Message...
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".
September 17, 2015 at 12:32 pm
Viewing 15 posts - 4,771 through 4,785 (of 7,619 total)