Oracle Database 10g: Backup and Recovery

Size: px
Start display at page:

Download "Oracle Database 10g: Backup and Recovery"

Transcription

1 Oracle Database 10g: Backup and Recovery Volume I Student Guide D22057GC10 Production 1.0 June 2006 D

2 Authors Donna Keesling Maria Billings Technical Contributors and Reviewers Christopher Andrews Tammy Bednar Tom Best Harald van Breederode Mary Jane Bryksa Marielle Canning Tim Chien Donna Cooksey Judy Ferstenberg Gerlinde Frenzen Joel Goodman Pete Jones Isabelle Marchand Sabiha Miri Manish Pawar Jim Spiller George Stabler Anthony Woodell Editor Daniel Milne Graphic Designer Satish Bettegowda Publisher Jobi Varghese 2

3 Copyright 2006, Oracle. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California USA. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Government s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. 3

4 Practice for Lesson 1 There are no practices for Lesson 1. 4

5 Practice for Lesson 2 In this practice, you configure your database for recoverability. 5

6 Practice 2-1: Configure Your Database 1) Use Enterprise Manager to configure your database in ARCHIVELOG mode. 2) Use Enterprise Manager to verify that the Flash Recovery Area has been configured for your database and increase the Flash Recovery Area size to 3 GB. 3) Set Preferred Credentials in Enterprise Manager. 4) Use Recovery Manager (RMAN) to connect to your target database. Make note of thedatabase identifier (DBID) of your database.database Identifier: Make note of the database identifier (DBID) of your database. 5) Use the RMAN SHOW ALL command to view the configuration settings in yourdatabase and then exit from your RMAN session. 6

7 Practice for Lesson 3 In this practice, you configure automatic backup of the control file. You also configure a backup of your database using the Oracle-Suggested Backup Strategy feature in Enterprise Manager Database Control.. 7

8 Practice 3-1: Use RMAN to Create and Manage Backups 1) Use Enterprise Manager Database Control to configure autobackup of the control file and the server parameter file. 2) Use Enterprise Manager Database Control to configure backup optimization and enable block change tracking. Specify /u01/app/oracle/oradata/orcl/chg_track.f for the name of the blockchange tracking file. 3) Use Enterprise Manager Database Control to create a whole database backup using the Oraclesuggested backup strategy. 4) Use Enterprise Manager to view information about your backups. 5) Use RMAN to create a duplexed backup set of the EXAMPLE tablespace. 6) Use Enterprise Manager Database Control to perform a crosscheck of your backups. 8

9 Practice for Lesson 4 In this practice, you use RMAN to perform recovery. 9

10 Practice 4-1: Use RMAN to Recover a Datafile In this practice, you use RMAN to recover a lost datafile. Notice how you are prompted by Enterprise Manager to recover the lost datafile. 1) Use SQL*Plus to query the HR.REGIONS table. Make note of the number of rows in the HR.REGIONS table. 2) At the operating system prompt, execute the lab_04_01_02_01.sh script to simulate a failure in your database. This script deletes the EXAMPLE tablespace datafile. 3) Use SQL*Plus to query the HR.JOBS table. 4) Use Enterprise Manager to perform database recovery of the EXAMPLE tablespace datafile. 5) Return to your SQL*Plus session and again attempt to query the HR.JOBS table. 10

11 Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile In this practice, you recover a lost datafile by using the Flash Recovery Area for fast recovery. 1) Use SQL*Plus to query the HR.REGIONS table. Make note of the number of rows in the HR.REGIONS table. 2) At the operating system prompt, execute the lab_04_02_02_01.sh script to simulate a failure in your database. This script deletes the EXAMPLE tablespace datafile. 3) Use SQL*Plus to query the HR.DEPARTMENTS table. 4) Use the RMAN SWITCH TO COPY command to recover the datafile. 5) Query the HR.JOBS table. 6) Using Enterprise Manager Database Control, verify that the datafile being used for the EXAMPLE tablespace is in the Flash Recovery Area. 7) Make a copy of the datafile in the original location and switch back to it. 8) Use Enterprise Manager Database Control to verify the file. 11

12 Practice 4-3: Recover Control Files In this practice, you recover your control file using an autobackup. 1) Use SQL*Plus to view files information for the control files in your database. Query V$CONTROLFILE. 2) Simulate a failure in your environment by executing the lab_04_03_02_01.sh script to delete all your control files. 3) You need some more information about your control files. Query V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your control file. 4) You have lost all your control files and will need to recover them from the control file autobackup. Use Recovery Manager to recover the control files. 12

13 Practice 4-4: Delete Obsolete Backups 1) Use Recovery Manager to view obsolete backups. 2) Use Enterprise Manager Database Control to delete obsolete backups. 3) You can also use RMAN to verify that your obsolete backups were deleted. 13

14 Practice for Lesson 5 In this practice, you use Oracle Flashback features to recover from errors in your database. 14

15 Practice 5-1: Enable Flashback Database 1) Use Enterprise Manager to enable Flashback Database. 2) Use the ALTER DATABASE command to enable supplemental logging. 15

16 Practice 5-2: Set Restore Points and Perform Flashback Table Restore points are a way to bookmark database points in time. Set a restore point to remember a significant change so that you can quickly recover to that point in time without having to record an SCN or time. 1) You must enable row movement to use restore points. Use Enterprise Manager to enable row movement for the HR.LOCATIONS table. 2) Create a normal restore point. 3) Use SQL*Plus to query the POSTAL_CODE column in the HR.LOCATIONS table. 4) Execute the lab_05_02_04_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table so that all postal codes are set to ) Execute the lab_05_02_05_01.sql script to query the POSTAL_CODE column in the HR.LOCATIONS table again. 6) Restore the POSTAL_CODE column values using the restore point. 7) Return to your SQL*Plus session. Execute the lab_05_02_07_01.sql script to query the POSTAL_CODE column in HR.LOCATIONS again to be sure the correct values have been restored. 16

17 Practice 5-3: Use Flashback Query and Flashback Versions Query 1. Execute the lab_05_03_01_01.sql script to query the HR.LOCATIONS table for location ID Execute the lab_05_03_02_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table, simulating user error. 3. Execute the lab_05_03_03_01.sql script to query the POSTAL_CODE column in HR.LOCATIONS and view the change. 4. Execute the lab_05_03_04_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table, simulating user error. 5. Use Enterprise Manager to perform Flashback Versions Query to correct the user errors. 6. Return to your SQL*Plus session. Query the HR.LOCATIONS table to confirm the Flashback operation. 17

18 Practice 5-4: Use Flashback Database 1) Use Enterprise Manager to verify that Flashback Database is enabled. 2) Use Enterprise Manager to create a Guaranteed Restore Point. 3) Execute the lab_05_04_03_01.sql script to determine the number of rows in the HR.JOB_HISTORY table. Record the number of rows: 4) Execute the lab_05_04_04_01.sql script to truncate the HR.JOB_HISTORY table. 4) Execute the lab_05_04_05_01.sql script to determine the number of rows in the HR.JOB_HISTORY table. 5) Use Flashback Database to restore the HR.JOB_HISTORY table rows. 6) Return to your SQL*Plus session. Execute the lab_05_04_07_02.sql script to query the HR.JOB_HISTORY table again to be sure the data has been restored. 18

19 Practice for Lesson 6 In this practice, you create a duplicate database. 19

20 Practice 6-1: Create a Duplicate Database In this practice, you use RMAN to create a duplicate database on the same host as your database. 1) Create an Oracle password file for your auxiliary instance. 2) Use Oracle Net Manager to create an entry called AUXDB in the tnsnames.ora file. 3) Create an initialization parameter file for the auxiliary instance. 4) Start the auxiliary instance in NOMOUNT mode using the initaux.ora file. 5) Create a server parameter file (SPFILE). 6) Verify that your target database (orcl database) is mounted or open. 7) Start RMAN with a connection to the target database (orcl) and the auxiliary instance. 8) Create the duplicate database by executing the DUPLICATE command. 9) Use SQL*Plus to log in to your AUX database and execute a query against the HR.REGIONS table. 10) Now that you have completed the test recovery by creating a duplicate database, shut down the aux instance. 11) Change your ORACLE_SID to orcl in preparation for later practices. 20

21 Practice for Lesson 7 In this practice, you use tablespace point-in-time recovery to recover from unwanted changes to your database. 21

22 Practice 7-1: Use Tablespace Point-in-time Recovery 1) Execute the lab_07_01_01_01.sh script to export the HR schema. 2) Execute the lab_07_01_02_02.sql script to create a new tablespace and a new user in your database. 3) Execute the lab_07_01_03_01.sh script to populate the new tablespace with a copy of the data from the HR schema. Note: The import should complete successfully. You will receive error messages because the import excludes the COUNTRIES, REGIONS, and LOCATIONS tables. These messages can be ignored. 4) Create a backup of your database using RMAN. 5) Record the current SCN: 6) Record the current time. 7) Execute the lab_07_01_07_01.sql script to query the HRTEST.EMPLOYEES table and view information about employees in department 60. Make note of the highest salary that is displayed: 8) Execute the lab_07_01_08_01.sql script to update the salaries for the employees in department 60 and note the highest salary displayed. Highest salary: 9) You now want to perform TSPITR for the HRTEST tablespace to return it to the state prior to the updates. Execute the lab_07_01_09_01.sql script to determine whether there are any dependencies that will prevent the TSPITR operation. 10) You can use Enterprise Manager Database Control or RMAN command line to perform tablespace point-in-time recovery. 11) Verify that the HRTEST tablespace is online. 12) Verify that the SALARY columns in HRTEST.EMPLOYEES for the employees in department 60 contain the correct values. 13) Execute the lab_07_01_13_02.sql script to add a constraint to the HRTEST.DEPARTMENTS table. 14) Assume you need to perform TSPITR on the HRTEST tablespace again. Execute the lab_07_01_14_02.sql query to determine whether there are any dependencies outside the recovery set. 15) If you wanted to complete the tablespace point-in-time recovery for the HRTEST tablespace now, what would you need to do? 22

23 Note: You will not perform another tablespace point-in-recovery in this practice. You would need to disable the DEPT_LOC_ID_FK constraint that was added to your HRTEST.DEPARTMENTS table or you would need to add 23

24 In this practice, you create a recovery catalog in your instructor s database and register your database in the recovery catalog. Practice for Lesson 8 24

25 Practice 8-1: Create the Recovery Catalog and Register the Database The tablespace for the recovery catalog and the recovery catalog owner have been created in the instructor database. The tablespaces are named RCTS01 RCTS12. The users are named RCUSER01 RCUSER12. 1) Connect to the recovery catalog database (instructor s database) with the appropriate recovery catalog owner name (if you are using PC01, connect as RCUSER01) using RMAN. Create the recovery catalog in your assigned tablespace. (If you are using PC01, your assigned tablespace is RCTS01.) The service name is RCDB. 2) Using RMAN, connect to your target database and the recovery catalog database. 3) Using RMAN, execute the command to resynchronize the control file and recovery catalog. What happens? Why? 4) Register the target database in the recovery catalog. You can use RMAN commandline or Enterprise Manager for this step. 5) Create an RMAN script named whole_backup to make a whole database backup. Do not execute the whole_backup script at this time. 6) Use the PRINT command to query the recovery catalog and verify the creation of your whole_backup script. 7) In preparation for later practices, use RMAN to unregister your database from the recovery catalog. 25

26 In this practice, you monitor the progress of your RMAN backup jobs. Practice for Lesson 9 26

27 Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups 1) Invoke RMAN and delete all obsolete backups. 2) Open a second terminal window. Change to the labs directory. Invoke SQL*Plus and connect as SYSDBA. You will use this second session to monitor a database backup. 3) Return to your first terminal window. In your RMAN session, begin a whole database backup. 4) Use your SQL*Plus session to monitor the progress of the whole database backup by querying the V$SESSION_LONGOPS view. By using this view you can determine whether the backup is progressing normally or hanging. If the backup is progressing normally, the TIME_REMAINING column should be decreasing. Execute the lab_09_01_04_01.sql script to query V$SESSION_LONGOPS. 27

28 Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs You can easily monitor RMAN jobs in Enterprise Manager. 1) Start Enterprise Manager and log in as SYS/ORACLE as SYSDBA. 2) Delete obsolete backups. 3) Start a whole database backup 28

29 29 Practice Solutions

30 Table of Contents Solutions for Practice 2-1: Configure Your Database... 5 Solutions for Practice 3-1: Use RMAN to Create and Manage Backups Solutions for Practice 4-1: Use RMAN to Recover a Datafile Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile Solutions for Practice 4-3: Recover Control Files Solutions for Practice 4-4: Delete Obsolete Backups Solutions for Practice 5-1: Enable Flashback Database Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query Solutions for Practice 5-4: Use Flashback Database Solutions for Practice 6-1: Create a Duplicate Database Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs

31 Practice Solutions for Lesson 1 There are no practices for Lesson 1. 31

32 In this practice, you configure your database for recoverability. Practice Solutions for Lesson 2 32

33 Solutions for Practice 2-1: Configure Your Database 1) Use Enterprise Manager to configure your database in ARCHIVELOG mode. 1. Start the Web browser and enter host name:1158/em. 2. Enter SYS in the User Name field and oracle in the Password field. Select SYSDBA in the Connect As menu. Click Login. 3. Click I agree on the Oracle Database 10g Licensing Information page. 4. Select the Maintenance page. 5. Select Recovery Settings in the Backup/Recovery Settings section. 6. In the Media Recovery section, select ARCHIVELOG Mode and click Apply. 7. The Confirmation page is displayed. Click Yes to restart the database instance. 8. On the Restart Database: Specify Host and Target Database Credentials page. In the Host Credentials section, enter oracle in the Username and Password fields. In the Database Credentials section, enter SYS in the Username field and oracle in the Password field. Select Save as Preferred Credential. Click OK. 9. The Restart Database: Confirmation page is displayed. Click Yes to confirm the restart of the database instance. 10. The Restart Database: Activity Information page is displayed. Wait a few minutes and then click Refresh. 2) Use Enterprise Manager to verify that the Flash Recovery Area has been configured for your database and increase the Flash Recovery Area size to 3 GB. 1. Select the Maintenance page. 2. Select Recovery Settings in the Backup/Recovery Settings section. 33

34 3. Scroll to the Flash Recovery Area and verify that the Flash Recovery Area is enabled. 4. Enter 3 in the Flash Recovery Area Size field and click Apply. 5. The Update Message is displayed. Click the Database instance link to return to the Maintenance page. 3) Set Preferred Credentials in Enterprise Manager. 1. Select Preferences at the top of the Maintenance page. 2. Select Preferred Credentials on the left side of the page. 3. Click the Set Credentials icon for the database instance. 4. Supply the following values: Normal Username: system Normal Password: oracle SYSDBA Username: sys SYSDBA Password: oracle Host Username: oracle Host Password: oracle 5. Click Test. The Credentials successfully verified for orcl.oracle.com message is displayed. If you have any errors, correct them and click Test again. 6. Click Apply to save the settings. 7. Click Database to return to the Database home page. 4) Use Recovery Manager (RMAN) to connect to your target database. Make note of the database identifier (DBID) of your database. Database Identifier: 34

