Monday 27 March 2017

Oracle 12c R2 new feature configure Datagaurd using DBCA


Os details:
[oracle@db11g ~]$ cat /etc/oracle-release
Oracle Linux Server release 6.8

Database details:

Release 12.2.0.1.0

Node details:

node01(source database)
node02(targate database)


==> check and create souce database in archive log mode.

[oracle@node01 ~]$ sqlplus

SQL*Plus: Release 12.2.0.1.0 Production on Mon Mar 27 06:18:05 2017

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

Enter user-name: /as sysdba

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SELECT log_mode FROM v$database;

LOG_MODE
------------
NOARCHIVELOG

SQL>

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;

ALTER DATABASE FORCE LOGGING;

==> tnsname.ora file details on both node.

Node01:

# Generated by Oracle configuration tools.

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = node01.example.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )
orcl_tar =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node02.example.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

Node02:

# Generated by Oracle configuration tools.

ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = node02.example.com)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )
orcl_tar =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = node01.example.com)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )


===> configure datagaurd using dbca silent command.

[oracle@node02 admin]$ dbca -silent -createDuplicateDB -gdbName orcl  -primaryDBConnectionString  orcl.example.com:1521/orcl -sid orcl -createAsStandby -dbUniqueName orcl1

Enter SYS user password:                           -----Enter sysp assword of source database.

Listener config step
33% complete
Auxiliary instance creation
66% complete
RMAN duplicate
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl1/orcl.log" for further details.

For more details about data gaurd configuration progress check below logs.

[oracle@node02 admin]$ tail -f /u01/app/oracle/cfgtoollogs/dbca/orcl1/orcl.log
[ 2017-03-27 05:37:15.662 IST ] Listener config step
DBCA_PROGRESS : 33%
[ 2017-03-27 05:37:20.555 IST ] Auxiliary instance creation
DBCA_PROGRESS : 66%
[ 2017-03-27 05:38:01.103 IST ] RMAN duplicate
DBCA_PROGRESS : 100%

Note: automaticaly password file and parameter file have been created.

[oracle@node02 admin]$ cd /u01/app/oracle/product/12.1.0.2/db_1/dbs
[oracle@node02 dbs]$ ls -ltr
total 24
-rw-r--r--. 1 oracle oinstall 3079 May 15  2015 init.ora
-rw-r-----. 1 oracle oinstall   82 Mar 27 05:37 initorcl.ora
-rw-r-----. 1 oracle oinstall 3584 Mar 27 05:38 orapworcl
-rw-r-----. 1 oracle oinstall   24 Mar 27 05:38 lkORCL1
-rw-rw----. 1 oracle oinstall 1544 Mar 27 05:39 hc_orcl.dat
-rw-r-----. 1 oracle oinstall 3584 Mar 27 05:39 spfileorcl.ora

===> create standby log files on both database.

Node01:

ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=MANUAL;
ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/ORCL/onlinelog/online_redo01.log') SIZE 50M;
ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/ORCL/onlinelog/online_redo02.log') SIZE 50M;
ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/ORCL/onlinelog/online_redo03.log') SIZE 50M;
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;


Node02:

ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=MANUAL;
ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/ORCL1/onlinelog/online_redo01.log') SIZE 50M;
ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/ORCL1/onlinelog/online_redo02.log') SIZE 50M;
ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/oradata/ORCL1/onlinelog/online_redo03.log') SIZE 50M;
ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO;
SQL> SELECT protection_mode FROM v$database;

check standby protection mode:

PROTECTION_MODE
--------------------
MAXIMUM PERFORMANCE

SQL> ALTER DATABASE FORCE LOGGING;

Database altered.

SQL> select database_role from v$database;

DATABASE_ROLE
----------------
PHYSICAL STANDBY


log sequence on both database :

Node1:

SQL> ALTER SESSION SET nls_date_format='DD-MON-YYYY HH24:MI:SS';

Session altered.

