Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Monday, June 10, 2013

ORA-16038 ORA-19809 ORA-00312

Got the error when starting an Oracle database:

SQL> startup
ORACLE instance started.

Total System Global Area 1010827264 bytes
Fixed Size                  2045480 bytes
Variable Size             385878488 bytes
Database Buffers          603979776 bytes
Redo Buffers               18923520 bytes
Database mounted.

ORA-16038: log 3 sequence# 42 cannot be archived
ORA-19809: limit exceeded for recovery files
ORA-00312: online log 3 thread 1: '/u02/oradata/DB/redo03.log'

Solution: 

To solve ORA-19809 error, increase the value of db_recovery_file_dest_size parameter. And start the database:

SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST_SIZE=3G SCOPE=BOTH;

SQL> shutdown abort

SQL> startup



Tuesday, November 27, 2012

Remote Diagnostic Agent (RDA)


1. Remote Diagnostic Agent (RDA) is a command-line diagnostic tool that is executed by an engine written in the Perl programming language. RDA provides a unified package of support diagnostics tools and preventive solutions. The data captured provides Oracle Support with a comprehensive picture of the customer's environment which aids in problem diagnosis.

2. Oracle document: Remote Diagnostic Agent (RDA) 4 - Getting Started [ID 314422.1]

3. RDA supports different platforms: Windows, UNIX, Linux

4. RDA supports lots of Oracle products: Oracle RDBMS Server (Standard and Enterprise Editions), etc

5. RDA download: a zip file for specific platform

6. Installation on Solaris: unzip

7. run RDA
--check perl version: perl -V
--rda.sh - Use this command if Perl is not available.
--rda.pl - Use this command if Perl is available.
--./rda.pl -S: set up setup.cfg
--run RDA report: ./rda.pl -v
  --ask for password for system to connect to the database


Wednesday, September 19, 2012

List of Differences between SQL Server and Oracle


List of Differences between SQL Server and Oracle

1. In SQL Server, only one instance runs per platform.

2. SQL Server tablespaces are called databases, and lie half way between an oracle tablespace and an oracle instance.

3. Five databases always exist: master (=system); tempdb (=temp); distribution (for distributed transactions); model (the template for all new database/tablespaces); and msdb (automatic scheduled jobs information). Three sample databases are also created on install, but can be safely deleted: pubs; northwind; user1.

4. SQL Server databases comprise one or more datafiles, as in oracle, but also have one or more online redo log files. This is the principal difference between SQL Server and oracle; the idea of the temporary tablespace, system tablespace, and each schema tablespace having their own set of online redo logs takes some getting used to.

5. SQL Server has logins and users. Logins are specific for a SQL Server instance. Users are specific to a database. A login will have one user for every database it has access to. Logins have systemic privileges (create database, etc.), Users have DDL and DML privileges. Standard practice is to name users the as their parent login - this is done by default.

6. Users with execute permission on a procedure / select permission on a view will fail to use this if there is broken ownership with referenced objects, unless they are explicitly given access to the referenced table.

7. Revoke (neutral) and Deny (strong) are both available in place of Oracle Revoke. The difference is whether or not they can be overridden by role or user privileges. Deny appears as a red cross, Grant as a green tick, and Revoke does not appear in Enterprise Manager privilege box. [p109]

8. Objects can have their schema changed in SQL Server without being rebuilt, using sp_changeobjectowner object, owner. But SQL has to be rewritten to specify the right user, especially with broken ownership chains, so probably this is more trouble than it is worth.

9. SQL Server does not have synonyms.

10. Standard Practice on SQL Server is to have all objects, even views and stored procedures, owned by the dbo user. Other schemas would tend to have their own database/tablespace. However, this is just standard practice, and does not have to be followed. But problems could arise be with lack of synonyms and broken ownership chains.

11. SQL Syntax is slightly different. SQL Server books online has full syntax with a search capability. However DDL and DBA operations should be done by the Enterprise Manager GUI, which has wizards available. SQL Server Enterprise Manager is vastly superior to the equivalent Oracle GUIs. A few operations cannot be done through Enterprise Manager: Column permissions have to be modified through SQL; Filegroups have to be created through SQL.

