0

I am practicing the rman backup in oracle 11g.and how to dalete the control file. Please help.

rm -rf \oracle\app\oracle\oradata\xe\control.dbf

it did not work at hosting server.

closed as unclear what you're asking by mustaccio, joanolo, hot2use, McNets, Erik Darling Jul 31 '17 at 15:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    why you want to delete the control files? – Md Haidar Ali Khan Jul 30 '17 at 6:35
  • I want to try the Backup with RMAN so i want to delete the control file. – surendra Jul 30 '17 at 6:47
  • ,you can take backup of RMAN without delete the control files? – Md Haidar Ali Khan Jul 30 '17 at 7:01
  • Could you update the O.S environment? If you are getting any Backup through RMAN Backup then please update that for better clarification. – Md Haidar Ali Khan Jul 30 '17 at 7:03
  • O.S environment already upadated – surendra Jul 30 '17 at 7:21
1

RMAN is a oracle utility to backup, restore & recovery of database.

The following Steps will be demonstrated the configuration of oracle RMAN backup (for first time configuration)

Lets assume the database is in NOARCHIVELOG mode, by default the database is in NOARCHIVELOG mode, we need to change it to ARCHIVELOG mode for RMAN backup configuration. We can configure RMAN backup with catalog/repository database as well as control file. It is strongly recommended & very good practice to configure RMAN backup with catalog/repository database.

Note: Be sure you have installed oracle 11g successfully in your environment. I had asked to you about O.S environment. I didn't get any clue from you. So as a example i am writing the all RMAN backup steps in Windows O.S environment.

First open the command prompt and try to connect sql server as per your environment credential. for example

Step # 1: Connect to Target database(Target DB: The database on which Backup & Recovery to be performed) as sysdba.

C:\> set Oracle_sid=orcl
c:\> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 26 10:17:22 2017

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

Connected to an idle instance.

enter image description here

Step # 2: Ensure the database has been configured with ARCHIVELOG mode or not?

SQL> select log_mode from v$database;

LOG_MODE

NOARCHIVELOG Database is in NOARCHIVELOG mode.

enter image description here

Step # 3: If the database has been configured with ARCHIVELOG mode then skip the Step number 3 to 6, If not then Shutdown the database.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

Step # 4: Startup the database in mount state.

SQL> startup mount;
ORACLE instance started.
Total System Global Area 308981760 bytes
Fixed Size 2212896 bytes
Variable Size 163580896 bytes
Database Buffers 138412032 bytes
Redo Buffers 4775936 bytes
Database mounted.

Step # 5: Configure database in ARCHIVELOG mode.

SQL> alter database archivelog;
Database altered.

Step # 6: Alter database to open state.

SQL> alter database open;
Database altered.

SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE

Step # 7: Ensure ARCHIVELOG destination.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     330
Next log sequence to archive   332
Current log sequence           332

enter image description here

Step # 8: Ensure the flash/fast recovery area location.

SQL> show parameter db_recovery_file_dest;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      C:\app\xyz\flash_recove
                                                 ry_area
db_recovery_file_dest_size           big integer 3852M

Note : Here i did 'xyz' in C:\app\xxx\flash_recovery_area. due to security reason. enter image description here

Step # 9: Connect to RMAN prompt with target database.

C:\>rman target/

Recovery Manager: Release 11.2.0.1.0 - Production on Sun Jul 30 12:32:57 2017

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1464491423)

enter image description here

Step # 10 : To show the all configuration of your RMAN through this command.

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
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 DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/backup/rman/full_%u_%s_%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\APP\xyz\PRODUCT\11.2.0\DBHOME_1\DATABASE\SNCFORCL.ORA'; # default

enter image description here

Note : - As per this statement 'CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backup/rman/full_%u_%s_%p';' I hope you have created the folder '/backup/rman' in your c: drive. enter image description here Typically we’ll use “BACKUP AS BACKUPSET” to backup a database. So, to take a full backup of the database without the archive logs, do the following.

RMAN> BACKUP AS BACKUPSET DATABASE

RMAN> backup as backupset database;

Starting backup at 30-JUL-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=75 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=C:\APP\xyz\ORADATA\ORCL\SYSAUX01.DBF
input datafile file number=00001 name=C:\APP\xyz\ORADATA\ORCL\SYSTEM01.DBF
input datafile file number=00003 name=C:\APP\xyz\ORADATA\ORCL\UNDOTBS01.DBF
input datafile file number=00005 name=C:\APP\xyz\ORADATA\ORCL\EXAMPLE01.DBF
input datafile file number=00004 name=C:\APP\xyz\ORADATA\ORCL\USERS01.DBF
channel ORA_DISK_1: starting piece 1 at 30-JUL-17
channel ORA_DISK_1: finished piece 1 at 30-JUL-17
piece handle=C:\BACKUP\RMAN\FULL_11SAL7BV_33_1 tag=TAG20170730T125212 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:16
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 30-JUL-17
channel ORA_DISK_1: finished piece 1 at 30-JUL-17
piece handle=C:\BACKUP\RMAN\FULL_12SAL7G7_34_1 tag=TAG20170730T125212 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 30-JUL-17

enter image description here

enter image description here For further your ref Here and Here

  • delete command to control file in windows OS Oracle 11g. And then restore command to in oracle 11g. – surendra Jul 30 '17 at 10:37
  • I want command for delete or remove one or more control file or data filein oracle 11g in windows OS. – surendra Jul 30 '17 at 10:38
  • @surendra - Aside from the question of "why", your opening statement "it did not work at hosting server." is devoid of actionable information. What error was returned? You showed a *nix "rm" command, but now you are asking hwo to remove files in Windows. The Windows command for deleting a file is 'del <filename>' – EdStevens Jul 30 '17 at 17:47
  • I USE DEL command for delete the control file .but it throw an error it is being used by another process. – surendra Jul 31 '17 at 6:27
  • anyone can suggest – surendra Jul 31 '17 at 6:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.