35 1. Open a terminal window and log in as oracle/oracle. 2. Start RMAN and connect to the target database by entering the following command at the operating system prompt: rman target / [oracle@edrsr10p1 oracle]$ rman target / Recovery Manager: Release Production on Tue Mar 7 12:51: Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: ORCL (DBID= ) RMAN> Make note of the database identifier (DBID) of your database. 3. Use the RMAN SHOW ALL command to view the configuration settings in your database and then exit from your RMAN session. RMAN> show all; using target database control file instead of recovery catalog RMAN configuration parameters are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # deft CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%U'; CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default 35

36 CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/10.2.0/db_1/dbst RMAN> exit Recovery Manager complete. 36

37 Practice Solutions for Lesson 3 In this practice, you configure automatic backup of the control file. You also configure a backup of your database using the Oracle-Suggested Backup Strategy feature in Enterprise Manager Database Control. 37

38 Solutions for Practice 3-1: Use RMAN to Create and Manage Backups 1) Use Enterprise Manager Database Control to configure autobackup of the control file and the server parameter file. 1. Select Maintenance > High Availability > Backup/Recovery Settings > Backup Settings. 2. On the Backup Settings page, select the Policy tab. 3. In the Backup Policy section, select Automatically backup the control file and server parameter file (SPFILE) with every backup and database structural change. Click OK. 4. You are returned to the Maintenance page. 2) Use Enterprise Manager Database Control to configure backup optimization and enable block change tracking. Specify /u01/app/oracle/oradata/orcl/chg_track.f for the name of the block change tracking file. 1. Select Maintenance > High Availability > Backup/Recovery Settings > Backup Settings. 2. On the Backup Settings page, select the Policy tab. 3. In the Backup Policy section, select Optimize the whole database backup by skipping unchanged files such as read-only and offline datafiles that have been backed up. 4. Select Enable block change tracking for faster incremental backups and enter a. /u01/app/oracle/oradata/orcl/chg_track.f in the Block Change Tracking File field. Click OK. 38

39 5. You are returned to the Maintenance page. 3) Use Enterprise Manager Database Control to create a whole database backup using the Oraclesuggested backup strategy. 1. Select Maintenance > High Availability > Backup/Recovery > Schedule Backup. 2. In the Oracle-Suggested Backup section of the Schedule Backup page, click Schedule Oracle- Suggested Backup. 3. On the Schedule Oracle-Suggested Backup: Destination page, select Disk. Click Next. 4. Review the information on the Schedule Oracle-Suggested Backup: Setup page. Note that a full database copy will be performed during the first backup. After that, an incremental backup to disk will be performed every day. Click Next. 39

40 5. On the Schedule Oracle-Suggested Backup: Schedule page, you can specify the time for your backups. Set the Time Zone field to correspond to your time zone. 6. Review the information on the Schedule Oracle-Suggested Backup: Review page. Click Submit Job. 7. The Status page is displayed indicating that the job has been submitted. Click View Job to monitor the status of the backup job. 8. Click the Refresh button on your browser to refresh the Execution page. Click the Backup link to view the output log. 9. In the output log, you can see that RMAN has made a datafile copy backup of each datafile in your database. 40

41 10. Click the Database tab to return to the Database Home page. 4) Use Enterprise Manager to view information about your backups. 1. Select Maintenance > High Availability > Backup/Recovery > Backup Reports. 2. Click the link for the backup you took in Question 3 to view detailed information about the backup. 3. Click the Database Instance link to return to the Maintenance page. 5) Use RMAN to create a duplexed backup set of the EXAMPLE tablespace. 1. Start RMAN and connect to the target database. [oracle@edrsr10p1 backup1]$ rman target / Recovery Manager: Release Production on Wed Mar 22 10:38: Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: ORCL (DBID= ) 2. Create two backup set copies. One copy should be in the 41

42 /home/oracle/backup1 directory and one copy should be in the /home/oracle/backup2 directory. RMAN> backup device type disk 2> copies 2 3> tablespace example 4> format '/home/oracle/backup1/%u', '/home/oracle/backup2/%u'; Starting backup at 22-MAR-06 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf channel ORA_DISK_1: starting piece 1 at 22-MAR-06 channel ORA_DISK_1: finished piece 1 at 22-MAR-06 with 2 copies and tag TAG20063 piece handle=/home/oracle/backup1/0ehejks7_1_1 comment=none piece handle=/home/oracle/backup2/0ehejks7_1_2 comment=none channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15 Finished backup at 22-MAR-06 Starting Control File and SPFILE Autobackup at 22-MAR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/autobackup /2006_03_22/o1_E Finished Control File and SPFILE Autobackup at 22-MAR-06 RMAN> **end-of-file** RMAN> 3. Use the RMAN LIST BACKUP SUMMARY command to view a listing of the backup sets and pieces. The #Copies column shows the duplexed backup set copies you made. Exit from RMAN. RMAN> list backup summary; using target database control file instead of recovery catalog List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag B F A DISK 21-MAR NO TAG

43 7 B F A DISK 22-MAR NO TAG B F A DISK 22-MAR NO TAG B F A DISK 22-MAR NO TAG RMAN> **end-of-file** RMAN> exit Recovery Manager complete 6) Use Enterprise Manager Database Control to perform a cross-check of your backups. 1. Select Maintenance > High Availability > Backup/Recovery > Manage Current Backups. 2. Click Crosscheck All. 3. Review the information on the Crosscheck All: Specify Job Parameters page and accept the default values. Click Submit Job. 4. You receive the Job submission succeeded message. You can click View Job to monitor the cross-check job. After it completes successfully, return to the Database Home page. 5. Log out of Enterprise Manager. 43

44 In this practice, you use RMAN to perform recovery. Practice Solutions for Lesson 4 44

45 Solutions for Practice 4-1: Use RMAN to Recover a Datafile In this practice, you use RMAN to recover a lost datafile. Notice how you are prompted by Enterprise Manager to recover the lost datafile. 1) Use SQL*Plus to query the HR.REGIONS table. Make note of the number of rows in the HR.REGIONS table. 1. Open a terminal window and log in to SQL*Plus and connect as the HR user with HR as the password. 2. Query the HR.REGIONS table and record the number of rows. Number of rows: [oracle@edrsr10p1 oracle]$ sqlplus hr/hr SQL*Plus: Release Production on Thu Mar 23 12:51: Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options SQL> select * from regions; REGION_ID REGION_NAME Europe 2 Americas 3 Asia 4 Middle East and Africa 3. Exit from your SQL*Plus session. 2) At the operating system prompt, execute the lab_04_01_02_01.sh script to simulate a failure in your database. This script deletes the EXAMPLE tablespace datafile. 1. At the operating system prompt, change to the labs directory and execute the lab_04_01_02_01.sh script. [oracle@edrsr10p1 labs]$./lab_04_01_02_01.sh EXAMPLE tablespace file deleted 3) Use SQL*Plus to query the HR.JOBS table. 45

46 1. Log in to SQL*Plus and connect as the HR user with HR as the password. 2. Query the HR.JOBS table. SQL> select * from jobs; select * from jobs * ERROR at line 1: ORA-00376: file 5 cannot be read at this time ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf' 4) Use Enterprise Manager to perform database recovery of the EXAMPLE tablespace datafile. 1. Start Enterprise Manager and log in as SYS/ORACLE as SYSDBA. 2. Navigate to the Maintenance page. 3. Select Perform Recovery on the Maintenance page. 4. Click the Datafiles Need Media Recovery link. 5. Select the file and click Next. 46

47 6. Select No. Restore the files to the default location. Click Next. 7. On the Perform Object Level Recovery: Review page, click Edit RMAN Script to view the script that will be executed. Click Submit. 8. The Processing page is displayed. After the recovery operation completes, the Result page is displayed indicating that the recovery operation succeeded. 9. Click OK to return to the Maintenance page. 5) Return to your SQL*Plus session and again attempt to query the HR.JOBS table. 1. Query the HR.JOBS table. 47

48 SQL> select * from jobs; JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY AD_PRES President AD_VP Administration Vice President AD_ASST Administration Assistant FI_MGR Finance Manager MK_REP Marketing Representative HR_REP Human Resources Representative PR_REP Public Relations Representative rows selected. 48

49 Solutions for Practice 4-2: Use the Flash Recovery Area to Quickly Recover a Datafile In this practice, you recover a lost datafile by using the Flash Recovery Area for fast recovery. 1) Use SQL*Plus to query the HR.REGIONS table. Make note of the number of rows in the HR.REGIONS table. 1. Log in to SQL*Plus and connect as the HR user with HR as the password. 2. Query the HR.REGIONS table. 3. Exit from SQL*Plus. 2) At the operating system prompt, execute the lab_04_02_02_01.sh script to simulate a failure in your database. This script deletes the EXAMPLE tablespace datafile. 1. At the operating system prompt, change to the labs directory and execute the lab_04_02_02_01.sh script. [oracle@edrsr10p1 labs]$./lab_04_02_02_01.sh EXAMPLE tablespace file deleted [oracle@edrsr10p1 labs]$ 3) Use SQL*Plus to query the HR.DEPARTMENTS table. 1. Log in to SQL*Plus and connect as the HR user with HR as the password. 2. Query the HR.DEPARTMENTS table. SQL> select * from departments; select * from departments * ERROR at line 1: ORA-01116: error in opening database file 5 ORA-01110: data file 5: '/u01/app/oracle/oradata/orcl/example01.dbf' ORA-27041: unable to open file Linux Error: 2: No such file or directory Additional information: 3 3. Make note of the number of the datafile that is unavailable. Datafile number: 49

50 4. Exit from your SQL*Plus session. 4) Use the RMAN SWITCH TO COPY command to recover the datafile. 1. Log in to your target database using RMAN. 2. Take the datafile offline. RMAN> SQL 'alter database datafile 5 offline'; sql statement: alter database datafile 5 offline 3. Execute the SWITCH TO COPY command for the datafile you noted in step 3. RMAN> switch datafile 5 to copy; datafile 5 switched to datafile copy "/u01/app/oracle/flash_recovery_area/orcl/" 4. Recover the datafile. RMAN> recover datafile 5; Starting recover at 24-MAR-06 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=132 devtype=disk allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=130 devtype=sbt_tape channel ORA_SBT_TAPE_1: Oracle Secure Backup starting media recovery media recovery complete, elapsed time: 00:00:03 Finished recover at 24-MAR Bring the datafile online. RMAN> sql 'alter database datafile 5 online'; sql statement: alter database datafile 5 online RMAN> 6. Exit from your RMAN session. 5) Query the HR.JOBS table. 1. Log in to SQL*Plus as HR/HR and query the HR.JOBS table. (Output has been formatted to fit the code box.) 50

51 SQL> select * from jobs; JOB_ID JOB_TITLE MIN_S MAX_SALARY AD_PRES President AD_VP Administration Vice President HR_REP Human Resources Representative PR_REP Public Relations Representative rows selected. 6) Using Enterprise Manager Database Control, verify that the datafile being used for the EXAMPLE tablespace is in the Flash Recovery Area. 1. Select Tablespaces on the Administration page. 2. Select the Example tablespace and click View. 3. Click Return to return to the Tablespaces page. 7) Make a copy of the datafile in the original location and switch back to it. 1. Log in to RMAN and connect to your target database. 2. Create an image copy of the datafile in the original location. RMAN> backup as copy datafile 5 2> format '/u01/app/oracle/oradata/orcl/example01.dbf'; Starting backup at 24-MAR-06 using target database control file instead of recovery 51

52 catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=129 devtype=disk channel ORA_DISK_1: starting datafile copy input datafile fno=00005 name=/u01/app/oracle/flash_recovery_area/orcl/datafilef output filename=/u01/app/oracle/oradata/orcl/example01.dbf tag=tag t13447 channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07 Finished backup at 24-MAR-06 Starting Control File and SPFILE Autobackup at 24-MAR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/autobackup /2006_03_24/o1_E Finished Control File and SPFILE Autobackup at 24-MAR-06 RMAN> **end-of-file** 3. Take the datafile offline. RMAN> sql 'alter database datafile 5 offline'; sql statement: alter database datafile 5 offline 4. Switch to the new copy you made. RMAN> switch datafile 5 to copy; datafile 5 switched to datafile copy "/u01/app/oracle/oradata/orcl/example01.dbf" 5. Recover the datafile. RMAN> recover datafile 5; Starting recover at 24-MAR-06 using channel ORA_DISK_1 allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=154 devtype=sbt_tape channel ORA_SBT_TAPE_1: Oracle Secure Backup starting media recovery media recovery complete, elapsed time: 00:00:02 Finished recover at 24-MAR Bring the datafile back online. Exit from RMAN. RMAN> sql 'alter database datafile 5 online'; sql statement: alter database datafile 5 online 52

53 8) Use Enterprise Manager Database Control to verify the file. 1. Select Tablespace on the Administration page. 2. Select the EXAMPLE tablespace and click View. 3. Note that the datafile is the one you switched to. 4. Click the Database tab to return to your database home page. 53

54 Solutions for Practice 4-3: Recover Control Files In this practice, you recover your control file by using an autobackup. 1) Use SQL*Plus to view files information for the control files in your database. Query V$CONTROLFILE. 1. Log in to SQL*Plus as SYSDBA. 2. Query the NAME column in V$CONTROLFILE. Exit from SQL*Plus. SQL> SELECT name FROM v$controlfile; NAME /u01/app/oracle/oradata/orcl/control01.ctl /u01/app/oracle/oradata/orcl/control02.ctl /u01/app/oracle/oradata/orcl/control03.ctl 2) Simulate a failure in your environment by executing the lab_04_03_02_01.sh script to delete all your control files. 1. In your terminal window session, change to the labs directory and execute the lab_04_03_02_01.sh script. [oracle@edrsr10p1 oracle]$ cd labs [oracle@edrsr10p1 labs]$./lab_04_03_02_01.sh Control files deleted [oracle@edrsr10p1 labs]$ 3) You need some more information about your control files. Query V$CONTROLFILE_RECORD_SECTION to learn more about the contents of your control file. 1. Log in to SQL*Plus as SYSDBA. 2. Query the V$CONTROLFILE_RECORD_SECTION view. SQL> SELECT * FROM v$controlfile_record_section; SELECT * FROM v$controlfile_record_section * ERROR at line 1: ORA-00210: cannot open the specified control file ORA-00202: control file: '/u01/app/oracle/oradata/orcl/control01.ctl' ORA-27041: unable to open file Linux Error: 2: No such file or directory Additional information: 3 54