SQL> SELECT sequence#, first_time, next_time
FROM   v$archived_log
ORDER BY sequence#;  2    3

 SEQUENCE# FIRST_TIME           NEXT_TIME
---------- -------------------- --------------------
         4 27-MAR-2017 05:10:37 27-MAR-2017 05:38:07
         5 27-MAR-2017 05:38:07 27-MAR-2017 05:39:32
         6 27-MAR-2017 05:39:32 27-MAR-2017 05:39:32
         7 27-MAR-2017 05:39:32 27-MAR-2017 05:59:36
         8 27-MAR-2017 05:59:36 27-MAR-2017 05:59:37

Node2: 

SQL> ALTER SESSION SET nls_date_format='DD-MON-YYYY HH24:MI:SS';

Session altered.

SQL> SELECT sequence#, first_time, next_time
FROM   v$archived_log
ORDER BY sequence#;  2    3

 SEQUENCE# FIRST_TIME           NEXT_TIME
---------- -------------------- --------------------
         5 27-MAR-2017 05:38:07 27-MAR-2017 05:39:32
         6 27-MAR-2017 05:39:32 27-MAR-2017 05:39:32

               *********end************

Tuesday 14 March 2017

oracle asm configuration on oracle eterprise linux 6


-----:) create raw partion which you use in asm disk configuration.

----:) install oracle asm packages.

[root@db11g Packages]# yum install oracleasm*
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Examining oracleasm-support-2.1.8-1.el6.x86_64.rpm: oracleasm-support-2.1.8-1.el6.x86_64
Marking oracleasm-support-2.1.8-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-support.x86_64 0:2.1.8-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package             Arch     Version        Repository                               Size
===========================================================================================
Installing:
 oracleasm-support   x86_64   2.1.8-1.el6    /oracleasm-support-2.1.8-1.el6.x86_64   216 k

Transaction Summary
===========================================================================================
Install       1 Package(s)

Total size: 216 k
Installed size: 216 k
Is this ok [y/N]: u
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : oracleasm-support-2.1.8-1.el6.x86_64                                    1/1
  Verifying  : oracleasm-support-2.1.8-1.el6.x86_64                                    1/1

Installed:
  oracleasm-support.x86_64 0:2.1.8-1.el6

Complete!
[root@db11g Packages]#

