Performing a Point-in-Time Recovery use SCN


In this exercise, you will do a point-in-time recovery by restoring the database to a previous SCN.

1. Back up the database. Details on how to do a full online database backup are found in online backup. In summary, follow these steps:

  • First put the database in hot backup mode.
  • Copy all database datafiles to a backup location.
  • Take the database out of hot backup mode.
  • Force a log switch. Back up the archived redo logs.

Here is an example of a backup:

[oracle@localhost orcl]$ sqlplus “/ as sysdba”

SQL*Plus: Release 11.1.0.6.0 – Production on Sun Aug 17 15:35:48 2008

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 – Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Continue reading

Advertisements

Restoring a Database Using a Cold Backup (Offline Backup)


In this exercise you will be restoring the database with a cold backup. It is assumed the database is in NOARCHIVELOG mode.
1. Make sure the database is shut down.
2. Copy the files on the backup media to the original location. You would copy the following files:

  • NN Database datafiles
  • NN Database control files
  • NN Database online redo logs

If the original location of the database files is not available, copy them to an alternate location. Having copied the files to an alternate location, you will likely need to execute an optional step 3 for the control files and optional step 4 for all database files and/or online redo logs. Here is an example of the copy command:

Continue reading

Creating a Trace File with the Create Control File


If all else fails and you do not have a backup control file, don’t worry; you have another option, the create controlfile command. Normally, manually executing the command can be challenging because you need to know a lot of information about your database (like the names and locations of all the database datafiles). However, you can prepare for the possibility of having to use the create controlfile command by creating one in advance.
The alter database backup controlfile to trace command will create a trace file with the create controlfile command in it for you. The trace file is stored in the new diagnostic directory structure in Oracle Database 11g. The diagnostic directory structure is a new standard introduced in Oracle Database 11g that defines where Oracle stores files related to database troubleshooting and diagnostics.The base directory of this structure is defined by the parameter DIAGNOSTIC_DEST. Here is an example of the setting of DIAGNOSTIC_DEST on an Oracle database:
SQL> show parameter diag
NAME TYPE VALUE
———————————— ———– ———
diagnostic_dest string C:\ORACLE

Continue reading

Creating a Backup Control File


The backup control file is almost the same as a regular control file. It has some areas in it that are marked such that Oracle recognizes that it’s a backup control file. When a backup control file is used, some form of recovery will be required (typically just involving the use of the archived and online redo logs if the database is otherwise intact).To create the backup control file simply issue the alter database backup controlfile to command, indicating at the end of the command where you want the control file to be created.
For example, if you wanted to create a backup control file after the online backup , you would simply need to issue the following command:
SQL> alter database backup controlfile to ‘c:\backup\orcl\backup2\backup_control.ctl’;
Database altered.
The result is the creation of a backup control file called backup_control.ctl found in the c:\backup\orcl\backup2 directory, as you can see here:

Continue reading

Performing Oracle Online Backups


In this tutorial we will be performing an online database backup. As mentioned in the text, your database will need to be in ARCHIVELOG mode to successfully execute this backup.
1. We assume your database is already running in ARCHIVELOG mode. If it’s not, put your database in ARCHIVELOG mode.
2. As with the previous offline/cold backup, you need to know what datafiles need to be backed up.
SQL> Select file_name from dba_data_files;
FILE_NAME
——————————————–
C:\ORACLE\ORADATA\ORCL\USERS01.DBF
C:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF
C:\ORACLE\ORADATA\ORCL\SYSAUX01.DBF
C:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF
C:\ORACLE\ORADATA\ORCL\REVEAL_DATA_01.DBF
C:\ORACLE\ORADATA\ORCL\REVEAL_INDEX_01.DBF
C:\ORACLE\ORADATA\ORCL\USERS02.DBF
7 rows selected.

Continue reading

Performing Oracle Offline Backups


In this tutorial you will be executing an offline backup of your database. Follow these steps to back up a database with an offline backup:
1. First you need to determine which files to back up. You will need to know the location of the datafiles, the control file, and the online redo logs. You use the FILE_NAME column of the DBA_DATA_FILES view to find the datafiles first.

SQL> Select file_name from dba_data_files;
FILE_NAME
——————————————–
C:\ORACLE\ORADATA\ORCL\USERS01.DBF
C:\ORACLE\ORADATA\ORCL\UNDOTBS01.DBF
C:\ORACLE\ORADATA\ORCL\SYSAUX01.DBF
C:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF
C:\ORACLE\ORADATA\ORCL\REVEAL_DATA_01.DBF
C:\ORACLE\ORADATA\ORCL\REVEAL_INDEX_01.DBF
C:\ORACLE\ORADATA\ORCL\USERS02.DBF
7 rows selected.

Continue reading

Listener Can’t Startup at Windows 64 bit


I installing Oracle 11gR2 on Windows 7 64 bit and configure my first Listener using netca when my laptop get IP 10.8.106.25. Then i want startup my listener when my laptop IP get IP 192.168.0.199, I get this error while i’m try to startup my listener in services tools. the picture shown below :

Continue reading