使用Oracle阻止过程PL/SQL [英] Block procedure PL/SQL with Oracle

查看:104
本文介绍了使用Oracle阻止过程PL/SQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个过程,我希望只有一个用户可以同时执行此过程.

I have a procedure and I would like that only one user could execute this procedure at same time.

推荐答案

这只是我的脑海:考虑通过dbms_lock使用命名锁. http://download.oracle.com/docs /cd/B28359_01/appdev.111/b28419/d_lock.htm#CHDICHDC

This is just off the top of my head: Consider using a named lock via dbms_lock. http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/d_lock.htm#CHDICHDC

begin语句获得锁之后,立即进行工作,然后在释放它 退出(请记住错误/异常!).

Right after the begin statement get the lock, do the work, then release it on exit (Keep errors/exceptions in mind!).

KT

这篇关于使用Oracle阻止过程PL/SQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