Object permissions
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;
Role
Select Granted_role, Admin_option, Default_role
From Dba_role_privs
Where grantee = ' HR '
Order BY Granted_role;
System permissions
Select Privilege, admin_option
From Dba_sys_privs
Where grantee = ' HR '
Order BY privilege;
Table Space Limit
SELECT * from Dba_ts_quotas where username = ' Sysman ' ORDER by Tablespace_name;
Permissions for user or system roles
SELECT * from role_sys_privs where role = ' RESOURCE '
All system permission names for the database
Select DISTINCT NAME from System_privilege_map t WHERE t.name like '%select% '
Df-h Disk space usage
Show Parameter Log_archive_format
View the user's profile
Select Username, profile from dba_users where username= ' SCOTT ';
View the settings for the corresponding profile
Select Resource_name, limit from dba_profiles where profile = ' DEFAULT ';
Modify the appropriate profile options
ALTER profile "DEFAULT" LIMIT connect_time 30; Maximum connection time 30 minutes
ALTER profile "DEFAULT" LIMIT failed_login_attempts 3; Maximum number of logon attempts 3 times
Rman initiates automatic backup control file function
Show All;
CONFIGURE Controlfile autobackup Clear; #清除设置 revert to default value
Configure Controlfile autobackup on; #设置为自动备份控制文件
CONFIGURE RETENTION POLICY to RECOVERY WINDOW of the days; #修改保留策略为保留30天
Backup Archivelog all; Back up the archive log
Backup tablespace users; Back up the Users table space
Backup DataFile 3; Backing up data files
Backup incremental level 0 database; Level 0 Backup
Backup incremental level 1 database; First level differential increment
Backup incremental Level 1 Cumulative database format '/oradata/bak/dblevel1.bak '; First-level cumulative increment
Backup as compressed backupset datafile 4; Backing up data files in a compressed way 4
Processing of archive space full time
RM *.arc Manually Delete part of the archive with the operating system command first
Rman Target/
Change Archivelog all validate;
Delete noprompt expired archivelog all;
Run {Execute script b_whole_10;} Execute Rman scripts