Viewing 15 posts - 5,506 through 5,520 (of 7,613 total)
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
Looks to me like they used 1904 as the base year rather than 1970. That would be quite logical if they needed to show dates before 1970, such as...
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 29, 2014 at 3:23 pm
Easiest might be to add a UNION [ALL] with a "NOT EXISTS" clause. Btw, I don't see any reason to do UNION rather than UNION ALL so I've 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".
December 29, 2014 at 2:45 pm
I think you need to order run_date DESC also, not just time:
ORDER BY h.[run_date] DESC, h.[run_time] DESC
Also, I don't see a need for a separate CTE_Restore_JobHistory2. You can...
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 29, 2014 at 2:16 pm
chip.halsey (12/29/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 29, 2014 at 12:37 pm
Or, more specifically, run these commands:
DBCC TRACEOFF ( 1204, -1 )
DBCC TRACEON ( 1222, -1 )
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 29, 2014 at 12:09 pm
You should make it a clustered index. You should also explicitly specify the appropriate FILLFACTOR and filegroup (even if it's PRIMARY, as that may not be the current default...
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 29, 2014 at 9:29 am
Viewing 15 posts - 5,506 through 5,520 (of 7,613 total)