Categories
Dynamics NAV Microsoft SQL Server

ALTER DATABASE failed because a lock could not be placed on database

ALTER DATABASE failed because a lock could not be placed on database ‘{DatabaseName}’. Try again later.

Cause:
One or more processes regarding {DatabaseName}, also in sleeping status, are blocking your query

Solution:
Execute
[sourcecode lang=”sql”]EXEC sp_who2 –or sp_who[/sourcecode]
to know the list of SPIDs’ processes where DBName is {DatabaseName}
then execute the following command for each of them to kill these processes
[sourcecode lang=”sql”]KILL {SPIDNumber} –e.g. KILL 55[/sourcecode]

Now finally you can execute your query to ALTER the database.

Did my solution solve your problem? Leave a reply.

Categories
Dynamics NAV Microsoft SQL Server

TableData 2000000001 does not exist.

—————————
Microsoft Dynamics NAV Development Environment
—————————
TableData 2000000001 does not exist.
—————————
OK
—————————

TableData 2000000001 does not exist.

TableData 2000000001 does not exist.

Cause:
You’re trying to open a database using Microsoft Dynamics NAV Development Environment but the user hasn’t the Role Member db_owner for the database in SQL.

Solution:
Grand the user to db owner using SQL Server Management Studio.

db_owner

Related Post: TableData does not exist

Did my solution solve your problem? Leave a reply.