Viewing 15 posts - 4,336 through 4,350 (of 7,613 total)
Yep, exactly. It sounds like some type of certification q too, where because MS mentions "restricted" in BOL or some other help, you're supposed to remember it exactly 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".
April 8, 2016 at 2:37 pm
GonnaCatchIT (4/8/2016)
We run re-indexing and update statistics on daily basis
Is that really necessary? Do you re-index all tables or just those that really need it? Hopefully you don't...
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, 2016 at 8:26 am
If the incoming data is sorted in clustering key order, you can add an:
ORDER ( { column [ ASC | DESC ] } [ ,... n ] )
clause to 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".
April 7, 2016 at 5:20 pm
Add another temp table to hold the Project & Packages you want to list. Then run the SELECT below.
Btw, you should add a clustering key to the #DateHr table...
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 7, 2016 at 2:24 pm
Not sure which ClientId column is in Temp_Client, so change if needed:
SELECT [AssigneeID]
FROM [dbo].Assignee
LEFT OUTER JOIN Temp_Client ON Clientid = Client_ID
WHERE @clientid = 'ALL' OR Temp_Client.Clientid IS 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".
April 7, 2016 at 10:01 am
CREATE TRIGGER %%
ON ALL SERVER
WITH EXECUTE AS 'sa'
AFTER
CREATE_TABLE,ALTER_TABLE,DROP_TABLE,CREATE_VIEW, ALTER_VIEW, DROP_VIEW
, CREATE_FUNCTION, ALTER_FUNCTION, DROP_FUNCTION
, CREATE_PROCEDURE, ALTER_PROCEDURE, DROP_PROCEDURE
AS
SET ANSI_PADDING ON;
SET ANSI_WARNINGS ON;
SET ARITHABORT ON;
SET CONCAT_NULL_YIELDS_NULL ON;
SET NOCOUNT ON;
SET NUMERIC_ROUNDABORT...
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 7, 2016 at 9:57 am
DesNorton (4/6/2016)
Hi Scott
This is certainly fast, with similar I/O to the other solutions, but very low CPU numbers. However, I am unable to wrap my head around the math...
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, 2016 at 12:25 pm
Rather than using a gui, use a SQL RESTORE command to do the restore. Then the new files can be specified using the "WITH" clause.
And here's a function I...
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, 2016 at 9:21 am
I think you can use the (old) view "sysusers", "WHERE isaliased = 1" to find any aliases.
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 5, 2016 at 4:07 pm
Another possibility is to leave the main table alone, and create a separate table to hold the partial partids to match on. Use a trigger on the main table...
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 5, 2016 at 3:35 pm
MS provides tablediff.exe for free. It works ... but it is a command-line tool and, like bcp, takes a bit of time/work to get used to and get it...
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 5, 2016 at 2:31 pm
No, a stop / start of SQL Server will not cause an identity value to go down. Your code must be resetting it for that to happen.
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 5, 2016 at 2:04 pm
Yes, creating a non-clustered index on the clus index column(s) can indeed help performance for certain queries. It's a valid thing to do when that situation exists.
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 5, 2016 at 9:57 am
You could also consider using an A/B table approach. That is, the nightly load goes into a different table name. When the load process is complete, either 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".
April 1, 2016 at 10:24 am
Most likely a LOOP join will be used. That is not guaranteed, of course, but it is likely.
If you want to be sure what join algorithm will be used,...
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 1, 2016 at 10:18 am
Viewing 15 posts - 4,336 through 4,350 (of 7,613 total)