日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

oracle 用户禁止登录,[转] oracle限制用户在某个时间段内禁止登录数据库

發布時間:2025/3/15 数据库 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oracle 用户禁止登录,[转] oracle限制用户在某个时间段内禁止登录数据库 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

原文: http://blog.itpub.net/29371470/viewspace-1081319/ [oracle@rhel ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Sat Feb 8 12:51:15 2014 Copyright (c) 1982, 2010, Oracle.? All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> create user lsq identified by lsq; User created. SQL> grant connect, resource to lsq; Grant succeeded. SQL> conn lsq/lsq Connected. SQL> disc Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> conn / as sysdba Connected. SQL> CREATE OR REPLACE TRIGGER limit_connection ? 2?????? AFTER LOGON ON DATABASE ? 3??? BEGIN ? 4?????? IF USER = 'LSQ' THEN ? 5????????? IF to_number(TO_CHAR (SYSDATE, 'hh24')) BETWEEN 8 AND 22 ? 6????????? THEN ? 7???????????? RAISE_APPLICATION_ERROR(-20998,' Dear user '||USER||'! You can''t login between 08 and 22'); ? 8????????? END IF; ? 9?????? END IF; 10?? END limit_connection; 11?? / Trigger created. SQL> select to_char(sysdate,'hh24') from dual; TO -- 12 SQL> conn lsq/lsq ERROR: ORA-00604: error occurred at recursive SQL level 1 ORA-20998:? Dear user LSQ! You can't login between 08 and 22 ORA-06512: at line 5 Warning: You are no longer connected to ORACLE.

總結

以上是生活随笔為你收集整理的oracle 用户禁止登录,[转] oracle限制用户在某个时间段内禁止登录数据库的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。