SQL deadlock problem

I am currently having a big issue with sql deadlocking on the 
PrincipalObjectAccess table. 

The last few months I have been working on a synchronization process using a 
Biztalk orchestration. The sync uses the crm webservices to create and update 
account and contact records in CRM. But now deployment to the production 
environment gives me some problems. It seems that when trying to update 
account records (which is one of the first actions in the sync process) the 
webservice gives me Generic SQL errors and SQL timeouts. After extensive 
profiling and tracing in SQL I found that there are two sql statements that 
are been called several times involving the PrincipalObjectAccess table 
(something to do with getting the account.owner and checking for inherited 
access). After going through this cycle several times the webservices throws 
the sql exception.  Tracing determined that there are deadlocks occuring on 
the PrincipalObjectAccess table. When continuing the syncing process 
eventually the worker thread crashes.

Some more info:
The CRM webclient seems to be working fine with updating and creating. 
Rollup 2 was installed but did not solve the problem. 
Development and test environment does not have this problem, but also does 
not have security roles in place. The account used for synchronizing has a 
administrator role. 
When skipping account updates, the next entity synced is contact. The same 
problem occurs here.. Other entities seem to sync ok ( when the worker thread 
did not crash before..)

Any ideas on where to look for solutions?
0
Daisy (15)
9/10/2007 6:46:01 AM
crm 35858 articles. 1 followers. Follow

3 Replies
690 Views

Similar Articles

[PageSpeed] 34

Just wondering if you have any callouts registered with the account
that actually use SQL to change the account permission directly from
the PrincipalObjectAccess table. If so, remove the callouts to see if
you are getting the same issue.

Darren Liu
Crowe
http://www.crowecrm.com

On Sep 10, 1:46 am, Daisy <Da...@discussions.microsoft.com> wrote:
> I am currently having a big issue with sql deadlocking on the
> PrincipalObjectAccess table.
>
> The last few months I have been working on a synchronization process using a
> Biztalk orchestration. The sync uses the crm webservices to create and update
> account and contact records in CRM. But now deployment to the production
> environment gives me some problems. It seems that when trying to update
> account records (which is one of the first actions in the sync process) the
> webservice gives me Generic SQL errors and SQL timeouts. After extensive
> profiling and tracing in SQL I found that there are two sql statements that
> are been called several times involving the PrincipalObjectAccess table
> (something to do with getting the account.owner and checking for inherited
> access). After going through this cycle several times the webservices throws
> the sql exception.  Tracing determined that there are deadlocks occuring on
> the PrincipalObjectAccess table. When continuing the syncing process
> eventually the worker thread crashes.
>
> Some more info:
> The CRM webclient seems to be working fine with updating and creating.
> Rollup 2 was installed but did not solve the problem.
> Development and test environment does not have this problem, but also does
> not have security roles in place. The account used for synchronizing has a
> administrator role.
> When skipping account updates, the next entity synced is contact. The same
> problem occurs here.. Other entities seem to sync ok ( when the worker thread
> did not crash before..)
>
> Any ideas on where to look for solutions?


0
Darren
9/10/2007 3:47:48 PM
no, I do not have such callouts. 
I do have callouts registered but if that was the problem I would expect the 
webclient to have issues as well. But in any case I tried synchronizing with 
the callouts turned off and this did nog help either. 

Any other ideas?

"Darren Liu" wrote:

> Just wondering if you have any callouts registered with the account
> that actually use SQL to change the account permission directly from
> the PrincipalObjectAccess table. If so, remove the callouts to see if
> you are getting the same issue.
> 
> Darren Liu
> Crowe
> http://www.crowecrm.com

0
Utf
9/12/2007 6:48:00 AM
I looked into my problem further.

It seems I am having issues with the crm webservice only. When I try to use 
the webservice to set the parentaccount of an account to null I am getting 
sql time outs exceptions. It seems sql deadlocks on the principalobjectaccess 
table and gets into a loop requesting and updateing values..

Using the crm web client I can set and unset the parentaccount without any 
problems although it also seems a bit slow. 



Any help is appreciated!
0
Utf
9/17/2007 2:34:05 PM
Reply:

Similar Artilces:

Here is fix for Windows file problems
If you have installed a Windows update and started having problems opening, closing, copying files, see: http://www.microsoft.com/communities/newsgroups/list/en-us/default.aspx?dg=microsoft.public.excel.misc&mid=1fe358b1-c8eb-4217-ad2a-4b9fcf741916 ...

