Hi,
Now, when I run a report sometimes I get error table xxx is locked; and it terminates.
Do we have any method in Nav; where we can check if a table is currently locked? then we can set wait until it unlocks ?
*This post is locked for comments
I tried the locktable but it doesn't work. I set the wait to true, and expect the report will wait but still run time error
you could run jatin's code using ADO in c/al.
for that follow my blog post moxie4nav.wordpress.com/.../executing-sql-select-statement-in-cal
Hi,
thanks for your reply: but I see the below question still pending.
Honestly, I haven't because I was wondering if there is a way of doing something like:
How I can do below task ?
IF table_is_locked THEN
skip_posting
ELSE
insert_record
Thank you!
But I need somethings that I can embedded in my report. Because when our users run the report, they cannot run script and check. I want the report to check and response correspondingly
Hi,
Here is a script to identify locked tables in the SQL Server.
SELECT
OBJECT_NAME(p.OBJECT_ID) AS TableName,
resource_type, resource_description
FROM sys.dm_tran_locks l
JOIN sys.partitions p ON l.resource_associated_entity_id = p.hobt_id
When you run above script, it will display table name and lock on it.
Sohail Ahmed
2
mmv
2
Amol Salvi
2