Skip to content
Home » Oracle » How to Install USER_LOCK Package

How to Install USER_LOCK Package


USER_LOCK is not a default package of SYS, you need to install it before using it.

SQL> conn / as sysdba
SQL> @?/rdbms/admin/userlock.sql
drop package user_lock
ERROR at line 1:
ORA-04043: object USER_LOCK does not exist

Package created.

Warning: Package Body created with compilation errors.

Synonym created.

Grant succeeded.

The error ORA-04043 is very normal for the first time installation, simply because userlock.sql tries to drop USER_LOCK package before creating a new one for you.

Please note that, Synonym created. means that a public synonym for the package with the same name has been created.

The last Grant succeeded. means that the following privilege has been granted successfully.

grant execute on user_lock to public;

Therefore, you don't have to grant it to PUBLIC again.

Leave a Reply

Your email address will not be published. Required fields are marked *