[root@db11g ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm

[root@db11g ~]# oracleasm createdisk ASMDISK1 /dev/sda4
Writing disk header: done
Instantiating disk: done
[root@db11g ~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@db11g ~]# oracleasm listdisks
ASMDISK1
[root@db11g ~]#

local yum configuration on oracle enterprise linux step by step

[root@db11g ~]# mount /dev/cdrw /media

mount: block device /dev/sr0 is write-protected, mounting read-only
[root@db11g ~]# cd /media

[root@db11g media]# cd Packages

[root@db11g Packages]# ls -ltr vsftpd*
-rw-rw-r--. 1 1039 1039 158284 May 12  2016 vsftpd-2.2.2-21.el6.x86_64.rpm

[root@db11g Packages]# rpm -ivh vsftpd-2.2.2-21.el6.x86_64.rpm
warning: vsftpd-2.2.2-21.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
        package vsftpd-2.2.2-21.el6.x86_64 is already installed
[root@db11g Packages]# mkdir /var/ftp/pub/Server

[root@db11g Packages]# cp * -rv /var/ftp/pub/Server

[root@db11g media]# cd /etc/yum.repos.d/

[root@db11g yum.repos.d]# cat  Server.repo
[Server]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=ftp://192.168.***.***/pub/Server         (use local server ip ot hostname)
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=0
enabled=1

[root@db11g Packages]# rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning: deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:deltarpm               ########################################### [100%]
[root@db11g Packages]# rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm
warning: python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:python-deltarpm        ########################################### [100%]
[root@db11g Packages]# rpm -ivh createrepo-0.9.9-24.el6.noarch.rpm
warning: createrepo-0.9.9-24.el6.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing...                ########################################### [100%]
   1:createrepo             ########################################### [100%]
[root@db11g Packages]#
[root@db11g Packages]# service network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]

[root@db11g Packages]# service vsftpd restart
Shutting down vsftpd:                                      [FAILED]
Starting vsftpd for vsftpd:                                [  OK  ]

[root@db11g Packages]# chkconfig network on
[root@db11g Packages]# chkconfig vsftpd on

[root@db11g Packages]# createrepo -v /var/ftp/pub/Server

[root@db11g Packages]# yum install oracleasm*
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Install Process
Examining oracleasm-support-2.1.8-1.el6.x86_64.rpm: oracleasm-support-2.1.8-1.el6.x86_64
Marking oracleasm-support-2.1.8-1.el6.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package oracleasm-support.x86_64 0:2.1.8-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================
 Package             Arch     Version        Repository                               Size
===========================================================================================
Installing:
 oracleasm-support   x86_64   2.1.8-1.el6    /oracleasm-support-2.1.8-1.el6.x86_64   216 k

Transaction Summary
===========================================================================================
Install       1 Package(s)

Total size: 216 k
Installed size: 216 k
Is this ok [y/N]: u
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : oracleasm-support-2.1.8-1.el6.x86_64                                    1/1
  Verifying  : oracleasm-support-2.1.8-1.el6.x86_64                                    1/1

Installed:
  oracleasm-support.x86_64 0:2.1.8-1.el6

Complete!
[root@db11g Packages]#

Wednesday 8 March 2017

convert oracle ASM database instance to normal database instance step by step.

OS details of both node:-
Linux DB11G.example.com 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
DB name:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name from v$database;
NAME
---------
DB11G
Node1 hostname:
ASM.example.com
Node2 hostname:
DB11g.example.com
step1)
create pfile for spfile for duplicate database.
SQL> create pfile from spfile;
File created.
step2)
Create directory structure, same as DB11Gory database.
$ mkdir -p /u01/app/oracle/oradata/DB11G
$ mkdir -p /u01/app/oracle/fast_recovery_area/DB11G
$ mkdir -p /u01/app/oracle/admin/DB11G/adump
step3)
Make the following changes in pfile.

Replace the ASM disk with file system path.
*.audit_file_dest='/u01/app/oracle/admin/DB11G/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/DB11G/control01.CTL','/u01/app/oracle/fast_recovery_area/DB11G/control02.CTL'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata'
*.db_create_online_log_dest_1='/u01/app/oracle/fast_recovery_area'
*.db_domain=''
*.db_name='DB11G'
*.diagnostic_dest='/u01/app/oracle'

Step4)
Move password file and pfile to target location.
[oracle@ASM dbs]$ scp initDB11G.ora oracle@clone:/u01/app/oracle/product/11.2.0/db_1/dbs/
oracle@clone's password:
initDB11G.ora 100% 997 1.0KB/s 00:00
Monday, February 20, 2017
[oracle@ASM dbs]$ scp orapwDB11G oracle@clone:/u01/app/oracle/product/11.2.0/db_1/dbs/
oracle@clone's password:
orapwDB11G 100% 1536 1.5KB/s 00:00
[oracle@ASM dbs]$

Step5)
tnsname.ora on primary database server(DB11G.example.com)
# Generated by Oracle configuration tools.
DB11G =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = DB11G.example.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB11G)
)
)
DB11G_tar =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = clone.example.com)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB11G)
(UR = A)
)
)

