一:
使用Profile对用户Session会话进行资源限制
--但是如果使用了连接池之类的东东,就会出些问题,比如前台连接不上之类的
--http://www.eygle.com/archives/2008/10/profile_session_limit.html
sqlplus "/ as sysdba"
SQL> show parameter resource
SQL> alter system set resource_limit=true;
SQL> SELECT * from DBA_PROFILES;
--创建一个允许3分钟IDLE时间的PROFILE:
SQL> CREATE PROFILE KILLIDLE LIMIT IDLE_TIME 3;
Profile created.
SQL> col limit for a10
SQL> select * from dba_profiles where profile='KILLIDLE';
SQL> alter user eygle profile killidle;
SQL> select username,profile from dba_users where username='EYGLE';
二:
如何把数据导入不同的表空间
--http://www.eygle.com/archives/2005/04/ecineeeeiaeioae.html
回收用户unlimited tablespace权限
这样就可以导入到用户缺省表空间
SQL> create user bjbbs identified by passwd
2 default tablespace bjbbs
3 temporary tablespace temp
4 /
User created.
SQL> grant connect,resource to bjbbs;
Grant succeeded.
SQL> grant dba to bjbbs;
Grant succeeded.
SQL> revoke unlimited tablespace from bjbbs;
Revoke succeeded.
SQL> alter user bjbbs quota 0 on users;
User altered.
SQL> alter user bjbbs quota unlimited on bjbbs;
User altered.
SQL> exit
重新导入数据
$ imp bjbbs/passwd file=bj_bbs.dmp fromuser=jive touser=bjbbs grants=n
SQL> select table_name,tablespace_name from user_tables;
则可以查看到数据导入了bjbbs
三:
Oracle中模拟及修复数据块损坏
--http://www.eygle.com/faq/Block_corruption.htm
一个数据块损坏后查询会出现如下错误提示
SQL> select count(*) from eygle.t;
select count(*) from eygle.t
*
ERROR 位于第 1 行:
ORA-01578: ORACLE 数据块损坏(文件号4,块号35)
ORA-01110: 数据文件 4: 'E:\ORACLE\ORADATA\EYGLE\BLOCK.DBF'
SQL>
有个内部工具BBED也可以用来编辑数据块的内容
使用DBV检查数据文件
E:\Oracle\oradata\eygle>dbv file=block.dbf blocksize=8192
DBVERIFY: Release 9.2.0.4.0 - Production on 星期一 3月 8 20:48