1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How to backup Oracle Database 10g

Discussion in 'Server Administration and Options' started by sameer, Sep 8, 2008.

  1. sameer

    sameer Forum Advisor

    Messages:
    105
    Likes Received:
    6
    Trophy Points:
    240
    How to backup Oracle Database 10g

    It is very vital for everyone to secure Oracle database by keeping a backup. It is very important to ascertain the recovery point objectives, recovery time objectives and backup retention policies before you backup your data. It is the duty of the DBA to find best way to backup the database and recover it when required.

    Firstly, you need to configure your database for backup and recovery operations. Allocate disk space for flash recovery area depending upon your database size and levels, type of backup you require, how soon do you backup your database and for how long you want to maintain the backup.

    However, backup retention policy helps to save disk space by managing useful and obsolete backup files. You will have to decide the size for flash area. Larger flash area means better backup and recovery of your database. Flash area should be at least enough to hold all your control and data files, archived and online redo logs. You will have to accommodate more space if you have chosen to backup your incremental backup files in retention policy.

    Login to the Oracle with SYSDBA privileges or as a member of DBA group so that you have all the required authentications required for backup or data retrieval process. Configure your flash recovery area and archivelog mode if it was not done at the time of creating the database. Similarly configure your backup settings as per your requirements.

    Secondly, you can now backup your database using Enterprise Manager once you have configured your system for backup. Decide the type of backup you require, that is, full backup of all data files, incremental backup or incrementally updated backups.

    To backup all the data files on your database you need to follow these simple steps:

    1. Go to Maintenance page
    2. Click on the backup or recovery section
    3. Click on the Schedule Backup option

    [​IMG]

    4. You may use Oracle’s suggested backup option or customize schedule of your backup. While customizing your database you may backup whole database, tabelspaces, datafiles, archivelogs or all recovery files on disk.

    5. Check username and password in the host credential fields.

    6. If you have customized backup then click on the Schedule Customized Backup option else click on the Schedule Oracle Suggested Backup.

    7. Select Full Backup option from Backup Type section.

    8. If your system is in Archivelog Mode then you can also choose Online Backup option otherwise you will have to select Offline Backup options.

    9. You may choose from any of the options from the Advanced section to backup archived logs or delete backed up archived logs from disk, delete obsolete backups etc.

    10. Click on Next

    11. Select the destination path for your backup.

    12. Specify job name and description for future reference.

    13. Schedule your backup to immediate or fix any time and date you prefer.

    14. Click Next until Schedule Customized Backup page appears

    15. You can view the description of the backup options you have chosen in earlier steps. Click on back button if you want to make any changes, Edit RMAN Script to edit RMAN commands or select Submit Jobto run backup. You may also choose to cancel the job by clicking on the Cancel Button.

    16. Click on the View Job to check the status of the backup process

    17. Click on finish once your backup files are created.
     
  2. Arju

    Arju Forum Expert

    Messages:
    107
    Likes Received:
    5
    Trophy Points:
    240
    Location:
    Bangladesh
    In order to take backup you must have SYSDBA privilege on the target database(the database on which you are going to take backup).
    DBA privilege is not enough to take RMAN backup.
     
  3. sameer

    sameer Forum Advisor

    Messages:
    105
    Likes Received:
    6
    Trophy Points:
    240
    By default members of the DBA group have sysdba privileges. Read this from ittoolbox:

     
  4. Arju

    Arju Forum Expert

    Messages:
    107
    Likes Received:
    5
    Trophy Points:
    240
    Location:
    Bangladesh
    You are making a conceptual mistake.

    While creating database only user SYS is assigned to sysdba privilege. No other user are assigned this high privilege. However if you are on same server as in database then OS dba group simply able to authenticate as sysdba.

    Not even SYSTEM is assigned to sysdba privilege.
    You can check the user who has SYSDBA privilege by,
    Code (Text):
    SQL> select * from v$pwfile_users;

    USERNAME                       SYSDB SYSOP
    ------------------------------ ----- -----
    SYS                            TRUE  TRUE
    Now I am creating a dba user named ARJUDBA
    Code (Text):
    SQL> grant dba to arjudba identified by d;

    Grant succeeded.

    SQL> select * from v$pwfile_users;

    USERNAME                       SYSDB SYSOP
    ------------------------------ ----- -----
    SYS                            TRUE  TRUE
    Note that dba privilege is given to arjudba but he is not sysdba
    So your argument is not correct.
    Now I am give sysdba to arjudba.
    Code (Text):
    SQL> grant sysdba to arjudba;

    Grant succeeded.

    SQL> select * from v$pwfile_users;

    USERNAME                       SYSDB SYSOP
    ------------------------------ ----- -----
    SYS                            TRUE  TRUE
    ARJUDBA                        TRUE  FALSE
    And now both arjudba and sys have the privilege of sysdba and thus both can take rman backup.