對象權(quán)限 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 d
對象權(quán)限
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;
系統(tǒng)權(quán)限
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;
用戶或系統(tǒng)角色對應(yīng)的權(quán)限
select * from role_sys_privs where role = 'RESOURCE'
數(shù)據(jù)庫所有的系統(tǒng)權(quán)限名稱
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';
查看相應(yīng)概要文件的各項(xiàng)設(shè)置
select resource_name, limit from dba_profiles where profile = 'DEFAULT';
修改相應(yīng)的概要文件選項(xiàng)
ALTER PROFILE "DEFAULT" LIMIT CONNECT_TIME 30; 最大連接時間30分鐘
ALTER PROFILE "DEFAULT" LIMIT FAILED_LOGIN_ATTEMPTS 3; 最大登錄嘗試次數(shù) 3次
rman 啟動自動備份控制文件功能
show all;
CONFIGURE CONTROLFILE AUTOBACKUP clear; #清除設(shè)置 恢復(fù)為默認(rèn)值
configure controlfile autobackup on; #設(shè)置為自動備份控制文件
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 30 DAYS; #修改保留策略為保留30天
backup archivelog all; 備份歸檔日志
backup tablespace users; 備份users表空間
backup datafile 3; 備份數(shù)據(jù)文件
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; 以壓縮方式備份數(shù)據(jù)文件 4
歸檔空間滿時的處理辦法
rm *.arc 先用操作系統(tǒng)命令手工刪除部分歸檔文件
rman target /
change archivelog all validate;
delete noprompt expired archivelog all;
RUN { EXECUTE SCRIPT b_whole_10; } 執(zhí)行rman的腳本
,聲明:本網(wǎng)頁內(nèi)容旨在傳播知識,若有侵權(quán)等問題請及時與本網(wǎng)聯(lián)系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com