skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
thalysjuvenal/advpl-specialist53 installs

protheus-locks-deadlocks

Use when the user needs to understand, diagnose, or prevent Protheus record locks and deadlocks -- covering RecLock/MsUnlock/SoftLock/LockByName semantics, BeginTran/EndTran transaction scoping, lock leak and deadlock diagnostics (TopMemoStatus, MonitorActiveLocks, DBAccess monitor, SQL Server/PostgreSQL/Oracle lock queries), and prevention patterns (BEGIN SEQUENCE/RECOVER, lock ordering). Also triggers on Portuguese phrasing like "registro travado", "trava de registro", "deadlock", "erro de lock", "travamento no Protheus", "quem esta travando o registro", or "RecLock nao libera".

How do I install this agent skill?

npx skills add https://github.com/thalysjuvenal/advpl-specialist --skill protheus-locks-deadlocks
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    The skill provides comprehensive technical documentation and code patterns for managing record locks and deadlocks in the TOTVS Protheus environment. It includes SQL diagnostic queries for SQL Server, PostgreSQL, and Oracle, along with ADVPL code templates for safe transaction handling. The administrative commands and file-writing snippets provided are standard practices for developers and administrators within this platform and are presented with appropriate usage context and warnings.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

What does this agent skill do?

Protheus Locks & Deadlocks

This skill documents the Protheus hybrid locking model -- record-level Workarea locks (RecLock/MsUnlock) coordinated by DBAccess on top of the underlying RDBMS (PostgreSQL, MSSQL, Oracle) -- and how to diagnose and prevent the lock leaks, contention, and deadlocks that are among the most common production issues. It covers lock API semantics (RecLock, MsUnlock/MsUnlockAll, SoftLock, LockByName, TCSqlExec, BeginTran/EndTran/DisarmTransaction), safe transaction scoping with BEGIN SEQUENCE/RECOVER, and live diagnostic procedures per database engine.

Activate this skill when the user reports a "Record locked by user XYZ" error, needs to investigate performance degradation under concurrent load, is writing or reviewing code that locks records, or is designing a batch job over large data sets where lock ordering matters. It does not cover query design or %nolock% usage in Embedded SQL (see query-builder), general runtime/performance debugging unrelated to locking (see advpl-debugging), or BeginSQL/EndSQL macro syntax (see embedded-sql).

Reference fileRead when
reference.mdAlways -- lock types table, core lock/transaction APIs, when-to-use guidance
patterns-prevention.mdWriting or refactoring code that locks records -- BEGIN SEQUENCE/RECOVER, SoftLock, transaction scoping, lock ordering rules
diagnostics.mdInvestigating live lock contention or deadlocks -- TopMemoStatus, MonitorActiveLocks, DBAccess monitor, engine-specific SQL lock queries

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/thalysjuvenal/advpl-specialist/protheus-locks-deadlocks">View protheus-locks-deadlocks on skillZs</a>