12. In DDL, whitespace and special characters must be covered with []. E.g.: REVOKE ALL ON [order details] FROM PUBLIC; DENY CREATE DATABASE TO Eva, [Corporate\ErikB], Ivan.

13. SQL Server has its equivalent of v$ and dba_ views. It also has a collection of system stored procedures which return v$ information or actually perform system DDL.

14. SQL Server has application roles in addition to standard roles. Application roles are password identified while standard roles are always enabled for a user. When an application role is enabled, no other privileges are apparent, with the exception of public privileges. Application roles would typically be enabled and disabled through a VB front end script. Syntax is: exec sp_setapprole 'approle_name', 'password'

15. Databases have a primary datafile (*.mdf), possibly some secondary datafiles (*.ndf); and one or more on line redo log files (*.ldf).

16. There is no reason to give a database more than one datafile, except for backup/recovery streamlining for very large database/tablespaces.

17. SQL Server has a fixed block size of 8k, and a fixed extent size of 64k. This may not mean an end to defragmentation requests, since there is still a reorganise utility. The reorganise utility can be scheduled to run after backup, and does hot reorgs. Small tables can, apparently, share an extent.

18. Rows cannot span blocks, so the maximum row size is 8k. This means chaining does not happen in SQL Server, but problems will occur if a row physically cannot fit into 8k.

19. The default size of on line redo log files is 25% of the total size of all datafiles. It is also recommended that autoextend be switched on on online redo log files.

20. A maintenance wizard will decide whether or not to grow or shrink on line redo log files, among other things.

21. Autoextend can be in extensions of a fixed size or a percentage of current size.

22. Autoshrink is available, but recommend that it is switched off and shrinking is done by maintenance jobs after backups.

23. Databases can be dbo use only (in development phase) (=restricted session); and can be in single user mode (when doing restores, etc.).

24. Truncate log on checkpoint is equivalent to noarchivelog mode in Oracle. Truncating the log on backup is equivalent to archivelog mode in Oracle.

25. On line redo logs are not archived, except on backup. They will therefore grow to much larger sizes than oracle On line redo logs.

26. By default, a database is created with one filegroup, named default. Microsoft recommend that filegroups should only be used for backup purposes. Performance should be handled by striping, even with tables and indexes.

27. Unlike our practice with Oracle on NT, but like our practice with Oracle on Sun: Microsoft recommend on line redo log files should be on separate physical disks, with separate disk controllers, from the datafiles. This is recommended both for performance and for fault tolerance. [p160]

28. During an online backup: cannot create or alter databases; create indexes; perform nonlogged operations such as bulk copy and writetext. These will be failed if attempted after backup is started, or cause backup to stop these are already running.

29. Three types of backup: full backup (=online backup); online redo log backup (=archive); and differential backup. The last type is completely new to SQL Server. It backs up just those blocks which have been modified since last full backup.

30. Create Index statements force the data and index filegroups to be backed up simultaneously.

31. There are no rollback segments in SQL Server. Rollback information is obtained from the online redo logs. This should improve performance.

32. SQL Server is read inconsistent. This will improve performance for some SQL jobs, but produce inconsistent results.

33. Standby databases can be up and available read-only on SQL Server. On Oracle7 they are unavailable.

34. SQL Server creates snapshot disk files, rather than snapshot log tables.

35. SQL Server has transactional replication, which replicates data by monitoring redo logs. block changes for replication are specifically marked in the redo logs. This is like snapshot replication, but with constant data copying. So it provides the same functionality as distributed database triggers, but with fewer potential problems.

36. A distribution database stores distribution history, and in transactional replication, also keeps the information culled from the redo logs for propagation.

37. SQL Server does not have parallel Server, although this may be possible via NT operating system.

38. SQL Server does not have sequences. Instead columns can be given the identity property.

39. By default, autocommits instantly, rollback unavailable.

40. With begin transaction...commit/rollback transaction statements, get commit, rollback, endpoint functionality. However, because SQL Server does not have rollback segments, modified rows in a transaction are locked. Users cannot even select from the entire table in most cases.

Tuesday, July 17, 2012

