WE WELCOME GUEST AUTHORS
Yes, you are most welcome to write a guest post for us. We value content from established SQL authors.
Drop us an email today at admin@sqlservergeeks.com and we will revert back to you.
SQL Server Education (by the geeks, for the geeks)
Yes, you are most welcome to write a guest post for us. We value content from established SQL authors.
Drop us an email today at admin@sqlservergeeks.com and we will revert back to you.
Hi, I dropped a mial regarding blog writing on SSG. But I didnt any reply till yet.
Please tell me how can I start writing blog on SSG
Hi Team,
This is regarding the issue we have been facing from past, we have a server where we have a repeated problem “sql server reporting services is not started” on daily basis.
kindly revert on this asap and do tell me how to solve this.
Thanks in advance!!!!
In stored procedure what are the list of likedserver.databases.schema.tables used . How to find this?
Hello Sir/Mam,
I have two 2008 R2 Servers.
When I Connect those two Servers By Name, I Can Use Replication.
But When I Connect This Two Servers By IP Address, I Can’t Use Replication.
I Get Error Like:
SQL Server Replication Requires The Actual Server Name…..
Is replication possible through IP address in SQL Server 2008 R2?
Is it possible through Server name only ?
Thanks & Regards,
Tarang Rohit
rohittarang@gmail.com
Hello Team,
I am facing Deadlock issue Day by Day and its only because below query , please suggest any solution..
ERROR Log:-
Node:1
PAGE: 7:1:258776 CleanCnt:2 Mode:IX Flags: 0x3
Grant List 1:
Owner:0x0000001F90712B80 Mode: IX Flg:0x40 Ref:0 Life:02000000 SPID:111 ECID:0 XactLockInfo: 0x0000001F09C7ADB8
SPID: 111 ECID: 0 Statement Type: UPDATE Line #: 7
Input Buf: Language Event: Insert into [dbo].W_EstRevSubWork (EstREvID, SubWorkID, Estcost) select ID,41570,0 from [dbo].w_EstRevisions EstRev Where EstRev.ParentId=41121
Requested by:
ResType:LockOwner Stype:’OR’Xdes:0x0000001F92FB63B0 Mode: S SPID:53 BatchID:0 ECID:0 TaskProxy:(0x0000001E04BB2638) Value:0x313663c0 Cost:(0/100)
NULL
Node:2
PAGE: 7:1:231048 CleanCnt:2 Mode:U Flags: 0x3
Grant List 3:
Owner:0x0000001F99447000 Mode: U Flg:0x40 Ref:0 Life:00000001 SPID:53 ECID:0 XactLockInfo: 0x0000001F92FB63E8
SPID: 53 ECID: 0 Statement Type: UPDATE Line #: 7
Input Buf: Language Event: Update [dbo].W_EstRevSubWork Set Estcost = 717951.02 Where ID = 46542
Requested by:
ResType:LockOwner Stype:’OR’Xdes:0x0000001F09C7AD80 Mode: U SPID:111 BatchID:0 ECID:0 TaskProxy:(0x0000001E3A1DC638) Value:0x565276c0 Cost:(0/600)
NULL
Victim Resource Owner:
ResType:LockOwner Stype:’OR’Xdes:0x0000001F92FB63B0 Mode: S SPID:53 BatchID:0 ECID:0 TaskProxy:(0x0000001E04BB2638) Value:0x313663c0 Cost:(0/100)
Deadlock encountered …. Printing deadlock information
Wait-for graph
Query:-
Begin Declare @ID int
Declare @PArentID int
Declare @SrNo int
Declare @EstRevSubWorkID int
Select @ID = ID, @ParentID = PArentID, @SrNo = SrNo, @EstRevSubWorkID = EstRevSubWorkID from [dbo].W_EstItems where ID = 264750;
Update [dbo].W_EstItems set ItemType=4 from [dbo].W_EstItems Itm
Inner join [dbo].W_EstItemsOPT OPT on OPT.ID = Itm.ID
Inner join [dbo].W_EstItemRA RA on RA.ItemID = Itm.ID
Where OPT.ParentID = @ID;
Delete [dbo].W_EstItems from [dbo].W_EstItems Itm
Inner join [dbo].W_EstItemsOPT OPT on OPT.ID = Itm.ID and OPT.ID OPT.PArentID
Where OPT.ParentID = @ID and Itm.ItemType4;
while (isnull(@ID,0) > 0)
BEGIN
If (Select Count(ID) from [dbo].W_EstItems where PArentID = @ID And ItemType4)<=0
Begin
Select @ParentID = PArentID, @SrNo = SrNo from [dbo].W_EstItems where ID = @ID;
delete from [dbo].W_EstItems where ID= @ID And ItemType4;
END
Else
Begin
Update W_EstItems
Set W_EstItems.SrNo = W_EstItems.SrNo -1, W_EstItems.VSrNo = ParentItm.vSrNo + ‘.’ + CAST( W_EstItems.SrNo-1 AS VARCHAR(20))
From W_EstItems
INNER JOIN W_EstItems ParentItm ON W_EstItems.PArentID=ParentItm.ID
Where W_EstItems.ParentID = @ID and W_EstItems.SrNo > @SrNo and W_EstItems.EstRevSubWorkID = @EstRevSubWorkID ;
UPDATE W_EstItems
SET W_EstItems.VSrNo = ParentItm.VSrNo + ‘.’ + CAST( W_EstItems.SrNo AS VARCHAR(20))
FROM W_EstItems
INNER JOIN W_EstItems ParentItm ON W_EstItems.PArentID=ParentItm.ID
WHERE W_EstItems.ID IN (
SELECT ID FROM W_EstItems
WHERE PArentID IN (
SELECT Itm.ID
FROM W_EstItems Itm
INNER JOIN W_EstItems ParItm ON ITM.PArentID=ParItm.ID
WHERE Itm.PArentID = @ID AND Itm.SrNo > @SrNo AND Itm.EstRevSubWorkID = @EstRevSubWorkID
)
);
Break;
End
set @ID = @ParentID;
END
END
Delete [dbo].W_EstItems Where ItemType=4 and EstRevSubWorkID=@EstRevSubWorkID and ID not in (select ItemID from [dbo].W_EstItemRA where ItemID is not null)
Update [dbo].W_EstItems Set ParentID=-1,GrpID=-1 Where ItemType=4 And EstRevSubWorkID=@EstRevSubWorkID
Select @@ROWCOUNT