55 4) You have lost all your control files and will need to recover them from the control file autobackup. Use Recovery Manager to recover the control files. 1. Use SQL*Plus to shut down your instance. Exit from your SQL*Plus session. oracle]$ sqlplus / as sysdba SQL*Plus: Release Production on Tue Mar 28 10:20: Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options SQL> shutdown abort ORACLE instance shut down. SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release Pn With the Partitioning, OLAP and Data Mining options [oracle@edrsr10p1 oracle]$ 2. Use RMAN to connect to your target database. [oracle@edrsr10p1 oracle]$ rman Recovery Manager: Release Production on Tue Mar 28 10:23: Copyright (c) 1982, 2005, Oracle. All rights reserved. RMAN> connect target / connected to target database (not started) RMAN> 3. Restart the instance in NOMOUNT mode. RMAN> startup nomount Oracle instance started Total System Global Area bytes Fixed Size bytes Variable Size bytes Database Buffers bytes Redo Buffers bytes 55

56 4. Set the database identifier. Note: Your database identifier will be a different value from that shown in the solution. You recorded the database identifier in Practice 2-1. RMAN> set dbid ; executing command: SET DBID 5. Restore the control file from the autobackup. RMAN> restore controlfile from autobackup; Starting restore at 28-MAR-06 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=156 devtype=disk recovery area destination: /u01/app/oracle/flash_recovery_area database name (or database unique name) used for search: ORCL channel ORA_DISK_1: autobackup found in the recovery area channel ORA_DISK_1: autobackup found: /u01/app/oracle/flash_recovery_area/orcl/p channel ORA_DISK_1: control file restore from autobackup complete output filename=/u01/app/oracle/oradata/orcl/control01.ctl output filename=/u01/app/oracle/oradata/orcl/control02.ctl output filename=/u01/app/oracle/ Finished restore at 28-MAR Mount the database. RMAN> alter database mount; database mounted released channel: ORA_DISK_1 7. Recover the database by issuing the RECOVER DATABASE command. RMAN> recover database; Starting recover at 28-MAR-06 Starting implicit crosscheck backup at 28-MAR-06 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=156 devtype=disk Crosschecked 11 objects 56

57 Finished implicit crosscheck backup at 28-MAR-06 Starting implicit crosscheck copy at 28-MAR-06 using channel ORA_DISK_1 Crosschecked 5 objects Finished implicit crosscheck copy at 28-MAR-06 searching for all files in the recovery area cataloging files... cataloging done List of Cataloged Files ======================= File Name: /u01/app/oracle/flash_recovery_area/orcl/archivelog/2006_0 3_28/o1_mfc File Name: /u01/app/oracle/flash_recovery_area/orcl/archivelog/2006_0 3_28/o1_mfc File Name: /u01/app/oracle/flash_recovery_area/orcl/archivelog/2006_0 3_28/o1_mfc File Name: /u01/app/oracle/flash_recovery_area/orcl/autobackup/2006_0 3_27/o1_mfp using channel ORA_DISK_1 allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=155 devtype=sbt_tape channel ORA_SBT_TAPE_1: Oracle Secure Backup starting media recovery archive log thread 1 sequence 116 is already on disk as file /u01/app/oracle/flc archive log thread 1 sequence 117 is already on disk as file /u01/app/oracle/flc archive log thread 1 sequence 118 is already on disk as file /u01/app/oracle/flc archive log thread 1 sequence 119 is already on disk as file /u01/app/oracle/org archive log filename=/u01/app/oracle/flash_recovery_area/orcl/archivel og/2006_06 archive log filename=/u01/app/oracle/flash_recovery_area/orcl/archivel og/2006_07 archive log filename=/u01/app/oracle/flash_recovery_area/orcl/archivel og/2006_08 archive log filename=/u01/app/oracle/oradata/orcl/redo01.log thread=1 57

58 sequence=9 media recovery complete, elapsed time: 00:00:02 Finished recover at 28-MAR Open the database with the RESETLOGS option. RMAN> alter database open resetlogs; database opened 9. Back up the current online redo log file and back up all the archived redo log files. RMAN> SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT'; using target database control file instead of recovery catalog sql statement: ALTER SYSTEM ARCHIVE LOG CURRENT RMAN> backup archivelog all; Starting backup at 10-APR-06 current log archived allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=159 devtype=disk channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=15 recid=53 stamp= input archive log thread=1 sequence=16 recid=54 stamp= input archive log thread=1 sequence=17 recid=55 stamp= input archive log thread=1 sequence=18 recid=56 stamp= input archive log thread=1 sequence=19 recid=57 stamp= input archive log thread=1 sequence=20 recid=58 stamp= input archive log thread=1 sequence=21 recid=59 stamp= input archive log thread=1 sequence=22 recid=65 stamp= input archive log thread=1 sequence=23 recid=66 stamp= input archive log thread=1 sequence=24 recid=67 stamp= channel ORA_DISK_1: starting piece 1 at 10-APR-06 channel ORA_DISK_1: finished piece 1 at 10-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/backupset/ 58

59 2006_04_10/o1_mE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:26 channel ORA_DISK_1: starting archive log backupset channel ORA_DISK_1: specifying archive log(s) in backup set input archive log thread=1 sequence=1 recid=68 stamp= input archive log thread=1 sequence=2 recid=69 stamp= channel ORA_DISK_1: starting piece 1 at 10-APR-06 channel ORA_DISK_1: finished piece 1 at 10-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/backupset/ 2006_04_10/o1_mE channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02 Finished backup at 10-APR-06 Starting Control File and SPFILE Autobackup at 10-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/autobackup /2006_04_10/o1_E Finished Control File and SPFILE Autobackup at 10-APR Create a whole database backup. RMAN> backup database; Starting backup at 10-APR-06 released channel: ORA_SBT_TAPE_1 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02.dbf channel ORA_DISK_1: starting piece 1 at 10-APR-06 channel ORA_DISK_1: finished piece 1 at 10-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/backupset/ 2006_04_10/o1_mE 59

60 channel ORA_DISK_1: backup set complete, elapsed time: 00:01:25 Finished backup at 10-APR-06 Starting Control File and SPFILE Autobackup at 10-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/autobackup /2006_04_10/o1_E Finished Control File and SPFILE Autobackup at 10-APR-06 60

61 Solutions for Practice 4-4: Delete Obsolete Backups 1) Use Recovery Manager to view obsolete backups. 1. In your RMAN session, issue the REPORT OBSOLETE command to determine whether you have any obsolete backups. Note: Your results may vary from the following output. RMAN> report obsolete; RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 Report of obsolete backups and copies Type Key Completion Time Filename/Handle Archive Log MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log MAR-06 /u01/app/oracle/flash_recovery_ac Archive Log MAR-06 /u01/app/oracle/flash_recovery_ac Datafile Copy 4 21-MAR-06 /u01/app/oracle/flash_recovery_af Backup Set 5 21-MAR-06 Backup Piece 5 21-MAR-06 /u01/app/oracle/flash_recovery_ap Backup Set 7 22-MAR-06 Backup Piece 7 22-MAR-06 /u01/app/oracle/flash_recovery_ap Backup Set 9 22-MAR-06 Backup Piece MAR-06 /u01/app/oracle/flash_recovery_ap 2) Use Enterprise Manager Database Control to delete obsolete backups. 1. Invoke Enterprise Manager and log in as sys/oracle as SYSDBA. 2. Select Maintenance > High Availability > Backup/Recovery > Manage Current Backups. 61

62 3. Click Delete All Obsolete to remove obsolete backups. 4. Review the information on the Delete All Obsolete: Specify Job Parameters page and click Submit Job. 5. You receive the Job submission succeeded message. You can click View Job to monitor the job. After it completes successfully, return to the Database Home page. 6. Access the Manage Current Backups page again to view the backup sets and image copies that were retained. 3) You can also use RMAN to verify that your obsolete backups were deleted. 1. In your RMAN session, execute the REPORT OBSOLETE command. RMAN> report obsolete; RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 no obsolete backups found 62

63 Practice Solutions for Lesson 5 In this practice, you use Oracle Flashback features to recover from errors in your database. 63

64 Solutions for Practice 5-1: Enable Flashback Database 1) Use Enterprise Manager to enable Flashback Database. 1. Start Enterprise Manager and connect as SYS/ORACLE as SYSDBA. 2. Click the Maintenance tab. 3. Select Recovery Settings in the Backup/Recovery Settings section. 4. Scroll to the Flash Recovery section. 5. Select Enable Flashback Database - flashback logging can be used for fast database point-intime recovery and click Apply. 6. The Confirmation message is displayed. You must restart the database instance to enable Flashback Database. Click Yes to restart the database instance. 7. Supply the Host and Operating System credentials if they are not filled in by default. Click OK 64

65 8. The Restart Database: Confirmation page is displayed. Click Yes. 9. The Restart Database:Activity Information page is displayed. Wait a few minutes and click Refresh. 10. Log in to Enterprise Manager as SYS/ORACLE as SYSDBA. 2) Use the ALTER DATABASE command to enable supplemental logging. 1. In a terminal window, log in to SQL*Plus as SYSDBA. [oracle@edrsr10p1 oracle]$ sqlplus / as sysdba SQL*Plus: Release Production on Tue Apr 18 09:10: Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options 2. Execute the ALTER DATABASE command to enable supplemental logging. SQL> ALTER DATABASE add supplemental log data; Database altered. 65

66 Solutions for Practice 5-2: Set Restore Points and Perform Flashback Table Restore points are a way to bookmark database points in time. Set a restore point to remember a significant change so that you can quickly recover to that point in time without having to record an SCN or time. 1) You must enable row movement to use restore points. Use Enterprise Manager to enable row movement for the HR.LOCATIONS table. 1. Navigate to the Administration page. Select Tables in the Database Objects section. 2. Enter HR in the Schema field and LOCATIONS in the Object Name field. Click Go. 3. Select the HR.LOCATIONS table and click Edit. 4. Select the Options subtab. 5. Select Yes in the Enable Row Movement menu. Click Apply. 66

67 6. The Update Message is displayed indicating that the change has been made to the HR.LOCATIONS table. 7. Click the Database tab to return to the home page. 2) Create a normal restore point. 1. Select the Maintenance tab. 2. Select Manage Restore Points in the Backup/Recovery section. 3. Click Create on the Manage Restore Points page. 4. Enter Before_LOC_Update in the Restore Point Name field. Ensure that Normal Restore Point is selected. Click OK. 5. Your restore point has been created. 67

68 3) Use SQL*Plus to query the POSTAL_CODE column in the HR.LOCATIONS table. 1. Log in to SQL*Plus as SYSDBA. 2. Execute the lab_05_02_03_02.sql script to query the POSTAL_CODE column of the HR.LOCATIONS table. SQL> SELECT unique (postal_code) 2 FROM hr.locations 3 / POSTAL_CODE YSW 9T M5V 2L rows selected. 4) Execute the lab_05_02_04_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table so that all postal codes are set to Execute the lab_05_02_04_01.sql script. SQL> UPDATE hr.locations 2 SET postal_code = / 23 rows updated. 5) Execute the lab_05_02_05_01.sql script to query the POSTAL_CODE column in the HR.LOCATIONS table again. 1. Execute the lab_05_02_05_01.sql script. 68

69 SQL> SELECT unique (postal_code) 2 FROM hr.locations 3 / POSTAL_CODE ) Restore the POSTAL_CODE column values using the restore point. 1. Return to your Enterprise Manager session. 2. Copy the SCN value in the Creation SCN field to the buffer. 3. Click the database instance link to return to the Maintenance page. 4. Click Perform Recovery. 5. In the Object Level Recovery section, select Tables in the Object Type menu. Click Perform Object Level Recovery. 69

70 6. Select Flashback to a known SCN and paste the SCN that you copied in step 2. Click Next. 7. Click Add Tables to add the HR.LOCATIONS table. 8. Enter HR in the Schema Name field and LOCATIONS in the Table field. Click Search. 9. Select the HR.LOCATIONS table and click OK. 70

71 10. The HR.LOCATIONS table is added to the Tables to Flashback field. Click 11. Accept the default of Cascade: Flashback the selected tables and all dependent tables on the Dependency Options page. Click Next. 12. On the Perform Object Level Recovery: Review page, confirm the information. Click Submit. 13. The Confirmation page is displayed. Click OK to return to the Maintenance page. 7) Return to your SQL*Plus session. Execute the lab_05_02_07_01.sql script to query the POSTAL_CODE column in HR.LOCATIONS again to be sure the correct values have been restored. 71

72 1. Execute the lab_05_02_07_01.sql script. SQL> SELECT unique (postal_code) 2 FROM hr.locations 3 / POSTAL_CODE YSW 9T rows selected. 72

73 Solutions for Practice 5-3: Use Flashback Query and Flashback Versions Query 1) Execute the lab_05_03_01_01.sql script to query the HR.LOCATIONS table for location ID In SQL*Plus, execute the lab_05_03_01_01.sql script. SQL> SELECT * 2 FROM hr.locations 3 WHERE location_id = / LOCATION_ID STREET_ADDRESS POSTAL_CODE CITY STATE_PROVINCE CO Jabberwocky Rd Southlake Texas US 2) Execute the lab_05_03_02_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS table, simulating user error. 1. Invoke SQL*Plus and execute the lab_05_03_02_01.sql script. SQL> UPDATE hr.locations 2 SET postal_code = postal_code WHERE location_id = / 1 row updated. SQL> commit 2 / Commit complete. 3) Execute the lab_05_03_03_01.sql script to query the POSTAL_CODE column in HR.LOCATIONS and view the change. 1. Execute the lab_05_03_03_01.sql script. 73

74 SQL> SELECT * 2 FROM hr.locations 3 WHERE location_id = / LOCATION_ID STREET_ADDRESS POSTAL_CODE CITY STATE_PROVINCE CO Jabberwocky Rd Southlake Texas US 4) Execute the lab_05_03_04_01.sql script to update the POSTAL_CODE column in the HR.LOCATIONS 1. Execute the lab_05_03_04_01.sql script. SQL> UPDATE hr.locations 2 SET postal_code = postal_code WHERE location_id = / 1 row updated. SQL> commit 2 / Commit complete. 5) Use Enterprise Manager to perform Flashback Versions Query to correct the user errors. 1. Navigate to the Administration page. 2. Select Tables in the Database Objects section. 3. Enter HR in the Schema Name field and LOCATIONS in the Table field. Click Go. 74

75 4. Select the HR.LOCATIONS table. Select Flashback Versions Query in the Actions menu. Click Go. 5. Choose all the columns by selecting each in the Available Columns list and clicking Move to move it to the Selected Columns list. 6. Enter where location_id = 1400 in the Bind the Row Value field. Click Next 75

76 7. Select the oldest change to the table and click Next. 8. Confirm the flashback information. Click Next. 9. Accept the default of Cascade: Flashback the selected tables and all dependent tables. Click Next. 10. Review the information. Click Submit. 76