RMAN connect target database: RMAN-00571, RMAN-00569, ORA-01031

Got the following error when connect to the target database:


RMAN> connect target sys/****@mydb;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-01031: insufficient privileges

Solution:

RMAN Denies Logon to Target Database: Scenario

RMAN fails with ORA-01031 (insufficient privileges) or ORA-01017 (invalid username/password) errors when trying to connect to the target database:
% rman
Recovery Manager: Release 10.1.0.2.0 - Production

Copyright (c) 1995, 2003, Oracle.  All rights reserved.

RMAN> CONNECT TARGET sys/mypass@inst1

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-01031: insufficient privileges

RMAN Denies Logon to Target Database: Diagnosis

RMAN automatically requests a connection to the target database as SYSDBA. In order to connect to the target as SYSDBA, you must do one of the following:
  • Be part of the operating system DBA group with respect to the target database (that is, have the ability to connect with SYSDBA privileges to the target database without a password).
  • Create a password file with the orapwd command and the initialization parameter REMOTE_LOGIN_PASSWORDFILE.
  • Make sure you are connecting with the correct username and password.
If the target database does not have a password file, then the user you are logged in as must be validated with operating system authentication.

RMAN Denies Logon to Target Database: Solution

Either create a password file for the target database or add yourself to the administrator list in the operating system.


Reference: http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmtroub.htm

Ways to Check oracle sid and database name


Ways to Check oracle sid and database name

1. Get the name of the instance
select sys_context('userenv','instance_name') from dual;

2. global_name is granted to PUBLIC, so anybody can query it.
select * from global_name;
select global_name from global_name;

3. use ORA_DATABASE_NAME
select ora_database_name from dual;

4. user v$ views
select name from v$database;
select instance_name from v$instance;

Monday, July 9, 2012

ORA-00821 ORA-01034 ORA-27101, SGA_target and SPARC T series database servers

Problem: 


When migrating a database from an older Solaris database server to a new Solaris T3/T4 series database server, SGA_Target has to be increased from 350MB t0 900MB to have the database started up. Otherwise ORA-04031 error would occur. 

After spending sometime researching, the following Oracle Support article explains the issue and gives a workaround.

Reference: ORA-00821 ORA-01034 ORA-27101, SGA_target need to be increased [ID 815426.1]

Goal

Migrated a database server from a server with 8 CPU's to a server with 128 (virtual) CPU's - that is, 2 CPU's, each with 8 cores which each handled 8 threads = 2x8x8 = 128.

So Solaris (on SPARC T series) is presenting Oracle with 128 CPU's. This makes Oracle adjust it's memory demands upwards, meaning that before the databases can ran fine with 320 MB of ram (sga_target) now needs to have up around 800-900 MB of RAM?

Is there anyway to minimize the memory usage?

Fix

Calculating the sga_target should consider the following:

The calculation for min cache size = max (number of CPUs, number of processor groups) * max (granule size, 4MB)

So the SGA size will mainly depend on CPU_COUNT.

Bug 8316255 was filed for this issue and initially closed as 'Not a Bug' with the comments:

"CPU_COUNT should not be changed . This is not a bug.
Reducing CPU_COUNT has side effects due to the fact that the per cpu power of CMT may not be sufficient to sustain high load ( e.g. cache fusion messages ).
Also, some of the dependent parameters such as gc latches would be underconfigured ". 

Currently, a fix has been produced which added the notion of the raw cpu threads and effective cpu threads.
This fix is only available in the 11.2.0.3 Bundle Patch 1 for Exadata Database and will be included in 12.1.
Please refer to:
Note 8316255.8 - Bug 8316255 - Wrong discovery of number of CPUs in SPARC T series.
Note 13343057.8 - Bug 13343057 - 11.2.0.3 Bundle Patch 1 for Exadata Database


For other systems, a way of reducing memory needs would be to set a manual value for DB_CACHE_SIZE (which depends on CPU_COUNT) and keep the old value of SGA_TARGET or not using ASMM (not using SGA_TARGET).





Reference: ORA-00821 ORA-01034 ORA-27101, SGA_target need to be increased [ID 815426.1]

Friday, July 6, 2012

Oracle Drop Database Command

I did not know this command before until someone mentioned to me the other day! I am used to manually dropping databases on UNIX.

Anyhow, here is some info about this command.


DROP DATABASE

The DROP DATABASE command deletes these files from operating system.
* Datafiles
* Online Redo Log Files
* Controlfiles
* SPFILE (if it exists)

The DROP DATABASE command does not delete the following files:
* init.ora (text version of the Oracle initialization file)
* password file
* entries in listener files
* entries in oratab file


If the operating system is Windows, then it does not delete the Windows service for the target database instance.

Reference: Drop Database Command Versus Remove an Oracle Database Manually [ID 443822.1]

Thursday, May 3, 2012

What is new in Oracle 11.2.0.2?


There are a few changes in this release:
·         Packaging: Starting with the first patch set for Oracle Database 11g Release 2 (11.2.0.2), Oracle Database patch sets are full installations of the Oracle Database software.
·         Simplified new installation: Because the release 11.2.0.2 patch set is a full installation package, if you are installing Oracle Database on a system without an existing Oracle Database installation, then you can simply install the release 11.2.0.2 patch set. You are no longer required to install the base release, and then apply the patch set.
·         Upgrade process: Beginning with the release 11.2.0.2 patch set, you have two ways to apply a patch set:  
o    Out-of-place upgrade – This is Oracle's recommended way to apply a patch set. You install the patch set into a new, separate Oracle home location. After you install the patch upgrade, you then migrate the Oracle Database from the older Oracle home. The patch set upgrade is now the same process to upgrade from one version to another. Oracle recommends that you perform an out-of-place patch set upgrade, because this patch set application option requires much less downtime, and is safer because it does not require patching an ORACLE_HOME that is already being used in production. However, you must ensure that you have sufficient free disk space to accommodate two Oracle home directories at the same time.
o    In-place upgrade – You install the patch set into an existing Oracle home location. Oracle recommends that you select this option only if you do not have sufficient free disk space to perform an out-of-place upgrade, as the upgrade removes the existing Oracle installation. This patch option requires less disk space, but requires more time, and is riskier, because if you encounter an installation failure, then you must recover the entire existing Oracle home from a backup. If you choose this more risky option, then before you begin the patch installation, complete the following tasks.
·         Direct upgrade from previous releases: You can upgrade from a previous Oracle Database release directly to the latest patch set, without having to install the base release. For example, if you want to upgrade from Oracle Database 10g Release 2, or Oracle Database 11g Release 1, then you can upgrade directly to Oracle Database 11g Release 2, patch set 2 (11.2.0.2) using an out-of-place upgrade. Oracle now supports direct upgrades to the release 11.2.0.2 patch set from any release where direct upgrade to the base release (11.2.0.1) is supported, as well as direct upgrades from 11.2.0.1 to 11.2.0.2 or 11.2.0.3.
·         New Features Available in Patch Sets: In addition to the usual set of fixes, the release 11.2.0.2 patch set contains a small number of features that complete the Database 11g Release 2 feature set. Oracle Database New Features Guide for Oracle Database 11g Release 2

Tuesday, May 1, 2012

Oracle SQL Statement Examples: alter database

alter database





·         backup controlfile as a text file
alter database backup controlfile to trace as '';

·         resize a data file: increase size or decrease size
ALTER DATABASE DATAFILE '' RESIZE 1200M;

·         take a datafile out of AUTOEXTEND Mode
alter database datafile '' AUTOEXTEND off;

·         turn on the autoextend feature on a datafile
alter database datafile '' autoextend on next 100m maxsize 2000m;

·         enable block change tracking
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING USING FILE '';

·         add logfile group
ALTER DATABASE ADD LOGFILE GROUP 1 ('') SIZE 200M;
ALTER DATABASE ADD LOGFILE GROUP 2 ('', '') SIZE 200M;
ALTER DATABASE ADD LOGFILE MEMBER '' TO GROUP 1;

·         change GLOBAL_NAME
ALTER DATABASE RENAME GLOBAL_NAME TO mydb;

·         create a new database incarnation of the database
alter database open resetlogs;

·         change archivelog mode
alter database archivelog
alter database archivelog manual
alter database noarchivelog

·         READ ONLY / READ WRITE: The following statement opens the database in read-only mode:
startup mount;
ALTER DATABASE OPEN READ ONLY;

·         The following statement opens the database in read/write mode and clears the online redo logs:
startup mount;
ALTER DATABASE OPEN READ WRITE RESETLOGS;

·         Using Parallel Recovery Processes: The following statement performs tablespace recovery using parallel recovery processes:
ALTER DATABASE RECOVER TABLESPACE tbs_03  PARALLEL;

·         Adding Redo Log File Groups: Examples The following statement adds a redo log file group with two members and identifies it with a GROUP parameter value of 3:
ALTER DATABASE
ADD LOGFILE GROUP 3
('diska:log3.log', 'diskb:log3.log') SIZE 50K;

·         The following statement adds a redo log file group containing two members to thread 5 (in a Real Application Clusters environment) and assigns it a GROUP parameter value of 4:
ALTER DATABASE 
ADD LOGFILE THREAD 5 GROUP 4 
('diska:log4.log', 'diskb:log4:log');

·         Adding Redo Log File Group Members: The following statement adds a member to the redo log file group added in the previous example:
ALTER DATABASE ADD LOGFILE MEMBER 'diskc:log3.log' TO GROUP 3;

·         Dropping Log File Members: The following statement drops one redo log file member added in the previous example:
ALTER DATABASE DROP LOGFILE MEMBER 'diskb:log3.log';

·         The following statement drops all members of the redo log file group 3:
ALTER DATABASE DROP LOGFILE GROUP 3;

·         Renaming a Log File Member: The following statement renames a redo log file member:
ALTER DATABASE RENAME FILE 'diskc:log3.log' TO 'diskb:log3.log';

·         Setting the Default Type of Tablespaces: The following statement specifies that subsequently created tablespaces be created as bigfile tablespaces by default:
ALTER DATABASE SET DEFAULT BIGFILE TABLESPACE;

·         Changing the Default Temporary Tablespace: The following statement makes the tbs_5 tablespace the default temporary tablespace of the database. This statement either establishes a default temporary tablespace if none was specified at create time, or replaces an existing default temporary tablespace with tbs_05:
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE tbs_05;

·         A group of tablespaces can be defined as the default temporary tablespace by using a tablespace group. The following statement makes the tablespaces in the tablespace group tbs_group_01 the default temporary tablespaces of the database:
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE tbs_grp_01;

·         Creating a New Data File: The following statement creates a new data file tbs_f04.dbf based on the file tbs_f03.dbf. Before creating the new data file, you must take the existing data file (or the tablespace in which it resides) offline.
ALTER DATABASE CREATE DATAFILE 'tbs_f03.dbf' AS 'tbs_f04.dbf';

·         Manipulating Temp Files: The following takes offline the temp file temp02.dbf and then renames the temp file:
ALTER DATABASE TEMPFILE 'temp02.dbf' OFFLINE;
ALTER DATABASE RENAME FILE 'temp02.dbf' TO 'temp03.dbf';

·         Changing the Global Database Name: The following statement changes the global name of the database and includes both the database name and domain:
ALTER DATABASE RENAME GLOBAL_NAME TO demo.world.example.com;

·         Enabling and Disabling Block Change Tracking: The following statement enables block change tracking and causes Oracle Database to create a block change tracking file named tracking_file and overwrite the file if it already exists:
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
USING FILE 'tracking_file' REUSE;

·         The following statement disables block change tracking and deletes the existing block change tracking file:
ALTER DATABASE DISABLE BLOCK CHANGE TRACKING;

·         Resizing a Data File: The following statement attempts to change the size of data file diskb:tbs_f5.dbf:
ALTER DATABASE DATAFILE 'diskb:tbs_f5.dbf' RESIZE 10 M;

·         Clearing a Log File: The following statement clears a log file:
ALTER DATABASE CLEAR LOGFILE 'diskc:log3.log';

·         Database Recovery: The following statement performs complete recovery of the entire database, letting Oracle Database generate the name of the next archived redo log file needed:
ALTER DATABASE RECOVER AUTOMATIC DATABASE;

·         The following statement explicitly names a redo log file for Oracle Database to apply:
ALTER DATABASE RECOVER LOGFILE 'diskc:log3.log';

·         The following statement performs time-based recovery of the database:
ALTER DATABASE
RECOVER AUTOMATIC UNTIL TIME '2001-10-27:14:00:00'; 

·         Making a Consistent Database Backup: Assume that the database is open and you want to make a consistent backup of the whole database. This example shuts down the database consistently, mounts the database, makes a consistent whole database backup, and then opens the database.
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
BACKUP DATABASE PLUS ARCHIVELOG;
# Now that the backup is complete, open the database.
ALTER DATABASE OPEN;

·         Mounting the Database After Restoring the Control File: This example restores the control file, mounts it, and performs recovery. Finally, the example resets the online redo log.
STARTUP FORCE NOMOUNT;
RESTORE CONTROLFILE FROM AUTOBACKUP;
ALTER DATABASE MOUNT;
# You must run the RECOVER command after restoring a control file even if no
# datafiles require recovery.
RECOVER DEVICE TYPE DISK DATABASE;
ALTER DATABASE OPEN RESETLOGS;

Friday, April 20, 2012

Clone database from a RMAN Cold back in Oracle 10g


Clone database from a RMAN Cold back in Oracle 10g


Database environment:
·         Oracle version: 10.2.0.4se
·         RMAN version: 10.2.0.4
·         OS: Solaris 10
·         Target database: TargetDB
·         Auxiliary database: AuxDB
·         RMAN catalog database: RcatDB

1. Take a cold backup from the target database TargetDB (source database) and using RMAN catalog database RcatDB

2. Prepare the directory structure for the auxiliary database AuxDB (cloned database)

Scenario:
·         The target database and the auxiliary database are on different database servers.
·         Need to copy the cold backups of the target database from one server to the server where the auxiliary database resides.
·         The file structure of the cold  backup should be the same as on the target database server.

3. Ensure the following two parameters are included in the pfile:

############################################
# for rman database duplication
###########################################

db_file_name_convert=('/oracle_data/TargetDB', '/oracle_data/AuxDB')
log_file_name_convert=('/oracle_data/TargetDB', '/oracle_data/AuxDB')

4. Add the auxiliary database to /etc/oratab:

AuxDB:/fs/u02/sw_ux/oracle/product/10.2.0.4se:Y

5. Add the auxiliary database to tnsnames.ora

AuxDB =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = host_name)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = AuxDB)
      (SERVER = DEDICATED)
    )
  )

6. Add a Oracle password file for the auxiliary database

orapwd file=$ORACLE_HOME/dbs/orapwAuxDB password= entries=10

7. Start the auxiliary database in NOMOUNT mode

$ . oraenv
ORACLE_SID = [AuxDB] ? AuxDB
The /oracle/product/10.2.0.4se/bin/orabase binary does not exist
You can set ORACLE_BASE manually if it is required.

$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Mon Oct 25 11:26:32 2010
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
Connected to an idle instance.

SQL> create spfile from pfile='/oracle/admin/AuxDB/pfile/initAuxDB.ora';
File created.

SQL> startup nomount
ORACLE instance started.

Total System Global Area  683671552 bytes
Fixed Size                  2043136 bytes
Variable Size             276828928 bytes
Database Buffers          398458880 bytes
Redo Buffers                6340608 bytes
8. Use RMAN to clone the auxiliary database

$ rman trace clone_AuxDB.log

Recovery Manager: Release 10.2.0.4.0 - Production on Mon Oct 25 11:44:53 2010

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

RMAN> connect target sys/syspwd@TargetDB;

connected to target database: TargetDB (DBID=1722637034)

RMAN>  connect catalog rman/rcpwd@RcatDB;

connected to recovery catalog database

RMAN> connect auxiliary /

connected to auxiliary database: AuxDB (not mounted)

RMAN> duplicate target database to AuxDB;

Finished restore at 25-OCT-10

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUXDB" RESETLOGS NOARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      2
  MAXDATAFILES       30
  MAXINSTANCES     1
  MAXLOGHISTORY     2337
 LOGFILE
  GROUP 1 ( '/oracle_data/AuxDB/redo01.log', '/oracle_data/AuxDB/redo01b.log' ) SIZE 10 M  REUSE,
  GROUP 2 ( '/oracle_data/AuxDB/redo02.log', '/oracle_data/AuxDB/redo02b.log' ) SIZE 10 M  REUSE,
  GROUP 3 ( '/oracle_data/AuxDB/redo03.log', '/oracle_data/AuxDB/redo03b.log' ) SIZE 10 M  REUSE
 DATAFILE
  '/oracle_data/AuxDB/system_01.dbf'
 CHARACTER SET UTF8


contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

released channel: ORA_AUX_DISK_1
datafile 3 switched to datafile copy
input datafile copy recid=1 stamp=733319493 filename=/oracle_data/AuxDB/sysaux_01.dbf
datafile 12 switched to datafile copy
input datafile copy recid=10 stamp=733319493 filename=/oracle_data/AuxDB/users01.dbf
datafile 13 switched to datafile copy
input datafile copy recid=11 stamp=733319493 filename=/oracle_data/AuxDB/undotbs01.dbf

contents of Memory Script:
{
   recover
   clone database
   noredo
   ,
    delete archivelog
   ;
}
executing Memory Script

Starting recover at 25-OCT-10
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=104 devtype=DISK
Finished recover at 25-OCT-10

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     683671552 bytes

Fixed Size                     2043136 bytes
Variable Size                276828928 bytes
Database Buffers             398458880 bytes
Redo Buffers                   6340608 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "AUXDB" RESETLOGS NOARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      2
  MAXDATAFILES       30
  MAXINSTANCES     1
  MAXLOGHISTORY     2337
 LOGFILE
  GROUP  1 ( '/oracle_data/AuxDB/redo01.log', '/oracle_data/AuxDB/redo01b.log' ) SIZE 10 M  REUSE,
  GROUP  2 ( '/oracle_data/AuxDB/redo02.log', '/oracle_data/AuxDB/redo02b.log' ) SIZE 10 M  REUSE,
  GROUP  3 ( '/oracle_data/AuxDB/redo03.log', '/oracle_data/AuxDB/redo03b.log' ) SIZE 10 M  REUSE
 DATAFILE
  '/oracle_data/AuxDB/system_01.dbf'
 CHARACTER SET UTF8

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/oracle_data/AuxDB/temp_01.dbf";
   switch clone tempfile all;
   catalog clone datafilecopy  "/oracle_data/AuxDB/sysaux_01.dbf";
   catalog clone datafilecopy  "/oracle_data/AuxDB/data_01.dbf";
   catalog clone datafilecopy  "/oracle_data/AuxDB/indexes_01.dbf";
   catalog clone datafilecopy  "/oracle_data/AuxDB/users01.dbf";
   catalog clone datafilecopy  "/oracle_data/AuxDB/undotbs01.dbf";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed temporary file 1 to /oracle_data/AuxDB/temp_01.dbf in control file

cataloged datafile copy
datafile copy filename=/oracle_data/AuxDB/sysaux_01.dbf recid=1 stamp=733319503


cataloged datafile copy
datafile copy filename=/oracle_data/AuxDB/undotbs01.dbf recid=11 stamp=733319503

datafile 3 switched to datafile copy
input datafile copy recid=1 stamp=733319503 filename=/oracle_data/AuxDB/sysaux_01.dbf
datafile 4 switched to datafile copy
input datafile copy recid=2 stamp=733319503 filename=/oracle_data/AuxDB/data_01.dbf
datafile 5 switched to datafile copy
input datafile copy recid=5 stamp=733319503 filename=/oracle_data/AuxDB/indexes_01.dbf
datafile 8 switched to datafile copy
input datafile copy recid=10 stamp=733319503 filename=/oracle_data/AuxDB/users01.dbf
datafile 13 switched to datafile copy
input datafile copy recid=11 stamp=733319503 filename=/oracle_data/AuxDB/undotbs01.dbf

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 25-OCT-10

RMAN>

RMAN> exit


Recovery Manager complete.
9. Complete.