Viewing 15 posts - 5,506 through 5,520 (of 7,619 total)
Eirikur Eiriksson (1/6/2015)
ScottPletcher (1/6/2015)
Jeff Moden (1/4/2015)
asita (1/3/2015)
Nolock is ignore the locks (please ignore it)
Trust me Dhani, we know what it does and folks in-the-know can't just ignore it. It's...
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".
January 6, 2015 at 2:07 pm
I agree, NEVER use the GUIs for backups and restores. For one thing, you have no record of what was done, whereas a script can be enhanced over time.
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".
January 6, 2015 at 1:17 pm
For a table that size, and esp. one that apparently static, I'd make sure the statistics were based on the entire table rather than just a small sampling.
You can see...
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".
January 6, 2015 at 1:10 pm
Jeff Moden (1/4/2015)
asita (1/3/2015)
Nolock is ignore the locks (please ignore it)
Trust me Dhani, we know what it does and folks in-the-know can't just ignore it. It's normally a bad...
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".
January 6, 2015 at 12:51 pm
------------------------------------------------------------------------------------------------------------------------
--declare temp tables and variables
IF OBJECT_ID('tempdb.dbo.#sql') IS NOT NULL
DROP TABLE #sql
CREATE TABLE #sql (
ident int IDENTITY(1, 1) NOT NULL,
...
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".
January 6, 2015 at 10:15 am
I'd probably generate dynamic SQL in this case, as it's much clearer to me. Sample below. I'm sure it will need tweaked but it should give you enough...
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".
January 5, 2015 at 4:12 pm
GilaMonster (12/31/2014)
Luis Cazares (12/30/2014)
Yes, it's possible, but I wouldn't advice on using decimals on calculations as it's easy to get it wrong.
It's also far less clear than a DATEADD for...
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".
January 2, 2015 at 1:02 am
CELKO (12/30/2014)
Besides begin better than anything you can write, the vendor will maintain it and the vendor will be legally responsible if anything goes wrong.
Bull! I'm telling 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".
December 30, 2014 at 3:56 pm
Jeff Moden (12/30/2014)
What a lot of folks also miss is that you can add and subtract formatted times as constants instead of jumping through multiple datepart hoops, as well.
...
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".
December 30, 2014 at 3:52 pm
sgmunson (12/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".
December 30, 2014 at 2:45 pm
Don't believe there is a command/query that can see that directly from SQL Server.
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".
December 30, 2014 at 2:43 pm
Charles Kincaid (12/22/2014)
The only other reason that I can see for something like this is since the Datetime format uses a singed integer for the date portion that there might...
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".
December 30, 2014 at 9:10 am
_simon_ (12/30/2014)
@ScottPletcher - I tried it now and it seems that both clustered and nonclustered indexes are running for about the same time.
Keep in mind that using the clustered index...
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".
December 30, 2014 at 8:57 am
Btw, either add 1222 setting directly to the start-up flags or add it to a start-up proc. Otherwise you'll lose that flag setting when SQL stops and restarts.
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".
December 30, 2014 at 8:51 am
Jeff Moden (12/29/2014)
Phil Factor (12/29/2014)
We use only the 2 part name and let the synonyms do the rest of the work. Do you know of a way to do 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".
December 30, 2014 at 8:46 am
Viewing 15 posts - 5,506 through 5,520 (of 7,619 total)