77 11. The Confirmation page is displayed. Click OK. 6) Return to your SQL*Plus session. Query the HR.LOCATIONS table to confirm the Flashback operation. 1. Execute the lab_05_03_06_01.sql script to query the HR.LOCATIONS table. SQL> SELECT * 2 FROM hr.locations 3 WHERE location_id = / LOCATION_ID STREET_ADDRESS POSTAL_CODE CITY STATE_PROVINCE CO Jabberwocky Rd Southlake Texas US 77

78 Solutions for Practice 5-4: Use Flashback Database 1) Use Enterprise Manager to verify that Flashback Database is enabled. 1. Navigate to the Maintenance page. 2. Select Recovery Settings in the Backup/Recovery Settings section. Scroll to the Flash Recovery section. Verify that Flashback Database is enabled. 3. Click the Database Instance link to return to the Maintenance page. 2) Use Enterprise Manager to create a Guaranteed Restore Point. 1. Select Manage Restore Points in the Backup/Recovery section. 2. Click Create to create a new restore point. 3. Enter Before_Truncate in the Restore Point Name field. Select Guaranteed Restore Point. Click OK. 78

79 4. The Restore Point is created. 3) Execute the lab_05_04_03_01.sql script to determine the number of rows in the HR.JOB_HISTORY table. Record the number of rows: 1. Execute the lab_05_04_03_01.sql script to determine the number of rows in the HR.JOB_HISTORY table. SQL> SELECT count(*) 2 FROM hr.job_history 3 / COUNT(*) ) Execute the lab_05_04_04_01.sql script to truncate the HR.JOB_HISTORY table. 1. Execute the lab_05_04_04_01.sql script. SQL> truncate table hr.job_history 2 / Table truncated. 5) Execute the lab_05_04_05_01.sql script to determine the number of rows in the HR.JOB_HISTORY table. 79

80 1. Execute the lab_05_04_05_01.sql script. SQL> SELECT count(*) 2 FROM hr.job_history 3 / COUNT(*) ) Use Flashback Database to restore the HR.JOB_HISTORY table rows. 1. Return to your Enterprise Manager window. 2. Navigate to the Maintenance page. 3. Select Manage Restore Points in the Backup/Recovery section. 4. Select the BEFORE_TRUNCATE restore point. Click Recover Whole Database To. 5. Enter the host credential information. Click Yes. 6. The database is shut down. Click Refresh. 80

81 7. Click Perform Recovery. 8. Enter Host Credentials. Click Continue. 9. Enter Database login. Click Login. 10. Click Perform Whole Database Recovery. 11. Select Recover to a prior point in time. 12. Select Restore Point and click the Flashlight icon. 13. Select the BEFORE_TRUNCATE restore point. Click Select 14. The Restore Point field is populated. Click Next. 81

82 15. Select Yes. Click Next. 16. Review the information. Click Submit. 17. The Processing: Perform Whole Database Recovery page is displayed. 18. The operation is complete. You can scroll through the output to view the details of the operation. Click Open Database to open the database. 19. The The database has been opened successfully message is displayed. Click OK. 7) Return to your SQL*Plus session. Execute the lab_05_04_07_02.sql script to query the HR.JOB_HISTORY table again to be sure the data has been restored. 1. Invoke SQL*Plus and log in as SYS/ORACLE as SYSDBA. 2. Execute the lab_05_04_07_02.sql script. 82

83 SQL> SELECT count(*) 2 FROM hr.job_history 3 / COUNT(*)

84 In this practice, you create a duplicate database. Practice Solutions for Lesson 6 84

85 Solutions for Practice 6-1: Create a Duplicate Database In this practice, you use RMAN to create a duplicate database on the same host as your database. 1) Create an Oracle password file for your auxiliary instance. 1. Change to the $ORACLE_HOME/dbs directory and use the orapwd utility to create a password file named orapwaux. Specify a password of oracle and 10 for the number of entries. [oracle@edrsr10p1 oracle]$ cd $ORACLE_HOME/dbs [oracle@edrsr10p1 dbs]$ orapwd file=orapwaux password=oracle entries=10 [oracle@edrsr10p1 dbs]$ ls hc_orcl.dat init.ora orapwaux snapcf_orcl.f initdw.ora lkorcl orapworcl spfileorcl.ora 2) Use Oracle Net Manager to create an entry called AUXDB in the tnsnames.ora file. 1. Open a terminal window and enter netmgr at the operating system prompt. [oracle@edrsr10p1 oracle]$ netmgr 2. The Oracle Net Manager window appears. 3. Expand Local and Service Naming. 4. Select Service Naming and click the green plus sign to create a new Net service name. 85

86 5. Enter auxdb in the Net Service Name field and click Next. 6. Select TCP/IP (default) as the protocol. Click Next. 7. Enter the host name of your PC in the Host Name field. Accept the default of 1521 for the port number. Click Next. 8. Enter aux.oracle.com in the Service Name field. Click Next. 86

87 9. Click Finish. 10. Select File and Save Network Configuration to save the changes you made. 11. Click File and Exit to exit from Oracle Net Manager. 12. You can view your updated tnsnames.ora file in the /u01/app/oracle/product/10.2.0/db_1/network/admin directory. AUXDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = edrsr10p1.us.oracle.com)(port = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = aux.oracle.com) ) 3) Create an initialization parameter file for the auxiliary instance. 1. Create a text initialization parameter file named initaux.ora from your server parameter file in the $HOME/auxinstance directory. [oracle@edrsr10p1 oracle]$ cd $HOME/auxinstance [oracle@edrsr10p1 auxinstance]$ sqlplus / as sysdba SQL*Plus: Release Production on Wed Mar 29 10:51: Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Production With the Partitioning, OLAP and Data Mining options SQL> create pfile='$home/auxinstance/initaux.ora' from spfile; File created. 2. Edit the initaux.ora initialization parameter file to make the following changes for the auxiliary instance: audit_file_dest='/u01/app/oracle/admin/aux/adump' background_dump_dest='/u01/app/oracle/admin/aux/bdump control_files='/u01/app/oracle/oradata/aux/control01.c tl','/u01/app/oracle/oradata/aux/control02.ctl','/u01/ 87

88 app/oracle/oradata/aux/control03.ctl' db_name='aux' user_dump_dest='/u01/app/oracle/admin/aux/udump' Add the following parameters: DB_FILE_NAME_CONVERT= /u01/app/oracle/oradata/orcl, /u01/app/oracle/oradata/aux LOG_FILE_NAME_CONVERT= /u01/app/oracle/oradata/orcl, /u01/app/oracle/oradata/aux Remove the lines at the beginning of the file that begin with orcl.. Add the comment character, #, to this line: *.dispatchers='(protocol=tcp) (SERVICE=orclXDB)' 4) Start the auxiliary instance in NOMOUNT mode using the initaux.ora file. 1. Set the ORACLE_SID environment variable to aux. oracle]$ ORACLE_SID=aux oracle]$ echo $ORACLE_SID Aux 2. Invoke SQL*Plus and connect as SYSDBA. oracle]$ sqlplus / as sysdba SQL*Plus: Release Production on Wed Mar 29 11:38: Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to an idle instance. 3. Start the instance in NOMOUNT mode using the initialization parameter file you created in step 2. SQL> startup nomount pfile='$home/auxinstance/initaux.ora' ORACLE instance started. Total System Global Area bytes Fixed Size bytes Variable Size bytes Database Buffers bytes Redo Buffers bytes 5) Create a server parameter file (SPFILE). 88

89 1. Create a server parameter file with the default name of spfileaux.ora from the text initialization parameter file. SQL> create spfile from pfile='$home/auxinstance/initaux.ora'; File created. 2. Exit from SQL*Plus. 6) Verify that your target database (orcl database) is mounted or open. 1. Set your ORACLE_SID to orcl. [oracle@edrsr10p1 oracle]$ ORACLE_SID=orcl [oracle@edrsr10p1 oracle]$ echo $ORACLE_SID orcl [oracle@edrsr10p1 oracle]$ 2. Log in to SQL*Plus as SYSDBA. 3. Query V$DATABASE to determine whether your database is open. SQL> select open_mode from v$database; OPEN_MODE READ WRITE 4. Exit from SQL*Plus. 7) Start RMAN with a connection to the target database (orcl) and the auxiliary instance. 1. Set your ORACLE_SID to aux. Invoke RMAN and connect as SYSDBA.Connect to the target database. [oracle@edrsr10p1 oracle]$ ORACLE_SID=aux [oracle@edrsr10p1 oracle]$ echo $ORACLE_SID aux [oracle@edrsr10p1 oracle]$ rman Recovery Manager: Release Production on Thu Mar 30 07:34: Copyright (c) 1982, 2005, Oracle. All rights reserved. RMAN> connect auxiliary sys/oracle connected to auxiliary database: AUX (not mounted) 89

90 RMAN> connect target connected to target database: ORCL (DBID= ) 8) Create the duplicate database by executing the DUPLICATE command. 1. Create a RUN block to allocate the auxiliary channel and execute the DUPLICATE command. RMAN> run 2> { 3> allocate auxiliary channel aux1 device type disk; 4> duplicate target database to aux; 5> } allocated channel: aux1 channel aux1: sid=156 devtype=disk Starting Duplicate Db at 30-MAR-06 allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=154 devtype=disk using channel ORA_AUX_SBT_TAPE_1 contents of Memory Script: { set until scn ; set newname for datafile 1 to "/u01/app/oracle/oradata/aux/system01.dbf"; set newname for datafile 2 to "/u01/app/oracle/oradata/aux/undotbs01.dbf"; set newname for datafile 3 to "/u01/app/oracle/oradata/aux/sysaux01.dbf"; set newname for datafile 4 to "/u01/app/oracle/oradata/aux/users01.dbf"; set newname for datafile 5 to "/u01/app/oracle/oradata/aux/example01.dbf"; restore check readonly clone database ; } executing Memory Script executing command: SET until clause executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME 90

91 executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 30-MAR-06 using channel ORA_AUX_DISK_1 using channel ORA_AUX_SBT_TAPE_1 channel aux1: restoring datafile input datafile copy recid=23 stamp= filename=/u01/app/oracle/flash_recf destination for restore of datafile 00001: /u01/app/oracle/oradata/aux/system01f channel ORA_AUX_DISK_1: restoring datafile input datafile copy recid=20 stamp= filename=/u01/app/oracle/flash_recf destination for restore of datafile 00002: /u01/app/oracle/oradata/aux/undotbs0f channel ORA_AUX_DISK_1: copied datafile copy of datafile output filename=/u01/app/oracle/oradata/aux/undotbs01.dbf channel ORA_AUX_DISK_1: restoring datafile input datafile copy recid=22 stamp= filename=/u01/app/oracle/flash_recf destination for restore of datafile 00003: /u01/app/oracle/oradata/aux/sysaux01f channel aux1: copied datafile copy of datafile output filename=/u01/app/oracle/oradata/aux/system01.dbf channel aux1: restoring datafile input datafile copy recid=19 stamp= filename=/u01/app/oracle/flash_recf destination for restore of datafile 00004: /u01/app/oracle/oradata/aux/users01.f channel ORA_AUX_DISK_1: copied datafile copy of datafile output filename=/u01/app/oracle/oradata/aux/sysaux01.dbf channel ORA_AUX_DISK_1: restoring datafile input datafile copy recid=21 stamp= filename=/u01/app/oracle/flash_recf destination for restore of datafile 00005: /u01/app/oracle/oradata/aux/example0f channel aux1: copied datafile copy of datafile output filename=/u01/app/oracle/oradata/aux/users01.dbf channel ORA_AUX_DISK_1: copied datafile copy of datafile output filename=/u01/app/oracle/oradata/aux/example01.dbf Finished restore at 30-MAR-06 sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUX" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 91

92 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/app/oracle/oradata/aux/redo01.log' ) SIZE 50 M REUSE, GROUP 2 ( '/u01/app/oracle/oradata/aux/redo02.log' ) SIZE 50 M REUSE, GROUP 3 ( '/u01/app/oracle/oradata/aux/redo03.log' ) SIZE 50 M REUSE DATAFILE '/u01/app/oracle/oradata/aux/system01.dbf' CHARACTER SET AL32UTF8 contents of Memory Script: { Switch clone datafile all; } executing Memory Script released channel: ORA_AUX_DISK_1 released channel: ORA_AUX_SBT_TAPE_1 datafile 2 switched to datafile copy input datafile copy recid=1 stamp= filename=/u01/app/oracle/oradata/auf datafile 3 switched to datafile copy input datafile copy recid=2 stamp= filename=/u01/app/oracle/oradata/auf datafile 4 switched to datafile copy input datafile copy recid=3 stamp= filename=/u01/app/oracle/oradata/auf datafile 5 switched to datafile copy input datafile copy recid=4 stamp= filename=/u01/app/oracle/oradata/auf contents of Memory Script: { set until scn ; recover clone database delete archivelog ; } executing Memory Script executing command: SET until clause Starting recover at 30-MAR-06 channel aux1: starting incremental datafile backupset restore channel aux1: specifying datafile(s) to restore from 92

93 backup set destination for restore of datafile 00001: /u01/app/oracle/oradata/aux/system01f destination for restore of datafile 00002: /u01/app/oracle/oradata/aux/undotbs0f destination for restore of datafile 00003: /u01/app/oracle/oradata/aux/sysaux01f destination for restore of datafile 00004: /u01/app/oracle/oradata/aux/users01.f destination for restore of datafile 00005: /u01/app/oracle/oradata/aux/example0f channel aux1: reading from backup piece /u01/app/oracle/flash_recovery_area/orcp channel aux1: restored backup piece 1 piece handle=/u01/app/oracle/flash_recovery_area/orcl/backupset/ 2006_03_28/o1_m4 channel aux1: restore complete, elapsed time: 00:00:16 starting media recovery archive log thread 1 sequence 1 is already on disk as file /u01/app/oracle/flasc archive log thread 1 sequence 2 is already on disk as file /u01/app/oracle/flasc archive log filename=/u01/app/oracle/flash_recovery_area/orcl/archivel og/2006_01 archive log filename=/u01/app/oracle/flash_recovery_area/orcl/archivel og/2006_02 media recovery complete, elapsed time: 00:00:05 Finished recover at 10-APR-06 contents of Memory Script: { shutdown clone; startup clone nomount ; } executing Memory Script database dismounted Oracle instance shut down connected to auxiliary database (not started) Oracle instance started Total System Global Area Fixed Size Variable Size Database Buffers bytes bytes bytes bytes 93