Step6)
Start duplicate (tareget) database in nomount.
[oracle@DB11G admin]$ export $ORACLE_SID=DB11G
[oracle@DB11G admin]$ echo $ORACLE_SID
DB11G
[oracle@DB11G admin]$ sqlplus
SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 1 21:50:36 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter user-name: /as sysdba
Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2233000 bytes
Variable Size 503319896 bytes
Database Buffers 331350016 bytes
Redo Buffers 2379776 bytes
SQL> exit
[oracle@asm dbs]$ rman TARGET sys/******@DB11G AUXILIARY sys/******@DB11G_tar
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Mar 8 02:40:24 2017
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: DB11G (DBID=404263693)
connected to auxiliary database: DB11G (not mounted)
RMAN> DUPLICATE DATABASE TO DB11G
FROM ACTIVE DATABASE
NOFILENAMECHECK;2> 3>

Starting Duplicate Db at 08-MAR-17
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=20 device type=DISK
contents of Memory Script:
{
   sql clone "create spfile from memory";
}
executing Memory Script
sql statement: create spfile from memory
contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     839282688 bytes
Fixed Size                     2233000 bytes
Variable Size                515902808 bytes
Database Buffers             318767104 bytes
Redo Buffers                   2379776 bytes
contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''DB11G'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''DB11G'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   backup as copy current controlfile auxiliary format  '/u01/app/oracle/oradata/DB11G/CONTROL01.CTL';
   restore clone controlfile to  '/u01/app/oracle/fast_recovery_area/DB11G/control02.CTL' from
 '/u01/app/oracle/oradata/DB11G/CONTROL01.CTL';
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''DB11G'' comment= ''Modified by RMAN duplicate'' scope=spfile
sql statement: alter system set  db_unique_name =  ''DB11G'' comment= ''Modified by RMAN duplicate'' scope=spfile
Oracle instance shut down
Oracle instance started
Total System Global Area     839282688 bytes
Fixed Size                     2233000 bytes
Variable Size                515902808 bytes
Database Buffers             318767104 bytes
Redo Buffers                   2379776 bytes
Starting backup at 08-MAR-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/snapcf_DB11G.f tag=TAG20170308T024549 RECID=4 STAMP=938054749
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 08-MAR-17
Starting restore at 08-MAR-17
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK
channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 08-MAR-17
database mounted
contents of Memory Script:
{
   set newname for clone datafile  1 to new;
   set newname for clone datafile  2 to new;
   set newname for clone datafile  3 to new;
   set newname for clone datafile  4 to new;
   set newname for clone datafile  5 to new;
   backup as copy reuse
   datafile  1 auxiliary format new
   datafile  2 auxiliary format new
   datafile  3 auxiliary format new
   datafile  4 auxiliary format new
   datafile  5 auxiliary format new
   ;
   sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 08-MAR-17
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+DATA/db11g/datafile/system.256.934594061
output file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_system_04ruj535_.dbf tag=TAG20170308T024557
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+DATA/db11g/datafile/sysaux.257.934594061
output file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_sysaux_05ruj53u_.dbf tag=TAG20170308T024557
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+DATA/db11g/datafile/example.261.934594145
output file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_example_06ruj54n_.dbf tag=TAG20170308T024557
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+DATA/db11g/datafile/undotbs1.258.934594063
output file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_undotbs1_07ruj556_.dbf tag=TAG20170308T024557
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+DATA/db11g/datafile/users.259.934594063
output file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_users_08ruj559_.dbf tag=TAG20170308T024557
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 08-MAR-17
sql statement: alter system archive log current
contents of Memory Script:
{
   backup as copy reuse
   archivelog like  "/u01/app/oracle/product/11.2.0/db_1/dbs/archive1_8_934594127.arc" auxiliary format
 "/u01/app/oracle/product/11.2.0/db_1/dbs/archive1_8_934594127.arc"   ;
   catalog clone archivelog  "/u01/app/oracle/product/11.2.0/db_1/dbs/archive1_8_934594127.arc";
   switch clone datafile all;
}
executing Memory Script
Starting backup at 08-MAR-17
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log copy
input archived log thread=1 sequence=8 RECID=6 STAMP=938054828
output file name=/u01/app/oracle/product/11.2.0/db_1/dbs/archive1_8_934594127.arc RECID=0 STAMP=0
channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01
Finished backup at 08-MAR-17
cataloged archived log
archived log file name=/u01/app/oracle/product/11.2.0/db_1/dbs/archive1_8_934594127.arc RECID=6 STAMP=938074630
datafile 1 switched to datafile copy
input datafile copy RECID=4 STAMP=938074630 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_system_04ruj535_.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=5 STAMP=938074630 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_sysaux_05ruj53u_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=6 STAMP=938074630 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_undotbs1_07ruj556_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=7 STAMP=938074630 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_users_08ruj559_.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=8 STAMP=938074630 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_example_06ruj54n_.dbf
contents of Memory Script:
{
   set until scn  1163114;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script
executing command: SET until clause
Starting recover at 08-MAR-17
using channel ORA_AUX_DISK_1
starting media recovery
archived log for thread 1 with sequence 8 is already on disk as file /u01/app/oracle/product/11.2.0/db_1/dbs/archive1_8_934594127.arc
archived log file name=/u01/app/oracle/product/11.2.0/db_1/dbs/archive1_8_934594127.arc thread=1 sequence=8
media recovery complete, elapsed time: 00:00:01
Finished recover at 08-MAR-17
Oracle instance started
Total System Global Area     839282688 bytes
Fixed Size                     2233000 bytes
Variable Size                515902808 bytes
Database Buffers             318767104 bytes
Redo Buffers                   2379776 bytes
contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''DB11G'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''DB11G'' comment= ''Reset to original value by RMAN'' scope=spfile
sql statement: alter system reset  db_unique_name scope=spfile
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area     839282688 bytes
Fixed Size                     2233000 bytes
Variable Size                515902808 bytes
Database Buffers             318767104 bytes
Redo Buffers                   2379776 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DB11G" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP   1  SIZE 50 M ,
  GROUP   2  SIZE 50 M ,
  GROUP   3  SIZE 50 M
 DATAFILE
  '/u01/app/oracle/oradata/DB11G/datafile/o1_mf_system_04ruj535_.dbf'
 CHARACTER SET WE8MSWIN1252
contents of Memory Script:
{
   set newname for clone tempfile  1 to new;
   switch clone tempfile all;
   catalog clone datafilecopy  "/u01/app/oracle/oradata/DB11G/datafile/o1_mf_sysaux_05ruj53u_.dbf",
 "/u01/app/oracle/oradata/DB11G/datafile/o1_mf_undotbs1_07ruj556_.dbf",
 "/u01/app/oracle/oradata/DB11G/datafile/o1_mf_users_08ruj559_.dbf",
 "/u01/app/oracle/oradata/DB11G/datafile/o1_mf_example_06ruj54n_.dbf";
   switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/app/oracle/oradata/DB11G/datafile/o1_mf_temp_%u_.tmp in control file
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_sysaux_05ruj53u_.dbf RECID=1 STAMP=938074644
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_undotbs1_07ruj556_.dbf RECID=2 STAMP=938074644
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_users_08ruj559_.dbf RECID=3 STAMP=938074644
cataloged datafile copy
datafile copy file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_example_06ruj54n_.dbf RECID=4 STAMP=938074644
datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=938074644 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_sysaux_05ruj53u_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=938074644 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_undotbs1_07ruj556_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=938074644 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_users_08ruj559_.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=938074644 file name=/u01/app/oracle/oradata/DB11G/datafile/o1_mf_example_06ruj54n_.dbf

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 08-MAR-17
[oracle@db11g dbs]$ sqlplus

SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 8 08:35:17 2017
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Enter user-name: /as sysdba
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
DB11G


work on autovacuum postgreSQL parameter

 In This blog, we are discussing the auto vacuum parameter on a small scale. we will understand the below parameters and will see how to mod...