Some negligible oracle maintenance commands

Source: Internet
Author: User

Object permission

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;

Tablespace limit

Select * from dba_ts_quotas where username = 'sysmanc' order by tablespace_name;

User or system role Permissions

Select * from role_sys_privs where role = 'resource'

Name of all database system Permissions

Select distinct name from system_privilege_map t where t. name like '% SELECT %'

Df-h disk space usage

Show parameter log_archive_format

View a user's profile

Select username, profile from dba_users where username = 'Scott ';

View the settings of the corresponding profile

Select resource_name, limit from dba_profiles where profile = 'default ';

Modify the corresponding 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

Rman starts the automatic backup control file Function

Show all;

Configure controlfile autobackup clear; # clear settings and restore to default values

Configure controlfile autobackup on; # Set to automatic backup control file

Configure retention policy to recovery window of 30 DAYS; # modify the retention policy to retain for 30 DAYS

Backup archivelog all; backup archiving logs

Backup tablespace users; backup users tablespace

Backup datafile 3; backup data file

Backup incremental level 0 database; zero-level backup

Backup incremental level 1 database; level 1 incremental difference

Backup incremental level 1 cumulative database format'/oradata/bak/dblevel1.bak '; first-level accumulative Increment

Backup as compressed backupset datafile 4; back up data files in compression mode 4

Solution when the archive space is full

Rm *. arc uses the operating system command to manually delete some archive files.

Rman target/

Change archivelog all validate;

Delete noprompt expired archivelog all;

RUN {execute script B _whole_10;} executes the rman SCRIPT

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.