User access to database within limits of time
来源:互联网 发布:红色警戒mac版下载 编辑:程序博客网 时间:2024/05/01 11:07
C:\Documents and Settings\Administrator>sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 28 14:56:58 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create user kam identified by kam;
User created.
SQL> grant connect, resource to kam;
Grant succeeded.
SQL> conn kam/kam
Connected.
SQL> disc
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
SQL> conn / as sysdba
Connected.
SQL> CREATE OR REPLACE TRIGGER limit_connection
2 AFTER LOGON ON DATABASE
3 BEGIN
4 IF USER = 'KAM' 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
--
23
SQL> conn kam/kam
Connected.
SQL> select to_char(sysdate,'hh24') from dual;
TO
--
18
SQL> conn kam/kam
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-20998: Dear user KAM! You can't login between 08 and 22
ORA-06512: at line 5
Warning: You are no longer connected to ORACLE.
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 28 14:56:58 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create user kam identified by kam;
User created.
SQL> grant connect, resource to kam;
Grant succeeded.
SQL> conn kam/kam
Connected.
SQL> disc
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Pr
oduction
With the Partitioning, OLAP and Data Mining options
SQL> conn / as sysdba
Connected.
SQL> CREATE OR REPLACE TRIGGER limit_connection
2 AFTER LOGON ON DATABASE
3 BEGIN
4 IF USER = 'KAM' 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
--
23
SQL> conn kam/kam
Connected.
SQL> select to_char(sysdate,'hh24') from dual;
TO
--
18
SQL> conn kam/kam
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-20998: Dear user KAM! You can't login between 08 and 22
ORA-06512: at line 5
Warning: You are no longer connected to ORACLE.
- User access to database within limits of time
- Limiting user access to your database tables
- One Method of Convert ACCESS DataBase To SQL Server DataBase
- 1044-Access denied for user 'root'@'%' to database databaseTest 错误
- mysql Access denied for user ''@'localhost' to database
- Access denied for user ''@'localhost' to database 'mysql'
- 解决Access denied for user ''@'localhost' to database 'mysql
- Access denied for user ''@'localhost' to database 'mysql'
- CGI+MySQL: Access denied for user 'root'@'%' to database '
- ERROR 1044 (42000): Access denied for user ''@'localhost' to database
- 解决Access denied for user ''@'localhost' to database 'mysql'问题
- 远程 mysql access denied for user 'root'@'%' to database xxxx
- Mysql错误: Access denied for user ''@'localhost' to database 'mysql'
- ERROR 1044 (42000): Access denied for user ''@'localhost' to database
- Access denied for user 'root'@'192.168.12.249' to database 'zc_beauty'
- Access denied for user 'root'@'localhost' to database
- mysql Access denied for user ''@'localhost' to database
- Access denied for user ''@'localhost' to database 'xxx‘
- 链表和数组的区别小结
- 通话时间显示
- C#双缓冲机制
- 第四周实验报告(三)
- Java程序作linux服务并且开机自动启动
- User access to database within limits of time
- sybase powerdesigner 15.1破解方法
- flex_item renderers(项渲染器);
- AssetManager assets文件夹
- Ubuntu 11.10(内核3.0.0.16-generic)升级内核到3.2.9无线网卡驱动问题【图解】
- 用ModelSim仿真FIFO
- Block developers from using TOAD and other tools on production databases
- AspectC++
- MartyrsCemetery菜鸟感想一之Ubuntu下搭建CUDA开发环境