对象权限
select owner,
table_name,
grantor,
privilege,
grantable,
hierarchy,
'table' /*o.*/ object_type
from dba_tab_privs p
where p.grantee = 'hr'
order by p.owner, p.table_name;
角色
select granted_role, admin_option, default_role
from dba_role_privs
where grantee = 'hr'
order by granted_role;
系统权限
select privilege, admin_option
from dba_sys_privs
where grantee = 'hr'
order by privilege;
表空间限额
select * from dba_ts_quotas where username = 'sysman' order by tablespace_name;
用户或系统角色对应的权限
select * from role_sys_privs where role = 'resource'
数据库所有的系统权限名称
select distinct name from system_privilege_map t where t.name like '%select%'
df -h 磁盘空间使用率
show parameter log_archive_format
查看用户的概要文件
select username, profile from dba_users where username='scott';
查看相应概要文件的各项设置
select resource_name, limit from dba_profiles where profile = 'default';
修改相应的概要文件选项
alter profile "default" limit connect_time 30; 最大连接时间30分钟
alter profile "default" limit failed_login_attempts 3; 最大登录尝试次数 3次
rman 启动自动备份控制文件功能
show all;
configure controlfile autobackup clear; #清除设置 恢复为默认值
configure controlfile autobackup on; #设置为自动备份控制文件
configure retention policy to recovery window of 30 days; #修改保留策略为保留30天
backup archivelog all; 备份归档日志
backup tablespace users; 备份users表空间
backup datafile 3; 备份数据文件
backup incremental level 0 database; 零级备份
backup incremental level 1 database; 一级差异增量
backup incremental level 1 cumulative database format '/oradata/bak/dblevel1.bak'; 一级累计增量
backup as compressed backupset datafile 4; 以压缩方式备份数据文件 4
归档空间满时的处理办法
rm *.arc 先用操作系统命令手工删除部分归档文件
rman target /
change archivelog all validate;
delete noprompt expired archivelog all;
run { execute script b_whole_10; } 执行rman的脚本
阅读(2369) | 评论(1) | 转发(0) |