94 Redo Buffers bytes sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUX" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ( '/u01/app/oracle/oradata/aux/redo01.log' ) SIZE 50 M REUSE, GROUP 2 ( '/u01/app/oracle/oradata/aux/redo02.log' ) SIZE 50 M REUSE, GROUP 3 ( '/u01/app/oracle/oradata/aux/redo03.log' ) SIZE 50 M REUSE DATAFILE '/u01/app/oracle/oradata/aux/system01.dbf' CHARACTER SET AL32UTF8 contents of Memory Script: { set newname for tempfile 1 to "/u01/app/oracle/oradata/aux/temp01.dbf"; switch clone tempfile all; catalog clone datafilecopy "/u01/app/oracle/oradata/aux/undotbs01.dbf"; catalog clone datafilecopy "/u01/app/oracle/oradata/aux/sysaux01.dbf"; catalog clone datafilecopy "/u01/app/oracle/oradata/aux/users01.dbf"; catalog clone datafilecopy "/u01/app/oracle/oradata/aux/example01.dbf"; catalog clone datafilecopy "/u01/app/oracle/oradata/aux/example02.dbf"; switch clone datafile all; } executing Memory Script executing command: SET NEWNAME renamed temporary file 1 to /u01/app/oracle/oradata/aux/temp01.dbf in control fe cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/undotbs01.dbf recid=1 stamp=8 cataloged datafile copy datafile copy 94

95 filename=/u01/app/oracle/oradata/aux/sysaux01.dbf recid=2 stamp=59 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/users01.dbf recid=3 stamp=589 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/example01.dbf recid=4 stamp=9 cataloged datafile copy datafile copy filename=/u01/app/oracle/oradata/aux/example02.dbf recid=5 stamp=9 datafile 2 switched to datafile copy input datafile copy recid=1 stamp= filename=/u01/app/oracle/oradata/auf datafile 3 switched to datafile copy input datafile copy recid=2 stamp= filename=/u01/app/oracle/oradata/auf datafile 4 switched to datafile copy input datafile copy recid=3 stamp= filename=/u01/app/oracle/oradata/auf datafile 5 switched to datafile copy input datafile copy recid=4 stamp= filename=/u01/app/oracle/oradata/auf datafile 6 switched to datafile copy input datafile copy recid=5 stamp= filename=/u01/app/oracle/oradata/auf contents of Memory Script: { Alter clone database open resetlogs; } executing Memory Script database opened Finished Duplicate Db at 10-APR After the DUPLICATE DATABASE operation completes, exit from RMAN. 9) Use SQL*Plus to log in to your AUX database and execute a query against the HR.REGIONS table. 1. Verify that ORACLE_SID is set to aux. 95

96 2. Log in to SQL*Plus as SYSDBA and execute a query against the HR.REGIONS table. SQL> select * from hr.regions; REGION_ID REGION_NAME Europe 2 Americas 3 Asia 4 Middle East and Africa 10) Now that you have completed the test recovery by creating a duplicate database, shutdown the aux instance. 1. Connect as SYSDBA and execute the SHUTDOWN IMMEDIATE command. SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> 2. Exit from SQL*Plus. 11) Change your ORACLE_SID to orcl in preparation for later practices. 1. At the operating prompt, enter ORACLE_SID=orcl to change your ORACLE_SID. [oracle@edrsr10p1 oracle]$ ORACLE_SID=orcl [oracle@edrsr10p1 oracle]$ echo $ORACLE_SID orcl 96

97 Practice Solutions for Lesson 7 In this practice, you use tablespace point-in-time recovery to recover from unwanted changes to your database. 97

