Viewing 15 posts - 1 through 15 (of 309 total)
If you use sp_whoisactive @get_locks=1
you might be able to see exactly what resources the tasks are waiting for.
This might give you a hint to what is happening.
/SG
November 30, 2015 at 5:43 am
I have previously tested this on SQL2014 and SQL2016 CTP2
I just made the same test on SQL2016 CTP3.
It seems like they have fixed this issue in CTP3. It is now...
November 19, 2015 at 5:44 am
The problem went away when we installed CU4.
http://support.microsoft.com/kb/2845380
See this thread for more info:
http://www.sqlservercentral.com/Forums/Topic1415833-2799-1.aspx
Good luck!
September 27, 2013 at 2:13 am
Renuka__ (8/30/2013)
I was trying to avoid complex queries too; however, inner Select query in the UPDATE statement returns multiple domain names, so it returns 'subquery...
August 30, 2013 at 5:56 am
I took your sample code, and cleaned it up a bit.
This is the solution I came up with:
set nocount on
CREATE TABLE #Course (
CourseID CHAR(7)
);
CREATE TABLE #Prereq (
NextCourseID CHAR(7),
RequiresCourseID CHAR(7)
);
INSERT INTO...
August 28, 2013 at 6:32 am
No need for anything fancy.
This should work:
update Table2
set Domain = isnull((select Domain from Table1 t1 where t1.ServerName = Table2.ServerName), 'Unknown')
August 28, 2013 at 5:59 am
Something like this perhaps:
select
cpr,
attendance_date,
trans_in = max(case when trans_type='I' then 'In' end),
trans_out = max(case when trans_type='O' then 'Out' end),
from Table
group by cpr, attendance_date
August 28, 2013 at 3:49 am
scott.kitson (8/19/2013)
VALUES (1,DEPT), (2,MARKET_SEGMENT), (3,APPROVAL), (4,USER_FIELD_BL2), (5,USER_FIELD_BL4), (6,USER_FIELD_BL6), (7,USER_FIELD_UD1), (8,USER_FIELD_UD2), (9,USER_FIELD_UD3),
(10,USER_FIELD_UD4), (11,USER_FIELD_UD5),...
August 20, 2013 at 4:47 am
Colin Davidson (8/19/2013)
I thought you would be able to work out the easy part
select ' select softwaremanufacturer,productname,productversion' as c1
union
select ' ,'+c.name as c1
from syscolumns c inner join sysobjects o...
August 19, 2013 at 2:42 am
In these cases with complicated code that takes different kinds of locks and you have problems with deadlocks it might be a good idea to explicitly take an application lock...
August 19, 2013 at 2:27 am
You can use this:
use tempdb
go
if object_id('dbo.newtable') is not null drop table dbo.newtable
go
create table dbo.newtable (
endeffectivedate int,
starteffectivedate int,
softwaremanufacturer int,
productname int,
productversion int
)
go
declare @sql varchar(max)
select
@sql =
'select softwaremanufacturer,productname,productversion' + (
select ','+quotename(name)
from sys.columns...
August 19, 2013 at 1:14 am
It is still very hard to understand what you want, but I will take a guess.
I assume the following tables:
use tempdb
go
create table EmployeeDetails (
EmpID int not null,
IsDeleted bit not...
August 16, 2013 at 7:45 am
Using a function for this calculation seems like an excellent idea.
I rewrote Christy's code as an inline table-valued function for speed. I also replaced some repeated expressions with a couple...
August 16, 2013 at 4:53 am
Please post full table definitions. It is very hard to follow your written explanation.
For example, I find it difficult to understand which table has the IsDeleted column - or if...
August 16, 2013 at 2:16 am
Viewing 15 posts - 1 through 15 (of 309 total)