Options

The operation could not complete because a record in the Company table was locked by another user

TallyHoTallyHo Member Posts: 396
edited 2019-08-08 in NAV Three Tier
Hi,

Using BC140, pretty much standard configuration.
I'm busy importing a company into a database using Import-NAVData in powershell.
The importing came to a halt because of a time-out was reported from the sql server.

Now, when I check the company's in my database, I can see the newly imported company is there.
But, I want to remove it, because I do not trust it. (Importing came to a halt due to an error).

Now, every action I perform returns the same error:
'The operation could not complete because a record in the Company table was locked by another user. Please retry the activity.'

I tried:
Servicetier restart
Compiling the companytable as admin with force
Remove-NAVCompany -CompanyName TheCompany -Force -ForceImmediateDataDeletion -ServerInstance BC140
Sync-NAV tenant -Force
Starting the RTC (does not wok

The SQL database is on a server. I cannot rely on a backup (it is not a 'real' problem, because it is a test database).

But, I'd like to know is there anyway to fix this without drastic measures? In case it happens in a live situation.

Some powershell or SQL command perhaps?

Help is appreciated!

Sign In or Register to comment.