98 Solutions for Practice 7-1: Use Tablespace Point-in-time Recovery 1) Execute the lab_07_01_01_01.sh script to export the HR schema. 1. In a terminal window, change to the labs directory and execute the lab_07_01_01_01.sh script to export the HR schema. [oracle@edrsr10p1 labs]$./lab_07_01_01_01.sh Export: Release Production on Wednesday, 12 April, :03:27 Copyright (c) 2003, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Produn With the Partitioning, OLAP and Data Mining options tarting "SYSTEM"."SYS_EXPORT_SCHEMA_01": system/******** dumpfile=hrexp.dmp sr Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 448 KB Processing object type SCHEMA_EXPORT/USER Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/COMMENT Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE Processing object type SCHEMA_EXPORT/VIEW/VIEW Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/TRIGGER Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS.. exported "HR"."COUNTRIES" KB 25 rows 98

99 .. exported "HR"."DEPARTMENTS" KB 27 rows.. exported "HR"."EMPLOYEES" KB 107 rows.. exported "HR"."JOBS" KB 19 rows.. exported "HR"."JOB_HISTORY" KB 10 rows.. exported "HR"."LOCATIONS" KB 23 rows.. exported "HR"."REGIONS" KB 4 rows Master table "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully loaded/unloaded ********************************************************** ******************** Dump file set for SYSTEM.SYS_EXPORT_SCHEMA_01 is: /u01/app/oracle/product/10.2.0/db_1/rdbms/log/hrexp.dmp Job "SYSTEM"."SYS_EXPORT_SCHEMA_01" successfully completed at 13:03:44 2) Execute the lab_07_01_02_02.sql script to create a new tablespace and a new user in your database. 1. In your terminal window, log in to SQL*Plus as SYSDBA. 2. Execute the lab_07_01_02_02.sql script to create the HRTEST tablespace and the HRTEST user. SQL> SET TERMOUT ON SQL> CONNECT / AS SYSDBA Connected. SQL> REM ***** Tablespace for the HR import ***** SQL> CREATE SMALLFILE TABLESPACE HRTEST 2 DATAFILE '/u01/app/oracle/oradata/orcl/hrtest01.dbf' SIZE 10M 3 AUTOEXTEND ON NEXT 500K MAXSIZE UNLIMITED LOGGING 4 EXTENT MANAGEMENT LOCAL 5 SEGMENT SPACE MANAGEMENT AUTO; Tablespace created. SQL> REM ***** User/schema for the HR import ***** SQL> CREATE USER hrtest 2 PROFILE DEFAULT 3 IDENTIFIED BY hrtest 4 DEFAULT TABLESPACE hrtest 5 TEMPORARY TABLESPACE temp 99

100 6 QUOTA UNLIMITED ON hrtest 7 ACCOUNT UNLOCK 8 ; User created. SQL> GRANT connect, resource 2 TO hrtest; Grant succeeded. 3) Execute the lab_07_01_03_01.sh script to populate the new tablespace with a copy of the data from the HR schema. Note: The import should complete successfully. You will receive error messages because the import excludes the COUNTRIES, REGIONS, and LOCATIONS tables. These messages can be ignored. 1. In your terminal window at the operating system prompt, execute the lab_07_01_03_01.sh script. [oracle@edrsr10p1 labs]$./lab_07_01_03_01.sh Import: Release Production on Friday, 14 April, :08:42 Copyright (c) 2003, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release Produn With the Partitioning, OLAP and Data Mining options Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded Starting "SYSTEM"."SYS_IMPORT_FULL_01": system/******** dumpfile=hrexp.dmp par Processing object type SCHEMA_EXPORT/USER ORA-31684: Object type USER:"HRTEST" already exists Processing object type SCHEMA_EXPORT/SYSTEM_GRANT Processing object type SCHEMA_EXPORT/ROLE_GRANT Processing object type SCHEMA_EXPORT/DEFAULT_ROLE Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE Processing object type SCHEMA_EXPORT/TABLE/TABLE Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA.. imported "HRTEST"."DEPARTMENTS" KB 27 rows 100

101 .. imported "HRTEST"."EMPLOYEES" KB 107 rows.. imported "HRTEST"."JOBS" KB 19 rows.. imported "HRTEST"."JOB_HISTORY" KB 10 rows Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS Processing object type SCHEMA_EXPORT/TABLE/COMMENT Processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE Processing object type SCHEMA_EXPORT/VIEW/VIEW ORA-39082: Object type VIEW:"HRTEST"."EMP_DETAILS_VIEW" created with compilatios Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT ORA-39083: Object type REF_CONSTRAINT failed to create with error: ORA-00942: table or view does not exist Failing sql is: ALTER TABLE "HRTEST"."DEPARTMENTS" ADD CONSTRAINT "DEPT_LOC_FK" FOREIGN KEY ("LE Processing object type SCHEMA_EXPORT/TABLE/TRIGGER Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 3 error(s) at 07:08:54 4) Create a backup of your database using RMAN. 1. Invoke RMAN and connect to your target database. 2. Execute the BACKUP DATABASE command. RMAN> backup database; Starting backup at 14-APR-06 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=127 devtype=disk channel ORA_DISK_1: starting full datafile backupset 101

102 channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/hrtest01.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02.dbf channel ORA_DISK_1: starting piece 1 at 14-APR-06 channel ORA_DISK_1: finished piece 1 at 14-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/backupset/ 2006_04_14/o1_mE channel ORA_DISK_1: backup set complete, elapsed time: 00:01:35 Finished backup at 14-APR-06 Starting Control File and SPFILE Autobackup at 14-APR-06 piece handle=/u01/app/oracle/flash_recovery_area/orcl/autobackup /2006_04_14/o1_E Finished Control File and SPFILE Autobackup at 14-APR-06 5) Record the current SCN: 1. Invoke SQL*Plus as SYSDBA. 2. Query the CURRENT_SCN column in V$DATABASE and record the current SCN. SQL> select current_scn from V$database; CURRENT_SCN ) Record the current time. 1. Execute the date command at the operating system prompt. [oracle@edrsr10p1 labs]$ date Fri Apr 14 13:07:57 PDT

103 7) Execute the lab_07_01_07_01.sql script to query the HRTEST.EMPLOYEES table and view information about employees in department 60. Make note of the highest salary that is displayed: 1. Execute the lab_07_01_07_01.sql script. SQL> select employee_id, last_name, salary 2 from employees 3 where department_id = 60 4 / EMPLOYEE_ID LAST_NAME SALARY Hunold Ernst Austin Pataballa Lorentz ) Execute the lab_07_01_08_01.sql script to update the salaries for the employees in department 60 and note the highest salary displayed. Highest salary: 1. Execute the lab_07_01_08_01.sql script. SQL> update hrtest.employees 2 set salary = salary * where department_id = 60 4 / 5 rows updated. SQL> select employee_id, last_name, salary 2 from hrtest.employees 3 where department_id = 60 4 / EMPLOYEE_ID LAST_NAME SALARY Hunold Ernst Austin Pataballa Lorentz

104 9) You now want to perform TSPITR for the HRTEST tablespace to return it to the state prior to the updates. Execute the lab_07_01_09_01.sql script to determine whether there are any dependencies that will prevent the TSPITR operation. 1. Execute the lab_07_01_09_01.sql script. SQL> SELECT obj1_owner, obj1_name, obj1_type, ts1_name, 2 obj2_owner, obj2_name, obj2_type, ts2_name, 3 constraint_name, reason 4 FROM SYS.TS_PITR_CHECK 5 WHERE (TS1_NAME IN ('HRTEST') 6 AND TS2_NAME NOT IN ('HRTEST')) 7 OR (TS1_NAME NOT IN ('HRTEST') 8 AND TS2_NAME IN ('HRTEST')) 9 / no rows selected No rows selected indicates that there are no dependencies to any tablespaces outside of the recovery set, so you can proceed with the tablespace point-in-time recovery. 10) You can use Enterprise Manager Database Control or RMAN command line to perform tablespace point-in-time recovery. The answer presents the solution using Enterprise Manager Database Control. If you want to use RMAN command line, refer to the course notes for detailed information and execute the RECOVER TABLESPACE command as follows: RECOVER TABLESPACE hrtest UNTIL SCN <scn> AUXILIARY DESTINATION /u01/app/oracle/oradata/tspitr ; 1. Invoke Enterprise Manager Database Control and log in as SYS/ORACLE as SYSDBA. 2. Select the Maintenance page. 3. Select Perform Recovery in the Backup/Recovery section. 4. Select Tablespaces in the Object Level Recovery section. The page refreshes. Accept the default selection Recover to current time or a previous point-in-time. Click Perform Object Level Recovery. 104

105 5. Select Recover to a prior point-in-time and specify the SCN you recorded earlier. Click Next. 105

106 6. Specify the auxiliary instance location of /u01/app/oracle/oradata/tspitr. Click Add to select the tablespace. 7. Select the HRTEST tablespace. Click Select. 106

107 8. Select the HRTEST tablespace and click Next. 9. Accept No. Restore the files to the default location. On the Perform Object Level Recovery: Rename page. Click Next. 10. Review the information and click Submit. 107

108 11. The Processing: Perform Object Level Recovery page is displayed. 12. After the recovery completes, the Perform Recovery: Result page is displayed. You can review the TSPITR operation by scrolling through the output window. 13. Click OK. 11) Verify that the HRTEST tablespace is online. 1. In Enterprise Manager Database Control, navigate to the Administration page. 2. Select Tablespaces and view the status of the HRTEST tablespace. 108

109 12) Verify that the SALARY columns in HRTEST.EMPLOYEES for the employees in department 60 contain the correct values. 1. Invoke SQL*Plus and execute the lab_07_01_12_01.sql script. SQL> select employee_id, last_name, salary 2 from hrtest.employees 3 where department_id = 60 4 / EMPLOYEE_ID LAST_NAME SALARY Hunold Ernst Austin Pataballa Lorentz The highest salary value should be back to the original value you recorded in step 7. 13) Execute the lab_07_01_13_02.sql script to add a constraint to the HRTEST.DEPARTMENTS table. 1. Invoke SQL*Plus and connect as SYSDBA. 2. Execute the lab_07_01_13_02.sql script. SQL> connect / as sysdba Connected. SQL> GRANT references (location_id) on hr.locations to Hrtest 2 / Grant succeeded. SQL> connect hrtest/hrtest Connected. 109

110 SQL> ALTER TABLE hrtest.departments 2 ADD CONSTRAINT dept_loc_id_fk FOREIGN KEY (location_id) 3 REFERENCES hr.locations (location_id) 4 / Table altered. 14) Assume you need to perform TSPITR on the HRTEST tablespace again. Execute the lab_07_01_14_02.sql query to determine whether there are any dependencies outside the recovery set. 1. Invoke SQL*Plus and connect as SYSDBA. 2. Execute the lab_07_01_14_02.sql script. SQL> set echo on SQL> SELECT obj1_owner, obj1_name, obj1_type, ts1_name, 2 obj2_owner, obj2_name, obj2_type, ts2_name, 3 constraint_name, reason 4 FROM SYS.TS_PITR_CHECK 5 WHERE (TS1_NAME IN ('HRTEST') 6 AND TS2_NAME NOT IN ('HRTEST')) 7 OR (TS1_NAME NOT IN ('HRTEST') 8 AND TS2_NAME IN ('HRTEST')) 9 / OBJ1_OWNER OBJ1_NAME OBJ1_TYPE TS1_NAME OBJ2_OWNER OBJ2_NAME OBJ2_TYPE TS2_NAME CONSTRAINT_NAME REASON HR LOCATIONS TABLE EXAMPLE HRTEST DEPARTMENTS TABLE HRTEST DEPT_LOC_ID_FK constraint between tables not contained in recovery set HR LOCATIONS TABLE EXAMPLE HRTEST DEPARTMENTS TABLE HRTEST DEPT_MGR_FK constraint between tables not contained in recovery set HR LOCATIONS TABLE EXAMPLE HRTEST DEPARTMENTS TABLE HRTEST DEPT_ID_PK constraint between tables not contained in recovery set HR LOCATIONS TABLE EXAMPLE 110

111 HRTEST DEPARTMENTS TABLE HRTEST DEPT_NAME_NN constraint between tables not contained in recovery set 15) If you wanted to complete the tablespace point-in-time recovery for the HRTEST tablespace now, what would you need to do? Note: You will not perform another tablespace point-in-recovery in this practice. You would need to disable the DEPT_LOC_ID_FK constraint that was added to your HRTEST.DEPARTMENTS table or you would need to add the tablespace that contains the HR.LOCATIONS table to your recovery set. 111

112 Practice Solutions for Lesson 8 In this practice, you create a recovery catalog in your instructor s database and register your database in the recovery catalog. 112

113 Solutions for Practice 8-1: Create the Recovery Catalog and Register the Database The tablespace for the recovery catalog and the recovery catalog owner have been created in the instructor database. The tablespaces are named RCTS01 RCTS12. The users are named RCUSER01 RCUSER12. 1) Connect to the recovery catalog database (instructor s database) with the appropriate recovery catalog owner name (if you are using PC01, connect as RCUSER01) using RMAN. Create the recovery catalog in your assigned tablespace. (If you are using PC01, your assigned tablespace is RCTS01.) The service name is RCDB. This example uses RCUSER10 as the username and password. Your assigned username and password may differ from this example. [oracle@edrsr10p1 oracle]$ rman catalog rcuser10/rcuser10@rcdb Recovery Manager: Release Production on Thu Mar 16 13:58: Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to recovery catalog database RMAN> create catalog recovery catalog created RMAN> exit Recovery Manager complete. 2) Using RMAN, connect to your target database and the recovery catalog database. [oracle@edrsr10p1 oracle]$ rman target / catalog rcuser10/rcuser10@rcdb Recovery Manager: Release Production on Thu Mar 16 14:22: Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: ORCL (DBID= ) connected to recovery catalog database RMAN> 3) Using RMAN, execute the command to resynchronize the control file and recovery 113

114 catalog. What happens? Why? The target database is not yet registered in the recovery catalog, so the resync command fails. RMAN> resync catalog; RMAN-00571: ========================================================== = RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: ========================================================== = RMAN-03002: failure of resync command at 03/16/ :28:21 RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target datg 4) Register the target database in the recovery catalog. You can use RMAN commandline or Enterprise Manager for this step. Use RMAN command-line OR Enterprise Manager Database Control. 1. Using RMAN: RMAN> register database; database registered in recovery catalog starting full resync of recovery catalog full resync complete RMAN> 2. Using Enterprise Manager: Select Recovery Catalog Settings on the Maintenance Page. Select Add Recovery Catalog on the Recovery Catalog Settings page. 114

115 The Add Recovery Catalog: Database page is displayed. On this page, enter the information requested for the recovery catalog database. Click Next. Review the information on the Add Recovery Catalog: Review page and click Finish. The Processing: Configure Catalog page is displayed. After processing completes, you are returned to the Recovery Catalog Settings page. Select Use Recovery Catalog and click OK. 115

116 The Processing: Register Database page is displayed. After the processing completes, the Recovery Catalog Settings page is displayed indicating that the database was successfully registered with the recovery catalog. 116

117 5) Create an RMAN script named whole_backup to make a whole database backup. Do not execute the whole_backup script at this time. 1. Using RMAN, connect to your target database and the recovery catalog. [oracle@edrsr10p1 oracle]$ rman target / catalog rcuser10/rcuser10@rcdb Recovery Manager: Release Production on Mon Mar 20 11:59: Copyright (c) 1982, 2005, Oracle. All rights reserved. connected to target database: ORCL (DBID= ) connected to recovery catalog database 2. Create the whole_backup script using the CREATE SCRIPT command. RMAN> CREATE SCRIPT whole_backup 2> { 3> BACKUP DATABASE; 4> } created script whole_backup 6) Use the PRINT command to query the recovery catalog and verify the creation of your whole_backup script. RMAN> PRINT SCRIPT whole_backup; printing stored script: whole_backup {BACKUP DATABASE; } RMAN> 7) In preparation for later practices, use RMAN to unregister your database from the recovery catalog. 1. Connect to your target database and the recovery catalog. 2. Execute the UNREGISTER DATABASE command. RMAN> unregister database; database name is "ORCL" and DBID is Do you really want to unregister the database (enter YES or NO)? yes database unregistered from the recovery catalog 117

118 In this practice, you monitor the progress of your RMAN backup jobs. Practice Solutions for Lesson 9 118

119 Solutions for Practice 9-1: Use SQL to Monitor the Progress of RMAN Backups 1) Invoke RMAN and delete all obsolete backups. 1. Invoke RMAN and connect to your target database. 2. Execute the DELETE OBSOLETE command. RMAN> delete obsolete; using target database control file instead of recovery catalog RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=133 devtype=disk allocated channel: ORA_SBT_TAPE_1 channel ORA_SBT_TAPE_1: sid=158 devtype=sbt_tape channel ORA_SBT_TAPE_1: Oracle Secure Backup Deleting the following obsolete backups and copies: Type Key Completion Time Filename/Handle Backup Set APR-06 Backup Piece APR-06 /u01/app/oracle/flash_recovery_ap Archive Log APR-06 /u01/app/oracle/flash_recovery_ac Backup Set APR-06 Backup Piece APR-06 /u01/app/oracle/flash_recovery_ap Do you really want to delete the above objects (enter YES or NO)? yes eleted backup piece backup piece handle=/u01/app/oracle/flash_recovery_area/orcl/backupset/ 2006_04_8 deleted archive log archive log filename=/u01/app/oracle/flash_recovery_area/orcl/archivel og/2006_08 Deleted 18 objects RMAN> 119

120 2) Open a second terminal window. Change to the labs directory. Invoke SQL*Plus and connect as SYSDBA. You will use this second session to monitor a database backup. 3) Return to your first terminal window. In your RMAN session, begin a whole database backup. 1. Execute the RMAN BACKUP DATABASE command. RMAN> backup database; Starting backup at 17-APR-06 released channel: ORA_SBT_TAPE_1 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backupset channel ORA_DISK_1: specifying datafile(s) in backupset input datafile fno=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf input datafile fno=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf input datafile fno=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf input datafile fno=00002 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf input datafile fno=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf input datafile fno=00007 name=/u01/app/oracle/oradata/orcl/hrtest01.dbf input datafile fno=00006 name=/u01/app/oracle/oradata/orcl/example02.dbf channel ORA_DISK_1: starting piece 1 at 17-APR-06 4) Use your SQL*Plus session to monitor the progress of the whole database backup by querying the V$SESSION_LONGOPS view. By using this view you can determine whether the backup is progressing normally or hanging. If the backup is progressing normally, the TIME_REMAINING column should be decreasing. Execute the lab_09_01_04_01.sql script to query V$SESSION_LONGOPS. 1. Execute the lab_09_01_04_01.sql script. SQL> SELECT sid,start_time,elapsed_seconds, time_remaining 2 FROM v$session_longops 3 / SID START_TIM ELAPSED_SECONDS TIME_REMAINING APR-06 0 Solutions for Practice 9-2: Use Enterprise Manager to Monitor RMAN Jobs 120

121 You can easily monitor RMAN jobs in Enterprise Manager. 1) Start Enterprise Manager and log in as SYS/ORACLE as SYSDBA. 2) Delete obsolete backups. 1. Navigate to the Maintenance page. 2. Select Manage Current Backups. 3. On the Manage Current Backups page, click Delete All Obsolete. 4. Click Submit Job. 5. The job is submitted. Click View Job to view the progress of the Delete All Obsolete job. 121

122 6. You can view additional information by clicking the links in the Logs section. 7. Click the Database tab to return to the home page. 3) Start a whole database backup. 1. Navigate to the Maintenance page. 2. Select Schedule Backup in the Backup/Recovery section. 3. Select Whole Database in the Customized Backup section. Click Schedule Customized Backup. 122

123 4. Select Full Backup in the Backup Type section. Select Online Backup in the Backup Mode section. Deselect Also back up all archived logs on disk in the Advanced section. Select Delete obsolete backups in the Advanced section. Click Next. 5. On the Schedule Customized Backup: Settings page, select Disk. Click Next. 6. Accept the default values on the Schedule Customized Backup: Schedule page. Click Next. 7. Click Submit Job. 123

124 8. Click View Job. 9. Information about the job is displayed. Click the links in the Logs section to view additional information. 124

125 10. You can view detailed information about each job step. Click the Job Run link to return to the Job page. 11. Click the Database tab to return to the home page. 125

If you have not multiplexed your online redo logs, then you are only left with incomplete recovery. Your steps are as follows:

If you have not multiplexed your online redo logs, then you are only left with incomplete recovery. Your steps are as follows: How to Recover lost online redo logs? Author A.Kishore If you lose the current online redo log, then you will not be able to recover the information in that online redo log. This is one reason why redo

More information

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue

Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue Oracle 12c Recovering a lost /corrupted table from RMAN Backup after user error or application issue Oracle 12c has automated table level recovery using RMAN. If you lose a table after user error or get

More information

Database Disaster Recovery using only RMAN Backups

Database Disaster Recovery using only RMAN Backups 12 th Apr, 2010 PURPOSE This paper demonstrates how an Oracle Database can be recovered or reconstructed by using only the RMAN Backup files (from Disks) in case of a complete server crash. CASE STUDY

More information

Performing Database and File System Backups and Restores Using Oracle Secure Backup

Performing Database and File System Backups and Restores Using Oracle Secure Backup Performing Database and File System Backups and Restores Using Oracle Secure Backup Purpose This lesson introduces you to Oracle Secure Backup which enables you to perform database and file system backups

More information

RMAN BACKUP & RECOVERY. Recovery Manager. Veeratteshwaran Sridhar

RMAN BACKUP & RECOVERY. Recovery Manager. Veeratteshwaran Sridhar RMAN Recovery Manager BACKUP & RECOVERY Veeratteshwaran Sridhar Why Backup & Recovery? The purpose of a backup and recovery strategy is to protect the database against data loss and reconstruct the database

More information

Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery

Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery Oracle 11gR2 : Recover dropped tablespace using RMAN tablespace point in time recovery Mohamed Azar Oracle DBA http://mohamedazar.wordpress.com 1 Mohamed Azar http://mohamedazar.wordpress.com This is new

More information

Oracle 10g Feature: RMAN Incrementally Updated Backups

Oracle 10g Feature: RMAN Incrementally Updated Backups Oracle 10g Feature: RMAN Incrementally Updated Backups Author: Dave Anderson, SkillBuilders Date: September 13, 2004 Introduction This article explains one of the features presented by Dave Anderson at

More information

HOW TO. RMAN Restore for Standby 10gR2

HOW TO. RMAN Restore for Standby 10gR2 Author: Martin Decker Date: 8.10.2008 Subject: RMAN Restore for Standby 10gR2 HOW TO RMAN Restore for Standby 10gR2 1 Preparations The existing database MDDB1 should be duplicated as Standby Database MDSTB1

More information

Backup/Restore Oracle 8i/9i/10g

Backup/Restore Oracle 8i/9i/10g This chapter will describe in details how Software backup your Oracle Database Server and how you can restore an Oracle database using the backup files. Table of Content 1. Requirements 2. Overview 3.

More information

Using RMAN to restore a database to another server in an ASM environment

Using RMAN to restore a database to another server in an ASM environment Using RMAN to restore a database to another server in an ASM environment It is possible to restore an Oracle 11g database to another server easily in an ASM environment by following the steps below. 1.

More information

DOCUMENTATION ORACLE BACKUP & RESTORE OPERATIONS

DOCUMENTATION ORACLE BACKUP & RESTORE OPERATIONS DOCUMENTATION Copyright Notice The use and copying of this product is subject to a license agreement. Any other use is prohibited. No part of this publication may be reproduced, transmitted, transcribed,

More information

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode

RMAN What is Rman Why use Rman Understanding The Rman Architecture Taking Backup in Non archive Backup Mode Taking Backup in archive Mode RMAN - What is Rman - Why use Rman - Understanding The Rman Architecture - Taking Backup in Non archive Backup Mode - Taking Backup in archive Mode - Enhancement in 10g For Rman - 9i Enhancement For Rman

More information

12. User-managed and RMAN-based backups.

12. User-managed and RMAN-based backups. 12. User-managed and RMAN-based backups. Abstract: A physical backup is a copy of the physical database files, and it can be performed in two ways. The first is through the Recovery Manager (RMAN) tool

More information

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu

Strategies for Oracle Database Backup and Recovery: Case Studies. Mingguang Xu Strategies for Oracle Database Backup and Recovery: Case Studies Mingguang Xu Office of Institutional Research University of Georgia www.oir.uga.edu/oirpres.html Oracle Files Oracle requires the following

More information

Configuring Backup Settings. Copyright 2009, Oracle. All rights reserved.

Configuring Backup Settings. Copyright 2009, Oracle. All rights reserved. Configuring Backup Settings Objectives After completing this lesson, you should be able to: Use Enterprise Manager to configure backup settings Enable control file autobackup Configure backup destinations

More information

Oracle Recovery Manager 10g. An Oracle White Paper November 2003

Oracle Recovery Manager 10g. An Oracle White Paper November 2003 Oracle Recovery Manager 10g An Oracle White Paper November 2003 Oracle Recovery Manager 10g EXECUTIVE OVERVIEW A backup of the database may be the only means you have to protect the Oracle database from

More information

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups

Agenda. Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups Agenda Overview Configuring the database for basic Backup and Recovery Backing up your database Restore and Recovery Operations Managing your backups Overview Backup and Recovery generally focuses on the

More information

11. Oracle Recovery Manager Overview and Configuration.

11. Oracle Recovery Manager Overview and Configuration. 11. Oracle Recovery Manager Overview and Configuration. Abstract: This lesson provides an overview of RMAN, including the capabilities and components of the RMAN tool. The RMAN utility attempts to move

More information

! " # #$ " " %" & "'( " "' ( ) " * ""! ). " / ( * ( "# 0! " ). '

!  # #$   % & '(  ' ( )  * ! ).  / ( * ( # 0!  ). ' Page 1 of 5! " # $%&' ( )*! " # #$ " " %" & "'( " "' ( ) " * ""! "+ """( +!, - ALTER DATABASE BACKUP CONTROLFILE TO '/u00/app/oracle/admin/t816a/backup/ctrl.bck'; ). " / ( * ( "# 0! " ). ' RMAN-06005:

More information

Oracle Database B14191-02

Oracle Database B14191-02 Oracle Database Backup and Recovery Advanced User s Guide 10g Release 2 (10.2) B14191-02 November 2005 A guide to advanced backup and recovery of Oracle databases and advanced uses of Recovery Manager

More information

Oracle9i Database: Advanced Backup and Recovery Using RMAN

Oracle9i Database: Advanced Backup and Recovery Using RMAN Oracle9i Database: Advanced Backup and Recovery Using RMAN Student Guide D16507GC10 Production 1.0 March 2003 D37796 Author Jim Womack Technical Contributors and Reviewers Matthew Arrocha Tammy Bednar

More information

The safer, easier way to help you pass any IT exams. Exam : 1Z0-067. Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP.

The safer, easier way to help you pass any IT exams. Exam : 1Z0-067. Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP. http://www.51- pass.com Exam : 1Z0-067 Title : Upgrade Oracle9i/10g/11g OCA to Oracle Database 12c OCP Version : DEMO 1 / 7 1.Which two statements are true about scheduling operations in a pluggable database

More information

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved.

Restore and Recovery Tasks. Copyright 2009, Oracle. All rights reserved. Restore and Recovery Tasks Objectives After completing this lesson, you should be able to: Describe the causes of file loss and determine the appropriate action Describe major recovery operations Back

More information

Use RMAN to relocate a 10TB RAC database with minimum downtime. Tao Zuo [email protected] NPD Inc. 9/2011

Use RMAN to relocate a 10TB RAC database with minimum downtime. Tao Zuo tao_zuo@npd.com NPD Inc. 9/2011 Use RMAN to relocate a 10TB RAC database with minimum downtime Tao Zuo [email protected] NPD Inc. 9/2011 Contents Methods of relocate a database with minimum down time RMAN oracle suggested backup strategy

More information

D78850GC10. Oracle Database 12c Backup and Recovery Workshop. Summary. Introduction. Prerequisites

D78850GC10. Oracle Database 12c Backup and Recovery Workshop. Summary. Introduction. Prerequisites D78850GC10 Oracle 12c and Recovery Workshop Summary Duration Vendor Audience 5 Days Oracle Data Warehouse Administrators, Administrators, Support Engineers, Technical Administrators, Technical Consultants

More information

BrightStor ARCserve Backup

BrightStor ARCserve Backup BrightStor ARCserve Backup Support for Oracle Backup and Restore on Windows 64-Bit Platform - 1 - TABLE OF CONTENTS 1. Summary... 3 2. Backup and Restore Process... 3 3. RMAN Command and Script Template...

More information

Getting all the pieces: Reliable Backup/Recovery

Getting all the pieces: Reliable Backup/Recovery Getting all the pieces: Reliable Backup/Recovery Part 1: Recovery Manager Part 2: Custom Backup Mark W. Farnham Andy Rivenes Neil Jensen Overview Whether you use Oracle s Recovery Manager product, a third

More information

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore

This appendix describes the following procedures: Cisco ANA Registry Backup and Restore Oracle Database Backup and Restore APPENDIXA This appendix describes the following procedures: Cisco ANA Registry Oracle Database Cisco ANA Registry This section describes the Cisco ANA Registry backup and restore procedure. Overview Provides

More information

TECHNICAL REPORT. Nimble Storage Oracle Backup and Recovery Guide

TECHNICAL REPORT. Nimble Storage Oracle Backup and Recovery Guide TECHNICAL REPORT Nimble Storage Oracle Backup and Recovery Guide N I M B L E T E C H N I C A L R E P O R T : N I M B L E S T O R A G E F O R O R A C L E B A C K U P A N D R E C O V E R Y 1 Document Revision

More information

Oracle Database 10g: Backup and Recovery 1-2

Oracle Database 10g: Backup and Recovery 1-2 Oracle Database 10g: Backup and Recovery 1-2 Oracle Database 10g: Backup and Recovery 1-3 What Is Backup and Recovery? The phrase backup and recovery refers to the strategies and techniques that are employed

More information

Recreate Physical Standby Database after Recovery of Primary Database

Recreate Physical Standby Database after Recovery of Primary Database Recreate Physical Standby Database after Recovery of Primary Database In Oracle 11g it is possible to create a Physical Standby Database from the Primary Database using RMAN. Furthermore, the same procedure

More information

Oracle 11g Database Administration

Oracle 11g Database Administration Oracle 11g Database Administration Part 1: Oracle 11g Administration Workshop I A. Exploring the Oracle Database Architecture 1. Oracle Database Architecture Overview 2. Interacting with an Oracle Database

More information

Oracle Backup, Recovery, and Performance Tuning using EMC Avamar and Oracle RMAN

Oracle Backup, Recovery, and Performance Tuning using EMC Avamar and Oracle RMAN Oracle Backup, Recovery, and Performance Tuning using EMC Avamar and Oracle RMAN Best Practices Planning Abstract This white paper provides an in-depth review of the capabilities of the EMC Avamar Oracle

More information

Oracle Database B14192-03

Oracle Database B14192-03 Oracle Database Backup and Recovery Basics 10g Release 2 (10.2) B14192-03 November 2005 An introduction to the basics of backup and recovery of Oracle databases, focusing on the use of Recovery Manager

More information

Oracle Backup and Recover 101. Osborne Press ISBN 0-07-219461-8

Oracle Backup and Recover 101. Osborne Press ISBN 0-07-219461-8 Oracle Backup and Recover 101 Osborne Press ISBN 0-07-219461-8 First Printing Personal Note from the Authors Thanks for your purchase of our book Oracle Backup & Recovery 101. In our attempt to provide

More information

Oracle Backup and Recovery Best Practices Dell Compellent Storage Center. Dell Compellent Technical Best Practices

Oracle Backup and Recovery Best Practices Dell Compellent Storage Center. Dell Compellent Technical Best Practices Oracle Backup and Recovery Best Practices Dell Compellent Storage Center Dell Compellent Technical Best Practices ii Document Revision Table 1. Revision History Date Revision Description 6/15/2011 A Initial

More information

Demos - Workshop. -- Configure the RMAN

Demos - Workshop. -- Configure the RMAN Demos - Workshop -- Configure the RMAN configure device type disk backup type to compressed backupset; configure channel 1 device type disk format '/home/oracle/app/oracle/backup/bck_orcl_%u'; configure

More information

Maximum Availability Architecture. Oracle Best Practices For High Availability

Maximum Availability Architecture. Oracle Best Practices For High Availability MAA / Data Guard 10g Setup Guide Creating a Single Instance Physical Standby for a RAC Primary Oracle Maximum Availability Architecture White Paper April 2006 Maximum Availability Architecture Oracle Best

More information

Database Recovery For Newbies

Database Recovery For Newbies Database Recovery For Newbies Paper #521 Bonnie Bizzaro, Susan McClain Objectives Provide basic understanding of recovery processes and terms Define different types of recovery Discuss common recovery

More information

Oracle Database 11g: Administration And Backup & Recover

Oracle Database 11g: Administration And Backup & Recover Oracle Database 11g: Administration And Backup & Recover ส าหร บคอร ส Oracle 11g Database Administration น เป นคอร สส าหร บผ ท ก าล งเร มต นการเป น ORACLE DBA หร อผ ท ต องการจะสอบ Oracle Certified Associate

More information

Oracle Database 12c Recovery Manager New Features

Oracle Database 12c Recovery Manager New Features Oracle Database 12c Recovery Manager New Features Presented by: Andy Colvin February 13, 2013 *DISCLAIMER* Oracle 12c has not been released yet Some features may not be available I believe Oracle has mentioned

More information

D12CBR Oracle Database 12c: Backup and Recovery Workshop NEW

D12CBR Oracle Database 12c: Backup and Recovery Workshop NEW D12CBR Oracle Database 12c: Backup and Recovery Workshop NEW What you will learn This Oracle Database 12c: Backup and Recovery Workshop will teach you how to evaluate your own recovery requirements. You'll

More information

Oracle Enterprise Manager. Description. Versions Supported. Prerequisites

Oracle Enterprise Manager. Description. Versions Supported. Prerequisites Oracle Enterprise Manager System Monitoring Plug-in Installation Guide for Microsoft SQL Server 10g Release 2 (10.2) B28049-01 January 2006 This document provides a brief description about the Oracle System

More information

Oracle Database 10g: Parallelism and Scalability Overview Seminar

Oracle Database 10g: Parallelism and Scalability Overview Seminar Oracle Database 10g: Parallelism and Scalability Overview Seminar Student Guide D51929GC10 Edition 1.0 July 2007 D51952 Authors Joel Goodman Harald van Breederode Editor Atanu Raychaudhuri Graphic Designer

More information

Oracle Database Backups and Disaster Recovery @ Autodesk

Oracle Database Backups and Disaster Recovery @ Autodesk Oracle Database Backups and Disaster Recovery @ Autodesk Alan Williams Database Design Engineer Who We Are Autodesk software, suites, and cloud technology help customers design, visualize, and simulate

More information

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/-

Oracle. Brief Course Content This course can be done in modular form as per the detail below. ORA-1 Oracle Database 10g: SQL 4 Weeks 4000/- Oracle Objective: Oracle has many advantages and features that makes it popular and thereby makes it as the world's largest enterprise software company. Oracle is used for almost all large application

More information

An Oracle White Paper April 2015. Protecting Oracle Database Appliance Tape Backup with EMC NetWorker

An Oracle White Paper April 2015. Protecting Oracle Database Appliance Tape Backup with EMC NetWorker An Oracle White Paper April 2015 Protecting Oracle Database Appliance Tape Backup with EMC NetWorker Protecting Oracle Database Appliance - Tape Backup with EMC NetWorker Disclaimer The following is intended

More information

Oracle Enterprise Manager. Description. Versions Supported

Oracle Enterprise Manager. Description. Versions Supported Oracle Enterprise Manager System Monitoring Plug-in Installation Guide for Microsoft Active Directory 10g Release 2 (10.2.0.2) B28044-02 June 2006 This document provides a brief description about the Oracle

More information

Zen Internet. Online Data Backup. Zen Vault Professional Plug-ins. Issue: 2.0.08

Zen Internet. Online Data Backup. Zen Vault Professional Plug-ins. Issue: 2.0.08 Zen Internet Online Data Backup Zen Vault Professional Plug-ins Issue: 2.0.08 Contents 1 Plug-in Installer... 3 1.1 Installation and Configuration... 3 2 Plug-ins... 5 2.1 Email Notification... 5 2.1.1

More information

Clonación de una Base de Datos Oracle 11gR2 Activa usando RMAN. CLONACIÓN DE UNA BASE DE DATOS ORACLE 11gR2 ACTIVA USANDO RMAN

Clonación de una Base de Datos Oracle 11gR2 Activa usando RMAN. CLONACIÓN DE UNA BASE DE DATOS ORACLE 11gR2 ACTIVA USANDO RMAN CLONACIÓN DE UNA BASE DE DATOS ORACLE 11gR2 ACTIVA USANDO RMAN Autor : Luis Alberto Flores Zapata Creado : 10-Agosto-2015 1 Contenido CLONACIÓN DE UNA BASE DE DATOS ORACLE 11gR2 ACTIVA USANDO RMAN... 3

More information

ORACLE USER PRODUCTIVITY KIT USAGE TRACKING ADMINISTRATION & REPORTING RELEASE 3.6 PART NO. E17087-01

ORACLE USER PRODUCTIVITY KIT USAGE TRACKING ADMINISTRATION & REPORTING RELEASE 3.6 PART NO. E17087-01 ORACLE USER PRODUCTIVITY KIT USAGE TRACKING ADMINISTRATION & REPORTING RELEASE 3.6 PART NO. E17087-01 FEBRUARY 2010 COPYRIGHT Copyright 1998, 2009, Oracle and/or its affiliates. All rights reserved. Part

More information

An Oracle White Paper January 2015. Oracle Database Backup Service A Technical White Paper

An Oracle White Paper January 2015. Oracle Database Backup Service A Technical White Paper An Oracle White Paper January 2015 Oracle Database Backup Service A Technical White Paper 1 WHY STORE BACKUPS IN THE CLOUD? ORACLE DATABASE BACKUP SERVICE OVERVIEW ORACLE DATABASE CLOUD BACKUP MODULE (ODCBM)

More information

ASM and for 3rd Party Snapshot Solutions - for Offhost. Duane Smith Nitin Vengurlekar RACPACK

ASM and for 3rd Party Snapshot Solutions - for Offhost. Duane Smith Nitin Vengurlekar RACPACK ASM and for 3rd Party Snapshot Solutions - for Offhost backup Duane Smith Nitin Vengurlekar RACPACK POINT-IN-TIME COPY TECHNOLOGIES POINT-IN-TIME COPY TECHNOLOGIES Generic guidelines & best practices for

More information

Oracle Database. Backup and Recovery Basics 10g Release 1 (10.1) Part No. B10735-01

Oracle Database. Backup and Recovery Basics 10g Release 1 (10.1) Part No. B10735-01 Oracle Database Backup and Recovery Basics 10g Release 1 (10.1) Part No. B10735-01 December 2003 Oracle Database Backup and Recovery Basics 10g Release 1 (10.1) Part No. B10735-01 Copyright 2003 Oracle

More information

Oracle Recovery Manager

Oracle Recovery Manager 1 sur 6 05/08/2014 14:17 ORACLE.COM TECHNOLOGY NETWORK PARTNERS STORE SUPPORT (Sign In / Register for a free DownloadsDocumentation Discussion Forums Articles Sample Code Training RSS Resources For PRODUCT

More information

Backing Up Oracle Databases with Handy Backup

Backing Up Oracle Databases with Handy Backup Backing Up Oracle Databases with Handy Backup April 2013 Contents Introduction... 3 Main features of Handy Backup Oracle plug-in... 3 Assignment... 3 Advantages... 3 Backing up of remote Oracle databases...

More information

Backup and Recovery. Oracle RMAN 11 g. Oracle Press ORACLG. Matthew Hart. Robert G. Freeman. Mc Graw Hill. Lisbon London Madrid Mexico City Milan

Backup and Recovery. Oracle RMAN 11 g. Oracle Press ORACLG. Matthew Hart. Robert G. Freeman. Mc Graw Hill. Lisbon London Madrid Mexico City Milan ORACLG Oracle Press Oracle 11 g Backup and Recovery Robert G. Freeman Matthew Hart Mc Graw Hill New York Chicago San Francisco Lisbon London Madrid Mexico City Milan New Delhi San Juan Seoul Singapore

More information

Oracle Database 10g: Administration Workshop II Release 2

Oracle Database 10g: Administration Workshop II Release 2 ORACLE UNIVERSITY CONTACT US: 00 9714 390 9000 Oracle Database 10g: Administration Workshop II Release 2 Duration: 5 Days What you will learn This course advances your success as an Oracle professional

More information

Oracle Database 11g: Administration Workshop II

Oracle Database 11g: Administration Workshop II Oracle University Entre em contato: 0800 891 6502 Oracle Database 11g: Administration Workshop II Duração: 5 Dias Objetivos do Curso In this course, the concepts and architecture that support backup and

More information

HP LeftHand SAN Solutions

HP LeftHand SAN Solutions HP LeftHand SAN Solutions Support Document Application Notes Oracle Backup Recovery Setup on LeftHand Networks IP SAN Legal Notices Warranty The only warranties for HP products and services are set forth

More information

Recover Oracle Database upon losing all Control Files

Recover Oracle Database upon losing all Control Files Recover Oracle Database upon losing all Control Files R.Wang Oct 19, 07 (Firstly, published at OraclePoint.com ) Preface: This is experimental case study about recovering oracle database upon losing all

More information

Best Practices White Paper Using Oracle Database 10g Automatic Storage Management with FUJITSU Storage

Best Practices White Paper Using Oracle Database 10g Automatic Storage Management with FUJITSU Storage Best Practices White Paper Using Oracle Database 10g Automatic Storage Management with FUJITSU Storage Sep 6, 2005 Fujitsu Limited Contents 1. Introduction... 1 2. Fujitsu s ETERNUS Storage Systems...

More information

SOS SO S O n O lin n e lin e Bac Ba kup cku ck p u USER MANUAL

SOS SO S O n O lin n e lin e Bac Ba kup cku ck p u USER MANUAL SOS Online Backup USER MANUAL HOW TO INSTALL THE SOFTWARE 1. Download the software from the website: http://www.sosonlinebackup.com/download_the_software.htm 2. Click Run to install when promoted, or alternatively,

More information

Oracle TDE Tablespace Encryption

Oracle TDE Tablespace Encryption Best Practice Document Version: 1.0 2015-02-04 Configuration Guide Document History Version Date Change 1.0 Document creation 2 2015 SAP SE or an SAP affiliate company. All rights reserved.

More information

PRM For Oracle Database 3.1 GUI:

PRM For Oracle Database 3.1 GUI: Case Study on PRM/DUL Recovery For Oracle Database PRM is designed for Enterprise Database Recovery, which includes all Oracle DUL data recovery functionalities, and also easy-to-use GUI. PRM For Oracle

More information

CA ARCserve Backup for Windows

CA ARCserve Backup for Windows CA ARCserve Backup for Windows Enterprise Option for SAP R/3 for Oracle Guide r15 This documentation and any related computer software help programs (hereinafter referred to as the "Documentation") are

More information

11. Configuring the Database Archiving Mode.

11. Configuring the Database Archiving Mode. 11. Configuring the Database Archiving Mode. Abstract: Configuring an Oracle database for backup and recovery can be complex. At a minimum, you must understand the archive process, the initialization parameters

More information

An Oracle White Paper March 2012. Backup and Recovery Strategies for the Oracle Database Appliance

An Oracle White Paper March 2012. Backup and Recovery Strategies for the Oracle Database Appliance An Oracle White Paper March 2012 Backup and Recovery Strategies for the Oracle Database Appliance 1 Oracle Database Appliance The Oracle Database Appliance is an engineered-system; a pre-configured bundle

More information

Oracle Enterprise Manager

Oracle Enterprise Manager Oracle Enterprise Manager System Monitoring Plug-in Installation Guide for EMC Symmetrix DMX System Release 12.1.0.2.0 E27543-03 February 2014 This document provides installation and configuration instructions

More information

Setting up SQL Translation Framework OBE for Database 12cR1

Setting up SQL Translation Framework OBE for Database 12cR1 Setting up SQL Translation Framework OBE for Database 12cR1 Overview Purpose This tutorial shows you how to use have an environment ready to demo the new Oracle Database 12c feature, SQL Translation Framework,

More information

Oracle Database 11g: Administration Workshop II DBA Release 2

Oracle Database 11g: Administration Workshop II DBA Release 2 Oracle Database 11g: Administration Workshop II DBA Release 2 This course takes the database administrator beyond the basic tasks covered in the first workshop. The student begins by gaining a much deeper

More information

Oracle BI Discoverer Administrator 11g: Develop an EUL

Oracle BI Discoverer Administrator 11g: Develop an EUL Oracle BI Discoverer Administrator 11g: Develop an EUL Volume I Student Guide D60283GC10 Edition 1.0 February 2010 D65281 Author Lea Shaw Technical Contributors and Reviewers Praveen Deshpande Kumar Dhanagopal

More information

Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose

Setting up the Oracle Warehouse Builder Project. Topics. Overview. Purpose Setting up the Oracle Warehouse Builder Project Purpose In this tutorial, you setup and configure the project environment for Oracle Warehouse Builder 10g Release 2. You create a Warehouse Builder repository

More information

Configuring Backup Settings Configuring and Managing Persistent Settings for RMAN Configuring Autobackup of Control File Backup optimization

Configuring Backup Settings Configuring and Managing Persistent Settings for RMAN Configuring Autobackup of Control File Backup optimization Introducción Objetivos Objetivos del Curso Core Concepts and Tools of the Oracle Database The Oracle Database Architecture: Overview ASM Storage Concepts Connecting to the Database and the ASM Instance

More information

Oracle Database 11g: Administration Workshop II Release 2

Oracle Database 11g: Administration Workshop II Release 2 Oracle University Contact Us: 1.800.529.0165 Oracle Database 11g: Administration Workshop II Release 2 Duration: 5 Days What you will learn This Oracle Database 11g: Administration Workshop II Release

More information

ORACLE CORE DBA ONLINE TRAINING

ORACLE CORE DBA ONLINE TRAINING ORACLE CORE DBA ONLINE TRAINING ORACLE CORE DBA THIS ORACLE DBA TRAINING COURSE IS DESIGNED TO PROVIDE ORACLE PROFESSIONALS WITH AN IN-DEPTH UNDERSTANDING OF THE DBA FEATURES OF ORACLE, SPECIFIC ORACLE

More information

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP) Audience Data Warehouse Administrator Database Administrators Database Designers Support Engineer Technical Administrator Related Training Required Prerequisites Working knowledge of SQL and use of PL/SQL

More information

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - Administration Workshop II - LVC. 5 Jours [35 Heures]

Objectif. Participant. Prérequis. Pédagogie. Oracle Database 11g - Administration Workshop II - LVC. 5 Jours [35 Heures] Objectif Back up and recover a database Configure Oracle Database for optimal recovery Administer ASM disk groups Use an RMAN backup to duplicate a database Automating Tasks with the Scheduler Participant

More information

Support Document: Microsoft SQL Server - LiveVault 7.6X

Support Document: Microsoft SQL Server - LiveVault 7.6X Contents Preparing to create a Microsoft SQL backup policy... 2 Adjusting the SQL max worker threads option... 2 Preparing for Log truncation... 3 Best Practices... 3 Microsoft SQL Server 2005, 2008, or

More information

How To Load Data Into An Org Database Cloud Service - Multitenant Edition

How To Load Data Into An Org Database Cloud Service - Multitenant Edition An Oracle White Paper June 2014 Data Movement and the Oracle Database Cloud Service Multitenant Edition 1 Table of Contents Introduction to data loading... 3 Data loading options... 4 Application Express...

More information

Oracle Enterprise Manager

Oracle Enterprise Manager Oracle Enterprise Manager System Monitoring Plug-in for Oracle TimesTen In-Memory Database Installation Guide Release 11.2.1 E13081-02 June 2009 This document was first written and published in November

More information

Oracle Enterprise Manager. Description. Platforms Supported. Versions Supported

Oracle Enterprise Manager. Description. Platforms Supported. Versions Supported Oracle Enterprise Manager System Monitoring Plug-in Installation Guide for Check Point Firewall 10g Release 2 (10.2) B28038-02 May 2007 This document provides a brief description about the Oracle System

More information

Oracle Database 11g: Administration Workshop II DBA Release 2

Oracle Database 11g: Administration Workshop II DBA Release 2 Oracle University Contact Us: +35929238111 Oracle Database 11g: Administration Workshop II DBA Release 2 Duration: 5 Days What you will learn This course takes the database administrator beyond the basic

More information

HYPERION SYSTEM 9 N-TIER INSTALLATION GUIDE MASTER DATA MANAGEMENT RELEASE 9.2

HYPERION SYSTEM 9 N-TIER INSTALLATION GUIDE MASTER DATA MANAGEMENT RELEASE 9.2 HYPERION SYSTEM 9 MASTER DATA MANAGEMENT RELEASE 9.2 N-TIER INSTALLATION GUIDE P/N: DM90192000 Copyright 2005-2006 Hyperion Solutions Corporation. All rights reserved. Hyperion, the Hyperion logo, and

More information

Cross Platform Transportable Tablespaces Migration in Oracle 11g

Cross Platform Transportable Tablespaces Migration in Oracle 11g Cross Platform Transportable Tablespaces Migration in Oracle 11g Prepared by ViSolve Migration Team June 2012 Contact ViSolve, Inc. 4010, Moorpark Avenue, #205 San Jose, California 95117 (602) 842 2738

More information

Deploying Oracle Business Intelligence Publisher in J2EE Application Servers Release 10.1.3.2.0

Deploying Oracle Business Intelligence Publisher in J2EE Application Servers Release 10.1.3.2.0 Oracle Business Intelligence Publisher Deploying Oracle Business Intelligence Publisher in J2EE Application Servers Release 10.1.3.2.0 Part No. B32481-01 December 2006 Introduction Oracle BI Publisher

More information

Using Recovery Manager with Oracle Data Guard in Oracle Database 10g. An Oracle White Paper April 2009

Using Recovery Manager with Oracle Data Guard in Oracle Database 10g. An Oracle White Paper April 2009 Using Recovery Manager with Oracle Data Guard in Oracle Database 10g An Oracle White Paper April 2009 Using Recovery Manager with Oracle Data Guard in Oracle Database 10g Executive summary... 3 Introduction...

More information

MAX_RMAN_08137_IGNORE=5 DISK_RETENTION_POLICY='RECOVERY WINDOW OF 7 DAYS'

MAX_RMAN_08137_IGNORE=5 DISK_RETENTION_POLICY='RECOVERY WINDOW OF 7 DAYS' !/bin/sh Example shell script to perform a nightly full backup of the database and scan for errors Copyright (c) 2008, 2014 Caleb.com All Rights Reserved This script is provided as an EXAMPLE ONLY and

More information

Oracle Application Server 10g: Administer High Availability

Oracle Application Server 10g: Administer High Availability Oracle Application Server 10g: Administer High Availability Student Guide D21855GC10 Production 1.0 July 2006 D46705 Author Shankar Raman Technical Contributors and Reviewers Shankar Raman Fermin Castro

More information

JD Edwards EnterpriseOne Tools. 1 Understanding JD Edwards EnterpriseOne Business Intelligence Integration. 1.1 Oracle Business Intelligence

JD Edwards EnterpriseOne Tools. 1 Understanding JD Edwards EnterpriseOne Business Intelligence Integration. 1.1 Oracle Business Intelligence JD Edwards EnterpriseOne Tools Embedded Business Intelligence for JD Edwards EnterpriseOne Release 8.98 Update 4 E21426-02 March 2011 This document provides instructions for using Form Design Aid to create

More information

Oracle Enterprise Manager. Description. Versions Supported

Oracle Enterprise Manager. Description. Versions Supported Oracle Enterprise Manager System Monitoring Plug-in Installation Guide for Microsoft.NET Framework 10g Release 2 (10.2) E10749-01 January 2006 This document provides a brief description about the Oracle

More information

Configuring and Integrating Oracle

Configuring and Integrating Oracle Configuring and Integrating Oracle The Basics of Oracle 3 Configuring SAM to Monitor an Oracle Database Server 4 This document includes basic information about Oracle and its role with SolarWinds SAM Adding

More information

OCP: Oracle Database 12c Administrator Certified Professional Study Guide. Exam 1Z0-063

OCP: Oracle Database 12c Administrator Certified Professional Study Guide. Exam 1Z0-063 Brochure More information from http://www.researchandmarkets.com/reports/2561621/ OCP: Oracle Database 12c Administrator Certified Professional Study Guide. Exam 1Z0-063 Description: An updated guide for

More information

Oracle Fusion Middleware User s Guide for Oracle Approval Management for Microsoft Excel 11gRelease 1 (11.1.1.7.2)

Oracle Fusion Middleware User s Guide for Oracle Approval Management for Microsoft Excel 11gRelease 1 (11.1.1.7.2) Oracle Fusion Middleware User s Guide for Oracle Approval Management for Microsoft Excel 11gRelease 1 (11.1.1.7.2) July 2014 Copyright 2014, Oracle and/or its affiliates. All rights reserved. Disclaimer

More information

Oracle 11g DBA Training Course Content

Oracle 11g DBA Training Course Content Oracle 11g DBA Training Course Content ORACLE 10g/11g DATABASE ADMINISTRATION CHAPTER1 Important Linux commands Installing of Redhat Linux as per oracle database requirement Installing of oracle database

More information

Oracle Enterprise Single Sign-on Provisioning Gateway. Administrator Guide Release 10.1.4.1.0 E12613-01

Oracle Enterprise Single Sign-on Provisioning Gateway. Administrator Guide Release 10.1.4.1.0 E12613-01 Oracle Enterprise Single Sign-on Provisioning Gateway Administrator Guide Release 10.1.4.1.0 E12613-01 March 2009 Oracle Enterprise Single Sign-on Provisioning Gateway, Administrator Guide, Release 10.1.4.1.0

More information

Configuration Guide. Remote Backups How-To Guide. Overview

Configuration Guide. Remote Backups How-To Guide. Overview Configuration Guide Remote Backups How-To Guide Overview Remote Backups allow you to back-up your data from 1) a ShareCenter TM to either a Remote ShareCenter or Linux Server and 2) Remote ShareCenter

More information

Oracle Database Cross Platform Migration Lucy Feng, DBAK

Oracle Database Cross Platform Migration Lucy Feng, DBAK Delivering Oracle Success Oracle Database Cross Platform Migration Lucy Feng, DBAK RMOUG QEW November 19, 2010 Business Requirements Migrate all Oracle databases to IBM zseries based Linux The database

More information

D12C-AIU Oracle Database 12c: Admin, Install and Upgrade Accelerated NEW

D12C-AIU Oracle Database 12c: Admin, Install and Upgrade Accelerated NEW D12C-AIU Oracle Database 12c: Admin, Install and Upgrade Accelerated NEW Duration: 5 Days What you will learn This Oracle Database 12c: Admin, Install and Upgrade Accelerated course will provide you with

More information

2.6.1 Creating an Acronis account... 11 2.6.2 Subscription to Acronis Cloud... 11. 3 Creating bootable rescue media... 12

2.6.1 Creating an Acronis account... 11 2.6.2 Subscription to Acronis Cloud... 11. 3 Creating bootable rescue media... 12 USER'S GUIDE Table of contents 1 Introduction...3 1.1 What is Acronis True Image 2015?... 3 1.2 New in this version... 3 1.3 System requirements... 4 1.4 Install, update or remove Acronis True Image 2015...

More information