Viewing 15 posts - 3,841 through 3,855 (of 7,191 total)
I think what Jeff is getting at, and I agree, is that you shouldn't necessary use the first solution you're given. Mark himself admitted that it's "quick and dirty"...
September 20, 2013 at 1:10 am
I've got a feeling the free space only tells you what's in the data file. Have you tried sp_spaceused?
John
September 19, 2013 at 9:02 am
The database size in the database properties window includes the log file size.
John
September 19, 2013 at 8:52 am
The only thing I can think of is to use the percent_complete column of sys.dm_exec_requests. You'll want to test to find out how accurate and reliable it is.
John
September 19, 2013 at 4:03 am
September 19, 2013 at 3:54 am
Jim
Truncating the log only removes none, some or all of the entries from it; it doesn't shrink it. You should consider backing up your log instead of truncating it,...
September 17, 2013 at 9:51 am
If you're using SQL Server 2000, it's more difficult. You have to use sysdatabases instead of sys.databases. Read the documentation about that and you'll see that the status...
September 4, 2013 at 9:30 am
No, you're not. FinMonth is an integer. Here's the proof from your original post:
[FinMonth] [int]
And here's what you're trying to do with it:
WHEN finmonth BETWEEN '2013-02-25' AND '2013-03-26'...
September 4, 2013 at 9:24 am
This is how you define the FinMonth column in #tempterminations, and therefore it's always going to be an integer between 1 and 12:
Datepart(mm, terminatedate) AS FinMonth
All you need to...
September 4, 2013 at 5:22 am
Please can we see your whole INSERT statement? I don't understand why, if you're inserting into FinMonth, you're testing for the value that's already there. Also, FinMonth is...
September 4, 2013 at 4:57 am
Something like this?
-- This uses a temp table, so if there's any chance
-- your session will close before you're finished,
-- use a permanent table instead.
-- You'll need to make it...
September 4, 2013 at 4:03 am
Do you only get this error after 6:30 pm? Are you a member of sysadmin on the server? If you are, there should be no reason you can't...
September 3, 2013 at 8:22 am
I've seen a lot of religious discussions about naming conventions. My advice would be to search this site and others and weigh up the pros and cons of each...
September 3, 2013 at 5:47 am
Hugo Kornelis (9/3/2013)
I had a look at the plans. Apparently the optimization steps I described were recently introduced. Your plans are in fact identical (I'll get to the extra...
September 3, 2013 at 5:39 am
Hugo
I'm on SQL Server 2008 R2 SP2. I ran both queries as a single batch, so there's a single execution plan, making it easy to compare them at a...
September 3, 2013 at 4:59 am
Viewing 15 posts - 3,841 through 3,855 (of 7,191 total)