Viewing 15 posts - 586 through 600 (of 1,193 total)
When you use variables in the predicate like that, SQL Server generates an execution plan with cardinality estimates based on the average number of rows per value across the entire...
February 17, 2016 at 1:41 pm
Those two queries are not logically equivalent.
The first restricts the rows involved to rows with a TrnType of 'S' and a LotJob of '0000337495', and then performs the aggregation (which...
February 17, 2016 at 9:30 am
Compare the actual execution plans for the executions on each server. That will point you to the difference. Without doing that it's all (educated) guessing 🙂 If you would like...
February 17, 2016 at 8:31 am
There are a couple ways.
Specific for this problem, the equivalent column in sys.dm_os_sys_memory (total_physical_memory_kb) has not changed between those versions, so for 2008+ you could pull that information from that...
February 17, 2016 at 8:21 am
Something like this?
CREATE TABLE #test (ID int, some_date datetime);
INSERT INTO #test (ID,some_date) VALUES
(1,'20150607'),
(2,'20140609'),
(3,'20160203');
SELECT *
FROM #test
WHERE some_date>=DATEADD(yy,DATEDIFF(yy,0,GETDATE())-1,0)
AND
...
February 15, 2016 at 2:32 pm
Most likely the jobs are not actually running, so there is nothing to be killed.
I've run into this in the past where a job is started, and while the job...
February 13, 2016 at 9:32 am
It does nothing anymore 🙂
http://www.sqlskills.com/blogs/paul/dbcc-pintable/
Cheers!
EDIT: Additionally, if powers that be want word from someone other than Paul, it's mentioned by MS as well.
From https://technet.microsoft.com/en-us/library/ms178015(v=sql.90).aspx:
This functionality was introduced for performance...
February 12, 2016 at 1:52 pm
Luis Cazares (2/12/2016)
Jacob Wilkins (2/12/2016)
SELECT [OrderNumber]=OrderID,
[User]=x.[User]
FROM dbo.Orders CROSS...
February 12, 2016 at 10:04 am
No need to use window functions. A simple CROSS APPLY will do the trick.
SELECT [OrderNumber]=OrderID,
[User]=x.[User]
FROM dbo.Orders CROSS APPLY (SELECT [User]=EnteredBy
...
February 12, 2016 at 9:39 am
Eh, the "starting at" didn't strike me as that odd, since that's the same language Agent job schedules use.
Also, if we're trying to read the question exactly, it didn't...
February 12, 2016 at 9:23 am
It's because of the CHAR(2).
SQL Server has to convert @EndYear to an integer to do the math, and then convert the result to CHAR(2) as you request. As pointed...
February 11, 2016 at 4:36 pm
Glad I could help!
If it helps, here's that string constructed step-by-step (all of it assuming your FROM clause):
Step 1:
SELECT 'EXEC sp_helptext '+ss.name+'.'+so.name+';'
That generates the EXEC sp_helptext for every schema.object, but...
February 11, 2016 at 10:59 am
I vaguely remember there being some issues like this where certificates for some assemblies are trying to be verified, and it's trying to reach out over the internet to verify;...
February 11, 2016 at 10:22 am
It's at least all documented, whatever we may think of the terminology :-).
At https://msdn.microsoft.com/en-us/library/ms191291.aspx, it shows in the SQL Server Permissions chart that ALTER SCHEMA implies ALTER OBJECT, and https://technet.microsoft.com/en-us/library/ms189612(v=sql.105).aspx...
February 11, 2016 at 10:10 am
Viewing 15 posts - 586 through 600 (of 1,193 total)