Excel problem, File disappeared.
I created a file in Excel on a WinXP PC that I called pron.xls and saved it in the my documents folder, I then decided to move it and using Windows Commander F6 key (Rename and Move) I attempted to move it to a different folder and rename it to prn.xls at the same time. This process caused the file to disappear!! I now realise that this was because prn.xls is an invalid name. I tried to search for the original and new names but neither existed. There is no sign of it in the recycle bin either. Is there anyway of retreiving the lost data? Steve Barrowcliff As far as I'm aware no....

Problems with Outlook hanging (possibly CRM1.2 problem)
Hi, Apologies for the cross posting, but I'm not sure which is th ebest newsgroup to help... I'm Running a server with SBS 2003 & exchange. Installed CRM1.2 (at the moment it's only on the server & I can access via the web). I've not yet installed the Outlook client on my laptop. The problem is that I've been experiencing major "hangup" problems when connecting my laptop to the server. Everything works fine until I open up Outlook, then, although I an "ping" the server I am unable to access it either from Outlook to synchronise emails, ...

sort problems
Using Publisher 2000 and mail merge - large input excel files - sort sequence is crucial but does not hold. Doing a 20K pice mailing and addresses print out in basically no sequence at all - I've broken database down to 2000 names at a time - it will print 10 in sequence, skip 20, print 10 in sequence, skip 10 then eventually goes back and randomly picks up skipped addresses. I know the file is sorted going in. With mailings this big, this is a MAJOR problem. Anyone know what's happening here. How to solve? Help from Ed Bennett, MVP Adjust the Mail Merge Batch Size. There is ...

Query Problems
I have a table of ecards that is populated from a website and includes receiver, sender, and Team leader. The problem I am having is names can be entered into the table like this "Tom Thumb", but Team leader is a dropdown menu that is constant and lists name like this: "Tom S. Thumb". When I make a query to find all the members of Tom S. Thumb's team, I get everyone except Tom Thumb, who is member too. Tom Thumb has his own higher team leader, so I can't change that. How do I get Tom Thumb to be included when I enter "Tom S. Thumb" as Team Leader? ...

Outlook 2003 viewing problem
We are using Outlook 2003 from the Small Business Edition 2003 software, we have wireless router for our LAN and the modem connected to the router. We have 7 PCs in the Office. The problem is only on one computer, the user is receiving emails from people outside OK, but emails sent internally is another matter. Internal emails although they seem to be being received because the sound alert for new messages happens, but then the message doesn't display in any of the mail boxes. Also sending email from that PC to another internal PC on the LAN is not working. I have checked the ru...

Windows update site problems
So whats happening with the windows update site ?I keep getting a message telling me there is a problem with the web page (am trying to update new installation of XP Home),is it me or the site,and when will it be sorted out? -- Be happy,Strat4axe "stat4axe" <strat4axe@hotmail.com(donotspam)> wrote in message news:36618CFD-EF82-4F82-A7C3-90CF2DDCCEA5@microsoft.com... > So whats happening with the windows update site ?I keep getting a message > telling me there is a problem with the web page (am trying to update new > installation of XP Home),is it me o...

Strange Problem when closing the database object
Hi All, I have a COM component using which is interacting with the database using the CDAODATABASE class. my applications works fine when i built it with VS6. when i built the application with VS2005, the application is suddently unloaded when i am trying to close the database. my database object is CDaoDatabase *m_DB; when my application calls the following method the component is getting unloaded. STDMETHODIMP CFeatureTable::Close() { AFX_MANAGE_STATE(AfxGetStaticModuleState()) HRESULT hRes = S_OK; if (!m_Initialized) return S_OK; TRY_DAO { // Nee...

Too many problems while updating information online
Several of my accounts are unable to update information online using MS Money 2007 Deluxe - ING Direct - Bestbuy Card (HSBC) - MBNA - Bank of America This is frustrating!! Anyone else with the same problems? Just keep trying, eventually it will work. If you're in a bind, download the QIF or OFX files from the institutions web sites -- B of A works better that way anyway :) Paul McKenna <Paul McKenna@discussions.microsoft.com> wrote: >Several of my accounts are unable to update information online using MS Money >2007 Deluxe > >- ING Direct >- Bestbuy Card (HSBC...

Outlook client connect to exchange server 5.5 problem
Outlook client connect to exchange server 5.5, i get the following message box: "The name could not be resolved. The connection to the microsoft exchange server is unavailable. All other clients are able to connect and resolve the mailbox name. I can't ping and resolve the exchange server from the problems outlook client. The problems occur after i run repair the w2k pro. can anyone help? EL can not ping... well start with basic IP testing. use ipconfig /all from a command prompt on the misconfigured client. Check for DHCP default Gateway - make sure it looks like a client t...

Access 97 to 2000 conversion problems 08-08-03
I am trying to convert an Access 97 database to Access 2000 but with great difficulty. If I try to load it in Access 2000, the conversion is attempted but on the apparent completion the new database is not saved and the screen is blank. If I try creating a new database and importing everything then this works fine for the data, but no reports or forms are imported. I have tried all the latest patches to MS Office. Any suggestions would be very welcome. ...

FileCopy Problem
I'm using this to copy a file...but it keeps turning red. FileCopy ('\\Backoffice\Data.mdb', '\\Backoffice\Trash') I'm copying Data.mdb to the Trash folder. Gotta be the syntax. Thanks DS Several things appear to be incorrect. First, FileCopy doesn't accept parentheses. Second, \\Backoffice\Data.mdb isn't a valid UNC (you're missing either the server name or the share name) Third, you need a complete file for the destination, not just a folder name. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "DS" &l...

IPicture: problem with transparent
Hello, I have a Win32 project that uses the IPicture class. Here is how I load the picture: OleLoadPicturePath (path, 0, 0, 0x00ffffff, IID_IPicture, (LPVOID *) &pic); everything is fine accept this: the 4th parameter in that function is the color that should be transparent when rendering but it doesn't work. I have a totally white picture and still it draws it. I read in MSDN that only Metafiles and icons can be transparent but even when i made an icon picture it still wasn't transparent. I also confirmed that the picture had the transparent attribute using pic->Get_Attribu...

Outlook 2003 Folder & Favorite-folder synch/update problems
I've been using Outlook since 1998 and I make my living at software support, so I'm usually hard to stump, but I'm sucking wind on this one. The problems below all started on the remote Outlook copy, so I have to imagine they're connected to the remote setup and OST files. But I've been through the settings and tried to re-synch, cleared the folder store and recreated it, etc., and nothing seems to correct the problems. Can anyone suggest a systematic way to diagnose and fix what's happening? Here's the story: I'm running Outlook 2003 (all current patches: ...

Amazing Problem in AllocPhysMem wince 6.0
Hi I am writing a Port Driver for x86 platform in WinCE 6.0. I want to allocate virtual and equivalent physical memory in driver and mapped it to USER mode to use application. For that I used AllocPhysMem in driver and passed that address through IOCTL calls but i cant use that virtual and physical address in application side. Because AllocPhysMem returns Error Code as 0x57 (meaning Parameter incorrect). But the same code is working in WinCe 5.0. My code snippet is, VirAddress = (LPVOID)AllocPhysMem(32, PAGE_READWRITE|PAGE_NOCACHE, 0, ...

SQL Server Reporting Services Reports in Access
Using Access 2007 and SQL Server 2008. Is there a way to display SQL Server Reporting Services reports in Access 2007? If so, links to documentation/examples would be appreciated. -- AG Email: npATadhdataDOTcom Hi AG, No,there is no compatible interface for converting SSRS report to Access 2007 now.You may consider first export your SSRS report to an Excel file and then embed an OLE object "Microsoft Office Excel 97-2003 Worksheet". If you only need the data, you can directly import data from Excel to your Access database. Best regards, Charles Wa...

Mismatched Memory -- could this be my problem?
Could mismatched memory modules be the reason why my computer freezes up with some programs? The SIW utility tells me that my two memory modules don't seem to be matched. One is DDR and the other is DDR2. The specs for my ABIT KU8 motherboard call for DDR, not DDR2, if that makes a difference. Here is what the ISW utility shows? MEMORY SUMMARY Maximum Capacity 1024 MBytes Maximum Memory Module Size 4096 Memory Slots 2 Error Correction None DRAM Frequency 163.6 MHz <--- should be 200.07? Memory Timings 3-3-3-7 (CL-RCD-RP-RAS) CAPACITY Slot1 1536MB <--- wrong for K...

Averaging cell's...problems with Div/0
Hi guys. First time poster here so be gentle with me. I am looking fo some assistance averaging a range of 1 to 3 numbers. Here is what I have so far. =(D3+F3+H3)/(IF(C3=0,0,1)+IF(E3=0,0,1)+IF(G3=0,0,1)) This works great. What it does is checks to see if there is a value i the cell, then counts it and divides by the right number. I.E if yo only have two values out of 3 filled in it divides the number by tw instead of 3. My problem... if all 3 fields are 0 then I get a divide by 0 error. Any suggestion on how to fix this? I don't want my spreadsheet to loo messy before I start plu...

Analysis Cuber SQL server 2005 on GP 10.0 Spanish version
Hello, I'm trying to install Analysis Cubes Server SQL server 2005 on a Microsoft Dynamics GP 10.0 with a Latin American version. But the problem is that when i execute this installer, an error saying that I don't have the GP client installed pops up. I'm starting to think that Latin American version is not supported for installing Analysis Cubes. Please help me, i want to know the answer for this question. Thank you. Jose PD: Here is a picture of the mistake (http://cid-7eefbf21ce96c3be.skydrive.live.com/self.aspx/P%c3%bablico/AnalysisCubes.bmp) Open the Windows Registry ...

Login problem to CRM 3.0
Hi, I installed CRM 3.0 Professional Edition without any error. I can login perfectly from the CRM server either using http://localhost:5555/ or http://appserver:5555/ under the crmadmin user. If I login to an XP workstation with the same user (crmadmin) and specify http://appserver:5555/ in IE6, I got a login window - where I enter the correct DOMAINNAME\crmadmin username and password - and got the following message: "You are not authorized to view this page"..."HTTP Error 401.1 - Unauthorized... I think the prolem is around IIS security, but what shoud be the next step. Th...

Upgrading from Great Plains 7 (SQL) to Great Plains 8
When upgrading from Great Plains 7 to Great Plains 8 will all dexterity and other supported customizations be persisted? I would doubt it since some there were changes in some of the tables. I know that some of our customized reports, specifically Purchase Orders and most of the documents in Sales Order Processing that we customized had to be redone. "GaryG" wrote: > When upgrading from Great Plains 7 to Great Plains 8 will all dexterity and > other supported customizations be persisted? Hi If you have had any bespoke work added to your v7 GP, you will need to up...

Extender problem with GP 10
Hi all, I setup a Dynamics GP 10 system for a customer. The system is used from HRM staff. I used Extender to add a number of extender windows and detail windows. On the Sever all users can access the extender windows but when they login on a separate terminal server (with a client installation) the Extender windows are not accessible. Only the Extender Detail Windows can be seen. When trying to go to the windows all users including sa get the following message: "Not all required fields have been entered for the window <window name>." I went in the extender and opened ...

upload form problem / server question
www.icingpictures.co.uk / win xp / frontpage 2003 Want to create a form with upload file form field - i read on this forum that the server type i use is important - it should be a windows type server with frontpage extensions - i currently use a linux server with front page extensions - do i need to change to a windows server? Thanks for taking a looka t my question. Joyce Yes, you must have a Windows Server, just like you stated you read. -- Tom [Pepper] Willett Microsoft MVP - FrontPage Since 1997 --------------------------- "threademporium" <threademporiu...

outllook 2003 icon problem
I upgraded from outlook 2000 to outlook 2003. My Desktop Icon is the old 2000 icon however all other icons are the new 2003 icon. How can I change my desktop to be the new icon? On Fri, 28 Jan 2005 22:05:36 -0800, "Andre Monostori" <techguy@dslextreme.com> wrote: >I upgraded from outlook 2000 to outlook 2003. My Desktop Icon is the old >2000 icon however all other icons are the new 2003 icon. How can I change >my desktop to be the new icon? > Have you tried deleting it and creating a new one? -- <<<SgtRich>>> Email Client: Microsoft Offi...

Editing more than 1 table at a time with SQL.
Say I have two tables in a DB called TABLE1, and TABLE2. TABLE1 [IDNUMBER] [FIRSTNAME] 1 Ryan 2 Jennifer 3 Monica TABLE2 [IDNUMBER] [LASTNAME] 1 Johnson 2 Snipes 3 Smith My question is would I be able to use SQL in code to Edit, Delete or Insert data to both tables in one string rather than one table at a time? For instance what if I want to change both tables with a [IDNUMBER] = 2 to a [IDNUMBER] = 4, OR change the ...