Friday, October 1, 2010

Oracle Advanced Replication - Setup

Steps for Setting Up Advanced Replication
Step 1 - Create 2 users: REPADMIN and REPSYS.
REPADMIN will perform all administration tasks related with advanced replication. REPSYS performs operations on SYS's behalf, as required by the advanced replication packages. SYSTEM will hold the replication tables. Set up the db links and grant the users the appropriate privileges.

At the master definition site:

REM Run this first on the main database as SYS.
REM Function: sets up the advanced replication users.
REM
SET echo on
SPOOL cr_rep1.out
CONNECT sys/&sys_passwd
ALTER database rename global_name to NEMP.WORLD;

CREATE USER repsys identified by &repsys_passwd
default tablespace tools
temporary tablespace temp
quota unlimited on tools;

GRANT connect,resource to repsys;
DROP public database link PRODREP.world;

CREATE PUBLIC database link PRODREP.WORLD using 'PRODREP.WORLD';
DROP database link PRODREP.WORLD;

CREATE DATABASE link PRODREP.WORLD connect to repsys identified by &repsys_passwd;

CREATE USER repadmin identified by &repadmin_passwd
default tablespace tools
temporary tablespace temp
quota unlimited on tools;

GRANT dba to repadmin;
GRANT execute on dbms_defer to repadmin with grant option;
GRANT execute on dbms_defer_query to repadmin;
EXECUTE dbms_repcat_admin.grant_admin_any_repgroup('repadmin');
EXECUTE dbms_repcat_auth.grant_surrogate_repcat('repsys');
CONNECT repadmin/&repadmin_passwd
DROP database link PRODREP.world;

CREATE DATABASE link PRODREP.WORLD connect to repadmin
identified by &repadmin_passwd;
GRANT execute on sys.dbms_defer to ACME;

CONNECT ACME/&ACME_passwd
DROP database link PRODREP.world;

CREATE DATABASE link PRODREP.WORLD connect to ACME
identified by &ACME_passwd;
SPOOL off;
Step 2 - Create the replication administration users at the master site, with the appropriate database links and database privileges.
REM To be run on the master site as SYS
REM Sites up the replication admin users and objects
REM
SET echo on
SPOOL cr_rep1.out
CONNECT sys/&sys_passwd
ALTER database rename global_name to PRODREP.WORLD;

CREATE USER repsys identified by &repsys_passwd
default tablespace tools
temporary tablespace temp
quota unlimited on tools;

GRANT connect,resource to repsys;
DROP public database link NEMP.WORLD;

CREATE PUBLIC database link NEMP.WORLD using 'NEMP';
DROP database link NEMP.WORLD;

CREATE DATABASE link NEMP.WORLD connect to repsys
identified by &repsys_passwd;

CREATE USER repadmin identified by &repadmin_passwd
default tablespace tools
temporary tablespace temp
quota unlimited on tools
/

GRANT dba to repadmin;
GRANT execute on dbms_defer to repadmin with grant option;
GRANT execute on dbms_defer_query to repadmin;
EXECUTE dbms_repcat_admin.grant_admin_any_repgroup('repadmin');
EXECUTE dbms_repcat_auth.grant_surrogate_repcat('repsys');
CONNECT repadmin/&repadmin_passwd
DROP database link NEMP.WORLD;

CREATE DATABASE link NEMP.WORLD connect to repadmin
identified by &repadmin_passwd;

GRANT execute on sys.dbms_defer to ACME;
CONNECT ACME/&ACME_passwd
DROP database link NEMP.WORLD;

CREATE DATABASE link NEMP.WORLD connect to ACME
identified by &ACME_passwd;
SPOOL off;
SET echo off
From here on, you must perform all tasks as the REPADMIN user!

Step 3 - At the master site, pre-create the objects to be replicated.
If the table is constantly changing at the master definition site, it is better to create just the structures and have the replication manager copy the rows while creating the replication objects.

Step 4 - At the master definition site, create a replication schema.
exec dbms_repcat.create_master_schema('ACME');
Step 5 - At the master definition site, create the required replication group.
exec dbms_repcat.create_master_repgroup('BILLING_RUN');
Step 6 - Add the objects to the group. For example:
exec dbms_repcat.create_master_repobject(-
SNAME=>'ACME',ONAME=>'BILLINGSMELTERREDUCTION',TYPE=>'TABLE',-
USE_EXISTING_OBJECT=>true,COPY_ROWS=>true,GNAME=>'BILLING_RUN');
Step 7 - Generate replication support for the object.
This will create the packages and triggers for advanced replication.

exec dbms_repcat.generate_replication_support('BILLING_RUN', 'BILLINGSMELTERREDUCTION','TABLE');
Step 8 - Add one or more master site to the group.
exec dbms_repcat.create_master_database(-
SNAME => 'ACME',oname => 'BILLINGSMELTERREDUCTION',type=>'TABLE',-
USE_EXISTING_OBJECT=>true,copy_rows => true,gname => 'BILLING_RUN');
At this point, there should be a jobs submitted automatically to the master site and master definition site:

JOB WHAT
---- ------------------------------------------------------------
INTERVAL LAST_DATE LAST_SEC BR NEXT_DATE NEXT_SEC
-------------------- --------- -------- -- --------- --------
41 dbms_repcat.do_deferred_repcat_admin('"ACME"', FALSE);
SYSDATE + (5/1440) 08-JUL-98 18:03:19 N 08-JUL-98 18:13:19
This job will execute the tasks listed in the view DBA_REPCATLOG. For example, add replication object, add master site, etc.

At the master definition site, the job to replicate all SQL command should also be automatically submitted. For example:

JOB WHAT
---- ------------------------------------------------------------
INTERVAL LAST_DATE LAST_SEC BR NEXT_DATE NEXT_SEC
-------------------- --------- -------- -- --------- --------
27 sys.dbms_defer_sys.execute(destination=>'PRODREP.WORLD', execute_as_user=>TRUE,
batch_size=>140);
sysdate+5/1440 08-JUL-98 18:01:12 N 08-JUL-98 18:06:12
Step 9 - Resume master activity.
Once DBA_REPCATLOG is cleared, ie, job 41 is completed successfully, you can resume master activity. Errors in executing job 41 will be recorded in DBA_REPCATLOG. To resume master activity, issue the command listed below.

Exec dbms_repcat.resume_master_activity('BILLING_RUN');
From this point the replication group should change from QUIESCED to NORMAL mode. While the database is in QUIESCED mode, only SELECT statements are allowed against the database. In NORMAL mode, all DMLs are allowed.


HAPPY LEARNING!

GUIDE ON CREATING PHYSICAL STANDBY USING RMAN DUPLICATE

METALINK DOCID: 1075908.1 STEP BY STEP GUIDE ON CREATING PHYSICAL STANDBY USING RMAN DUPLICATE...FROM ACTIVE DATABASE
========================= WITHOUT SHUTTING DOWN THE PRIMARY AND USING PRIMARY ACTIVE DATABASE FILES [ID 1075908.1]

STEP-1 (KEEP THE FOLLOWING DETAILS IN HANDY)
============================================
PRIMARY Database Details
========================
SQL> sho parameter spfile

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATADG1/spfilepmcpbs21.ora

SQL> sho parameter control_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATADG1/bcrpbs20/controlfile/control01.ctl

SQL> sho parameter db_recovery_file_dest

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +datadg1 <-- This parameter should be defined SQL> select FILE#,NAME from v$datafile;

FILE# NAME
---------- ----------------------------------------------------------------------------------------------------
1 +DATADG1/bcrpbs20/datafile/system.279.699561171
2 +DATADG1/bcrpbs20/datafile/sysaux.280.699561057
3 +DATADG1/bcrpbs20/datafile/undotbs1.276.699561241
..
..
..
73 +DATADG1/bcrpbs20/datafile/pbsd_racs_data.469.721768271
74 +DATADG1/bcrpbs20/datafile/pbsd_price_idx.464.721768335
76 +DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.450.721859367
77 +DATADG1/bcrpbs20/datafile/pbsd_racs_data.443.721859377
78 +DATADG1/bcrpbs20/datafile/pbsd_price_idx.470.721859383

60 rows selected.

SQL>

SQL> select MEMBER from v$logfile;

MEMBER
--------------------------------------------------------------------------------
+DATADG1/bcrpbs20/onlinelog/group_1.378.713448383
+DATADG1/bcrpbs20/onlinelog/group_1.369.713448389
+DATADG1/bcrpbs20/onlinelog/group_5.265.713446555
..
..
..
+DATADG1/bcrpbs20/onlinelog/group_33.421.713454787
+DATADG1/bcrpbs20/onlinelog/group_33.422.713454793



STANDBY Database Details
========================

SQL> sho parameter spfile

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
spfile string +DATADG1/pmcpbs20/spfilepmcpbs2.ora
SQL> sho parameter control_files

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_files string +DATADG1/pmcpbs20/controlfile/control01.ctl

SQL>



SQL> select FILE#,NAME from v$datafile;

FILE# NAME
---------- ----------------------------------------------------------------------------------------------------
1 +DATADG1/pmcpbs20/datafile/system.661.727505763
2 +DATADG1/pmcpbs20/datafile/sysaux.660.727505841
3 +DATADG1/pmcpbs20/datafile/undotbs1.662.727505217
..
..
..
77 +DATADG1/pmcpbs20/datafile/pbsd_racs_data.656.727505911
78 +DATADG1/pmcpbs20/datafile/pbsd_price_index.653.727506103

57 rows selected.

SQL>

STEP-2 TAKE BACKUP OF THE SPFILE OR PFILE OF STANDBY DATABASE
======================================================


(i) If standby is using spfile, create pfile using spfile in temporary location, If standby was using pfile
make a copy of the pfile to the temporary location
(ii) In the pfile created in (i), Make parameter cluster_database=false , If standby is in RAC.
(ii) Shutdown the database(RAC-using srvctl) and start the DB as standalone with the PFILE taken as backup

bash-3.00$ ls -ltr
total 179752
-rw-r--r-- 1 oracle oinstall 3553 Aug 26 00:59 pfile_bkp.ora
bash-3.00$ pwd
/home/oracle/PFILE_CONTROL
bash-3.00$

STEP-3 CREATE AN RMAN .RCV FILE AS BELOW
=========================================
run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate channel prmy5 type disk;
allocate channel prmy6 type disk;
allocate auxiliary channel stby1 type disk;
allocate auxiliary channel stby2 type disk;
allocate auxiliary channel stby3 type disk;
allocate auxiliary channel stby4 type disk;
duplicate target database for standby from active database
spfile
set db_unique_name='PMCPBS20'
set control_files='+DATADG1/pmcpbs20/controlfile/control01.ctl'
set cluster_database='false'
set service_names='PMCPBS20'
set fal_client='pmcpbs20'
set fal_server='bcrpbs20'
set standby_file_management='AUTO'
set log_archive_config='dg_config=(PMCPBS20,BCRPBS20)'
set log_archive_dest_1='location="+ARCHDG1", valid_for=(ALL_LOGFILES,ALL_ROLES)'
nofilenamecheck;
}

Where,

.. set db_unique_name='PMCPBS20' <<-------- This should be the unique name of standby database .. set control_files='+DATADG1/pmcpbs20/controlfile/control01.ctl' <<-------- This was the control file location found in STEP-1 .. set cluster_database='false' <<-------- For RAC this parameter is set FALSE in STEP-2 .. set service_names='PMCPBS20' <<-------- This SERVICE NAME should connect to standby database STEP-4 RUN THE BELOW .RCV IN STANDBY SITE AS SHOWN BELOW ======================================================== nohup rman target USER/PWD@BCRPBS20_forrebuild auxiliary USER/PWD@PMCPBS20 cmdfile /home/oracle/PFILE_CONTROL/Rebuilt_BCRPBS20_26thAug.rcv log /home/oracle/PFILE_CONTROL/Rebuilt_BCRPBS20_26thAug.log & Where, USER/PWD@BCRPBS20_forrebuild <<---- BCRPBS20_forrebuild(This tns entry should be added to TNSNAMES.ORA for connecting to PRIMARY DB to only 1 node) USER/PWD@PMCPBS20 <<---- PMCPBS20 (This tns entry should point to standby database itself) LOG OF THE ABOVE STANDBY CREATION ACTIVITY SHOULD BE AS BELOW ============================================================== Recovery Manager: Release 11.1.0.7.0 - Production on Thu Aug 26 04:22:32 2010 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: PMCPBS20 (DBID=1148223702) connected to auxiliary database: PMCPBS20 (not mounted) RMAN> run {
2> allocate channel prmy1 type disk;
3> allocate channel prmy2 type disk;
4> allocate channel prmy3 type disk;
5> allocate channel prmy4 type disk;
6> allocate channel prmy5 type disk;
7> allocate channel prmy6 type disk;
8> allocate auxiliary channel stby1 type disk;
9> allocate auxiliary channel stby2 type disk;
10> allocate auxiliary channel stby3 type disk;
11> allocate auxiliary channel stby4 type disk;
12> duplicate target database for standby from active database
13> spfile
14> set db_unique_name='PMCPBS20'
15> set control_files='+DATADG1/pmcpbs20/controlfile/control01.ctl'
16> set cluster_database='false'
17> set service_names='PMCPBS20'
18> set fal_client='pmcpbs20'
19> set fal_server='bcrpbs20'
20> set standby_file_management='AUTO'
21> set log_archive_config='dg_config=(PMCPBS20,BCRPBS20)'
22> set log_archive_dest_1='location="+ARCHDG1", valid_for=(ALL_LOGFILES,ALL_ROLES)'
23> nofilenamecheck;
24> }
25>
26>
using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: SID=1354 instance=PMCPBS21 device type=DISK

allocated channel: prmy2
channel prmy2: SID=1353 instance=PMCPBS21 device type=DISK

allocated channel: prmy3
channel prmy3: SID=1341 instance=PMCPBS21 device type=DISK

allocated channel: prmy4
channel prmy4: SID=1349 instance=PMCPBS21 device type=DISK

allocated channel: prmy5
channel prmy5: SID=1325 instance=PMCPBS21 device type=DISK

allocated channel: prmy6
channel prmy6: SID=1357 instance=PMCPBS21 device type=DISK

allocated channel: stby1
channel stby1: SID=2066 device type=DISK

allocated channel: stby2
channel stby2: SID=2065 device type=DISK

allocated channel: stby3
channel stby3: SID=2064 device type=DISK

allocated channel: stby4
channel stby4: SID=2753 device type=DISK

Starting Duplicate Db at 26-AUG-10

contents of Memory Script:
{
backup as copy reuse
file '/home/oracle/PMCPBS20/product/dbms/11G/dbs/orapwPMCPBS21' auxiliary format
'/home/oracle/PMCPBS20/product/dbms/11G/dbs/orapwPMCPBS21' file
'+DATADG1/spfilepmcpbs21.ora' auxiliary format
'+DATADG1/pmcpbs20/spfilepmcpbs2.ora' ;
sql clone "alter system set spfile= ''+DATADG1/pmcpbs20/spfilepmcpbs2.ora''";
}
executing Memory Script

Starting backup at 26-AUG-10
Finished backup at 26-AUG-10

sql statement: alter system set spfile= ''+DATADG1/pmcpbs20/spfilepmcpbs2.ora''

contents of Memory Script:
{
sql clone "alter system set db_unique_name =
''PMCPBS20'' comment=
'''' scope=spfile";
sql clone "alter system set control_files =
''+DATADG1/pmcpbs20/controlfile/control01.ctl'' comment=
'''' scope=spfile";
sql clone "alter system set cluster_database =
false comment=
'''' scope=spfile";
sql clone "alter system set service_names =
''PMCPBS20'' comment=
'''' scope=spfile";
sql clone "alter system set fal_client =
''pmcpbs20'' comment=
'''' scope=spfile";
sql clone "alter system set fal_server =
''bcrpbs20'' comment=
'''' scope=spfile";
sql clone "alter system set standby_file_management =
''AUTO'' comment=
'''' scope=spfile";
sql clone "alter system set log_archive_config =
''dg_config=(PMCPBS20,BCRPBS20)'' comment=
'''' scope=spfile";
sql clone "alter system set log_archive_dest_1 =
''location=^"+ARCHDG1^", valid_for=(ALL_LOGFILES,ALL_ROLES)'' comment=
'''' scope=spfile";
shutdown clone immediate;
startup clone nomount ;
}
executing Memory Script

sql statement: alter system set db_unique_name = ''PMCPBS20'' comment= '''' scope=spfile

sql statement: alter system set control_files = ''+DATADG1/pmcpbs20/controlfile/control01.ctl'' comment= '''' scope=spfile

sql statement: alter system set cluster_database = false comment= '''' scope=spfile

sql statement: alter system set service_names = ''PMCPBS20'' comment= '''' scope=spfile

sql statement: alter system set fal_client = ''pmcpbs20'' comment= '''' scope=spfile

sql statement: alter system set fal_server = ''bcrpbs20'' comment= '''' scope=spfile

sql statement: alter system set standby_file_management = ''AUTO'' comment= '''' scope=spfile

sql statement: alter system set log_archive_config = ''dg_config=(PMCPBS20,BCRPBS20)'' comment= '''' scope=spfile

sql statement: alter system set log_archive_dest_1 = ''location="+ARCHDG1", valid_for=(ALL_LOGFILES,ALL_ROLES)'' comment= '''' scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area 42757922816 bytes

Fixed Size 2181392 bytes
Variable Size 16176203504 bytes
Database Buffers 26575110144 bytes
Redo Buffers 4427776 bytes
allocated channel: stby1
channel stby1: SID=1378 device type=DISK
allocated channel: stby2
channel stby2: SID=2065 device type=DISK
allocated channel: stby3
channel stby3: SID=2064 device type=DISK
allocated channel: stby4
channel stby4: SID=2063 device type=DISK

contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '+DATADG1/pmcpbs20/controlfile/control01.ctl';
sql clone 'alter database mount standby database';
}
executing Memory Script

Starting backup at 26-AUG-10
channel prmy1: starting datafile copy
copying standby control file
output file name=/home/oracle/PMCPBS20/product/dbms/11G/dbs/snapcf_PMCPBS21.f tag=TAG20100826T042344 RECID=38 STAMP=728022226
channel prmy1: datafile copy complete, elapsed time: 00:00:15
Finished backup at 26-AUG-10

sql statement: alter database mount standby database
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

contents of Memory Script:
{
set newname for tempfile 1 to
"+datadg1";
switch clone tempfile all;
set newname for datafile 1 to
"+datadg1";
set newname for datafile 2 to
"+datadg1";
set newname for datafile 3 to
"+datadg1";
set newname for datafile 4 to
"+datadg1";
set newname for datafile 5 to
"+datadg1";
set newname for datafile 6 to
"+datadg1";
set newname for datafile 7 to
"+datadg1";
set newname for datafile 8 to
"+datadg1";
set newname for datafile 9 to
"+datadg1";
set newname for datafile 10 to
"+datadg1";
set newname for datafile 11 to
"+datadg1";
set newname for datafile 12 to
"+datadg1";
set newname for datafile 13 to
"+datadg1";
set newname for datafile 14 to
"+datadg1";
set newname for datafile 15 to
"+datadg1";
set newname for datafile 16 to
"+datadg1";
set newname for datafile 17 to
"+datadg1";
set newname for datafile 18 to
"+datadg1";
set newname for datafile 19 to
"+datadg1";
set newname for datafile 21 to
"+datadg1";
set newname for datafile 23 to
"+datadg1";
set newname for datafile 26 to
"+datadg1";
set newname for datafile 28 to
"+datadg1";
set newname for datafile 29 to
"+datadg1";
set newname for datafile 30 to
"+datadg1";
set newname for datafile 31 to
"+datadg1";
set newname for datafile 32 to
"+datadg1";
set newname for datafile 33 to
"+datadg1";
set newname for datafile 34 to
"+datadg1";
set newname for datafile 42 to
"+datadg1";
set newname for datafile 43 to
"+datadg1";
set newname for datafile 44 to
"+datadg1";
set newname for datafile 45 to
"+datadg1";
set newname for datafile 46 to
"+datadg1";
set newname for datafile 47 to
"+datadg1";
set newname for datafile 48 to
"+datadg1";
set newname for datafile 50 to
"+datadg1";
set newname for datafile 51 to
"+datadg1";
set newname for datafile 52 to
"+datadg1";
set newname for datafile 53 to
"+datadg1";
set newname for datafile 56 to
"+datadg1";
set newname for datafile 57 to
"+datadg1";
set newname for datafile 58 to
"+datadg1";
set newname for datafile 59 to
"+datadg1";
set newname for datafile 60 to
"+datadg1";
set newname for datafile 61 to
"+datadg1";
set newname for datafile 62 to
"+datadg1";
set newname for datafile 63 to
"+datadg1";
set newname for datafile 64 to
"+datadg1";
set newname for datafile 66 to
"+datadg1";
set newname for datafile 67 to
"+datadg1";
set newname for datafile 68 to
"+datadg1";
set newname for datafile 69 to
"+datadg1";
set newname for datafile 70 to
"+datadg1";
set newname for datafile 71 to
"+datadg1";
set newname for datafile 72 to
"+datadg1";
set newname for datafile 73 to
"+datadg1";
set newname for datafile 74 to
"+datadg1";
set newname for datafile 76 to
"+datadg1";
set newname for datafile 77 to
"+datadg1";
set newname for datafile 78 to
"+datadg1";
backup as copy reuse
datafile 1 auxiliary format
"+datadg1" datafile
2 auxiliary format
"+datadg1" datafile
3 auxiliary format
"+datadg1" datafile
4 auxiliary format
"+datadg1" datafile
5 auxiliary format
"+datadg1" datafile
6 auxiliary format
"+datadg1" datafile
7 auxiliary format
"+datadg1" datafile
8 auxiliary format
"+datadg1" datafile
9 auxiliary format
"+datadg1" datafile
10 auxiliary format
"+datadg1" datafile
11 auxiliary format
"+datadg1" datafile
12 auxiliary format
"+datadg1" datafile
13 auxiliary format
"+datadg1" datafile
14 auxiliary format
"+datadg1" datafile
15 auxiliary format
"+datadg1" datafile
16 auxiliary format
"+datadg1" datafile
17 auxiliary format
"+datadg1" datafile
18 auxiliary format
"+datadg1" datafile
19 auxiliary format
"+datadg1" datafile
21 auxiliary format
"+datadg1" datafile
23 auxiliary format
"+datadg1" datafile
26 auxiliary format
"+datadg1" datafile
28 auxiliary format
"+datadg1" datafile
29 auxiliary format
"+datadg1" datafile
30 auxiliary format
"+datadg1" datafile
31 auxiliary format
"+datadg1" datafile
32 auxiliary format
"+datadg1" datafile
33 auxiliary format
"+datadg1" datafile
34 auxiliary format
"+datadg1" datafile
42 auxiliary format
"+datadg1" datafile
43 auxiliary format
"+datadg1" datafile
44 auxiliary format
"+datadg1" datafile
45 auxiliary format
"+datadg1" datafile
46 auxiliary format
"+datadg1" datafile
47 auxiliary format
"+datadg1" datafile
48 auxiliary format
"+datadg1" datafile
50 auxiliary format
"+datadg1" datafile
51 auxiliary format
"+datadg1" datafile
52 auxiliary format
"+datadg1" datafile
53 auxiliary format
"+datadg1" datafile
56 auxiliary format
"+datadg1" datafile
57 auxiliary format
"+datadg1" datafile
58 auxiliary format
"+datadg1" datafile
59 auxiliary format
"+datadg1" datafile
60 auxiliary format
"+datadg1" datafile
61 auxiliary format
"+datadg1" datafile
62 auxiliary format
"+datadg1" datafile
63 auxiliary format
"+datadg1" datafile
64 auxiliary format
"+datadg1" datafile
66 auxiliary format
"+datadg1" datafile
67 auxiliary format
"+datadg1" datafile
68 auxiliary format
"+datadg1" datafile
69 auxiliary format
"+datadg1" datafile
70 auxiliary format
"+datadg1" datafile
71 auxiliary format
"+datadg1" datafile
72 auxiliary format
"+datadg1" datafile
73 auxiliary format
"+datadg1" datafile
74 auxiliary format
"+datadg1" datafile
76 auxiliary format
"+datadg1" datafile
77 auxiliary format
"+datadg1" datafile
78 auxiliary format
"+datadg1" ;
sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to +datadg1 in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 26-AUG-10
channel prmy1: starting datafile copy
input datafile file number=00013 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_idx.291.701529109
channel prmy2: starting datafile copy
input datafile file number=00014 name=+DATADG1/bcrpbs20/datafile/pbsd_racs_data.292.701529121
channel prmy3: starting datafile copy
input datafile file number=00019 name=+DATADG1/bcrpbs20/datafile/pbsd_price_data.297.701529397
channel prmy4: starting datafile copy
input datafile file number=00023 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.301.701529895
channel prmy5: starting datafile copy
input datafile file number=00026 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.258.709602863
channel prmy6: starting datafile copy
input datafile file number=00046 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.362.711412309
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.648.728022265 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:43:06
channel prmy5: starting datafile copy
input datafile file number=00047 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.363.711679821
output file name=+DATADG1/pmcpbs20/datafile/pbsd_index.645.728022263 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:43:42
channel prmy1: starting datafile copy
input datafile file number=00048 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.364.712512321
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.646.728022263 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:43:42
channel prmy3: starting datafile copy
input datafile file number=00051 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_idx.367.712524829
output file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.651.728022265 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy2: datafile copy complete, elapsed time: 00:43:49
channel prmy2: starting datafile copy
input datafile file number=00052 name=+DATADG1/bcrpbs20/datafile/pbsd_price_data.368.712524839
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.647.728022265 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:43:57
channel prmy4: starting datafile copy
input datafile file number=00067 name=+DATADG1/bcrpbs20/datafile/pbsd_racs_data.490.719525879
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.650.728022265 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy6: datafile copy complete, elapsed time: 00:44:04
channel prmy6: starting datafile copy
input datafile file number=00069 name=+DATADG1/bcrpbs20/datafile/pbsd_price_data.446.719527593
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.654.728024885 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:42:38
channel prmy1: starting datafile copy
input datafile file number=00045 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.360.711327831
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.652.728024851 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:43:14
channel prmy5: starting datafile copy
input datafile file number=00042 name=+DATADG1/bcrpbs20/datafile/pbsd_price_data.358.710788823
output file name=+DATADG1/pmcpbs20/datafile/pbsd_index.653.728024885 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:43:03
channel prmy3: starting datafile copy
input datafile file number=00056 name=+DATADG1/bcrpbs20/datafile/pbsd_price_data.427.715262723
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.655.728024893 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy2: datafile copy complete, elapsed time: 00:43:12
channel prmy2: starting datafile copy
input datafile file number=00057 name=+DATADG1/bcrpbs20/datafile/pbsd_price_data.428.715262725
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.657.728024907 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy6: datafile copy complete, elapsed time: 00:43:42
channel prmy6: starting datafile copy
input datafile file number=00059 name=+DATADG1/bcrpbs20/datafile/pbsd_racs_data.430.715262733
output file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.656.728024901 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:43:52
channel prmy4: starting datafile copy
input datafile file number=00060 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.431.715262739
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.659.728027443 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:41:45
channel prmy5: starting datafile copy
input datafile file number=00061 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.432.715262741
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.660.728027469 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:42:25
channel prmy3: starting datafile copy
input datafile file number=00062 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.433.715262749
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.661.728027485 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy2: datafile copy complete, elapsed time: 00:42:17
channel prmy2: starting datafile copy
input datafile file number=00063 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.434.715262751
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.658.728027443 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:43:13
channel prmy1: starting datafile copy
input datafile file number=00064 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_idx.435.715262753
output file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.662.728027531 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy6: datafile copy complete, elapsed time: 00:42:22
channel prmy6: starting datafile copy
input datafile file number=00070 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_idx.479.720229095
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.663.728027533 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:42:54
channel prmy4: starting datafile copy
input datafile file number=00010 name=+DATADG1/bcrpbs20/datafile/pbsd_index.296.722468841
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.664.728029949 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:44:44
channel prmy5: starting datafile copy
input datafile file number=00011 name=+DATADG1/bcrpbs20/datafile/pbsd_index.465.722469719
output file name=+DATADG1/pmcpbs20/datafile/pbsd_index.669.728030107 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:42:21
channel prmy4: starting datafile copy
input datafile file number=00043 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.361.711103905
output file name=+DATADG1/pmcpbs20/datafile/pbsd_index.668.728030073 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy6: datafile copy complete, elapsed time: 00:43:31
channel prmy6: starting datafile copy
input datafile file number=00044 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.359.711053251
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.666.728030021 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy2: datafile copy complete, elapsed time: 00:44:38
channel prmy2: starting datafile copy
input datafile file number=00068 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.485.719526975
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.665.728030015 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:44:47
channel prmy3: starting datafile copy
input datafile file number=00066 name=+DATADG1/bcrpbs20/datafile/pbsd_racs_data.314.719275135
output file name=+DATADG1/pmcpbs20/datafile/pbsd_index.667.728030037 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:44:39
channel prmy1: starting datafile copy
input datafile file number=00021 name=+DATADG1/bcrpbs20/datafile/pbsd_price_idx.299.701529451
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.675.728032717 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:39:34
channel prmy1: starting datafile copy
input datafile file number=00008 name=+DATADG1/bcrpbs20/datafile/pbsd_index.426.722364855
output file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.674.728032701 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:40:56
channel prmy3: starting datafile copy
input datafile file number=00058 name=+DATADG1/bcrpbs20/datafile/pbsd_price_idx.429.715262731
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.671.728032649 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:44:04
channel prmy4: starting datafile copy
input datafile file number=00004 name=+DATADG1/bcrpbs20/datafile/users.275.699561249
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.672.728032685 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy6: datafile copy complete, elapsed time: 00:43:44
channel prmy6: starting datafile copy
input datafile file number=00006 name=+DATADG1/bcrpbs20/datafile/undotbs3.277.699561235
output file name=+DATADG1/pmcpbs20/datafile/pbsd_index.670.728032633 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:45:20
channel prmy5: starting datafile copy
input datafile file number=00072 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.474.721768159
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.673.728032699 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy2: datafile copy complete, elapsed time: 00:44:39
channel prmy2: starting datafile copy
input datafile file number=00076 name=+DATADG1/bcrpbs20/datafile/pbsd_stg_raw_data.450.721859367
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.680.728035353 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:23:06
channel prmy5: starting datafile copy
input datafile file number=00050 name=+DATADG1/bcrpbs20/datafile/pbsd_price_idx.366.712524817
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.681.728035379 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy2: datafile copy complete, elapsed time: 00:22:48
channel prmy2: starting datafile copy
input datafile file number=00015 name=+DATADG1/bcrpbs20/datafile/pbsd_data.732.727976203
output file name=+DATADG1/pmcpbs20/datafile/undotbs3.679.728035311 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy6: datafile copy complete, elapsed time: 00:25:05
channel prmy6: starting datafile copy
input datafile file number=00016 name=+DATADG1/bcrpbs20/datafile/pbsd_data.547.727976341
output file name=+DATADG1/pmcpbs20/datafile/users.678.728035293 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:31:47
channel prmy4: starting datafile copy
input datafile file number=00071 name=+DATADG1/bcrpbs20/datafile/pbsd_price_data.311.721407945
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.677.728035157 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:34:10
channel prmy3: starting datafile copy
input datafile file number=00005 name=+DATADG1/bcrpbs20/datafile/undotbs2.278.699561227
output file name=+DATADG1/pmcpbs20/datafile/pbsd_index.676.728035091 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:36:42
channel prmy1: starting datafile copy
input datafile file number=00003 name=+DATADG1/bcrpbs20/datafile/undotbs1.276.699561241
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.683.728036747 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy2: datafile copy complete, elapsed time: 00:20:14
channel prmy2: starting datafile copy
input datafile file number=00017 name=+DATADG1/bcrpbs20/datafile/pbsd_price_data.859.727981313
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.684.728036813 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy6: datafile copy complete, elapsed time: 00:19:53
channel prmy6: starting datafile copy
input datafile file number=00012 name=+DATADG1/bcrpbs20/datafile/pbsd_racs_data.836.726285865
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.682.728036739 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:21:32
channel prmy5: starting datafile copy
input datafile file number=00001 name=+DATADG1/bcrpbs20/datafile/system.279.699561171
output file name=+DATADG1/pmcpbs20/datafile/undotbs1.687.728037293 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:14:55
channel prmy1: starting datafile copy
input datafile file number=00002 name=+DATADG1/bcrpbs20/datafile/sysaux.280.699561057
output file name=+DATADG1/pmcpbs20/datafile/undotbs2.686.728037207 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:16:46
channel prmy3: starting datafile copy
input datafile file number=00009 name=+DATADG1/bcrpbs20/datafile/pbsd_core_data.287.701528999
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.685.728037199 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:18:49
channel prmy4: starting datafile copy
input datafile file number=00073 name=+DATADG1/bcrpbs20/datafile/pbsd_racs_data.469.721768271
output file name=+DATADG1/pmcpbs20/datafile/pbsd_core_data.691.728038213 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:03:51
channel prmy3: starting datafile copy
input datafile file number=00077 name=+DATADG1/bcrpbs20/datafile/pbsd_racs_data.443.721859377
output file name=+DATADG1/pmcpbs20/datafile/system.690.728038033 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:07:08
channel prmy5: starting datafile copy
input datafile file number=00074 name=+DATADG1/bcrpbs20/datafile/pbsd_price_idx.464.721768335
output file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.508.728038329 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:03:06
channel prmy4: starting datafile copy
input datafile file number=00078 name=+DATADG1/bcrpbs20/datafile/pbsd_price_idx.470.721859383
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.496.728038459 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:01:31
channel prmy5: starting datafile copy
input datafile file number=00018 name=+DATADG1/bcrpbs20/datafile/pbsd_data.739.728014585
output file name=+DATADG1/pmcpbs20/datafile/pbsd_data.693.728038551 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:00:45
channel prmy5: starting datafile copy
input datafile file number=00028 name=+DATADG1/bcrpbs20/datafile/pbsd_wli.261.710086635
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.649.728038515 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:01:36
channel prmy4: starting datafile copy
input datafile file number=00033 name=+DATADG1/bcrpbs20/datafile/pbsd_geneva.349.710086799
output file name=+DATADG1/pmcpbs20/datafile/pbsd_wli.491.728038597 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:00:16
channel prmy5: starting datafile copy
input datafile file number=00053 name=+DATADG1/bcrpbs20/datafile/users.424.714673535
output file name=+DATADG1/pmcpbs20/datafile/sysaux.507.728038191 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:07:11
channel prmy1: starting datafile copy
input datafile file number=00007 name=+DATADG1/bcrpbs20/datafile/dbus.352.724592017
output file name=+DATADG1/pmcpbs20/datafile/dbus.695.728038619 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:00:02
channel prmy1: starting datafile copy
input datafile file number=00029 name=+DATADG1/bcrpbs20/datafile/pbsd_xml.262.710086651
output file name=+DATADG1/pmcpbs20/datafile/pbsd_geneva.500.728038611 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:00:10
channel prmy4: starting datafile copy
input datafile file number=00030 name=+DATADG1/bcrpbs20/datafile/pbsd_blob.259.710086705
output file name=+DATADG1/pmcpbs20/datafile/pbsd_xml.696.728038621 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:00:01
channel prmy1: starting datafile copy
input datafile file number=00031 name=+DATADG1/bcrpbs20/datafile/pbsd_olap.260.710086743
output file name=+DATADG1/pmcpbs20/datafile/users.694.728038611 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:00:10
channel prmy5: starting datafile copy
input datafile file number=00032 name=+DATADG1/bcrpbs20/datafile/pbsd_racs.348.710086771
output file name=+DATADG1/pmcpbs20/datafile/pbsd_olap.698.728038623 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:00:02
channel prmy1: starting datafile copy
input datafile file number=00034 name=+DATADG1/bcrpbs20/datafile/pbsd_archive.350.710087395
output file name=+DATADG1/pmcpbs20/datafile/pbsd_blob.697.728038621 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy4: datafile copy complete, elapsed time: 00:00:02
output file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.692.728038445 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy3: datafile copy complete, elapsed time: 00:02:59
output file name=+DATADG1/pmcpbs20/datafile/pbsd_racs.699.728038623 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy5: datafile copy complete, elapsed time: 00:00:01
output file name=+DATADG1/pmcpbs20/datafile/pbsd_archive.701.728038623 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy1: datafile copy complete, elapsed time: 00:00:01
output file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.689.728038007 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy6: datafile copy complete, elapsed time: 00:12:03
output file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.688.728037961 tag=TAG20100826T042420 RECID=0 STAMP=0
channel prmy2: datafile copy complete, elapsed time: 00:13:59
Finished backup at 26-AUG-10

sql statement: alter system archive log current

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

datafile 1 switched to datafile copy
input datafile copy RECID=38 STAMP=728038813 file name=+DATADG1/pmcpbs20/datafile/system.690.728038033
datafile 2 switched to datafile copy
input datafile copy RECID=39 STAMP=728038813 file name=+DATADG1/pmcpbs20/datafile/sysaux.507.728038191
datafile 3 switched to datafile copy
input datafile copy RECID=40 STAMP=728038813 file name=+DATADG1/pmcpbs20/datafile/undotbs1.687.728037293
datafile 4 switched to datafile copy
input datafile copy RECID=41 STAMP=728038813 file name=+DATADG1/pmcpbs20/datafile/users.678.728035293
datafile 5 switched to datafile copy
input datafile copy RECID=42 STAMP=728038814 file name=+DATADG1/pmcpbs20/datafile/undotbs2.686.728037207
datafile 6 switched to datafile copy
input datafile copy RECID=43 STAMP=728038814 file name=+DATADG1/pmcpbs20/datafile/undotbs3.679.728035311
datafile 7 switched to datafile copy
input datafile copy RECID=44 STAMP=728038814 file name=+DATADG1/pmcpbs20/datafile/dbus.695.728038619
datafile 8 switched to datafile copy
input datafile copy RECID=45 STAMP=728038814 file name=+DATADG1/pmcpbs20/datafile/pbsd_index.676.728035091
datafile 9 switched to datafile copy
input datafile copy RECID=46 STAMP=728038814 file name=+DATADG1/pmcpbs20/datafile/pbsd_core_data.691.728038213
datafile 10 switched to datafile copy
input datafile copy RECID=47 STAMP=728038814 file name=+DATADG1/pmcpbs20/datafile/pbsd_index.669.728030107
datafile 11 switched to datafile copy
input datafile copy RECID=48 STAMP=728038815 file name=+DATADG1/pmcpbs20/datafile/pbsd_index.670.728032633
datafile 12 switched to datafile copy
input datafile copy RECID=49 STAMP=728038815 file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.689.728038007
datafile 13 switched to datafile copy
input datafile copy RECID=50 STAMP=728038815 file name=+DATADG1/pmcpbs20/datafile/pbsd_index.645.728022263
datafile 14 switched to datafile copy
input datafile copy RECID=51 STAMP=728038815 file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.651.728022265
datafile 15 switched to datafile copy
input datafile copy RECID=52 STAMP=728038815 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.683.728036747
datafile 16 switched to datafile copy
input datafile copy RECID=53 STAMP=728038815 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.684.728036813
datafile 17 switched to datafile copy
input datafile copy RECID=54 STAMP=728038816 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.688.728037961
datafile 18 switched to datafile copy
input datafile copy RECID=55 STAMP=728038816 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.693.728038551
datafile 19 switched to datafile copy
input datafile copy RECID=56 STAMP=728038816 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.646.728022263
datafile 21 switched to datafile copy
input datafile copy RECID=57 STAMP=728038816 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.675.728032717
datafile 23 switched to datafile copy
input datafile copy RECID=58 STAMP=728038816 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.647.728022265
datafile 26 switched to datafile copy
input datafile copy RECID=59 STAMP=728038816 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.648.728022265
datafile 28 switched to datafile copy
input datafile copy RECID=60 STAMP=728038817 file name=+DATADG1/pmcpbs20/datafile/pbsd_wli.491.728038597
datafile 29 switched to datafile copy
input datafile copy RECID=61 STAMP=728038817 file name=+DATADG1/pmcpbs20/datafile/pbsd_xml.696.728038621
datafile 30 switched to datafile copy
input datafile copy RECID=62 STAMP=728038817 file name=+DATADG1/pmcpbs20/datafile/pbsd_blob.697.728038621
datafile 31 switched to datafile copy
input datafile copy RECID=63 STAMP=728038817 file name=+DATADG1/pmcpbs20/datafile/pbsd_olap.698.728038623
datafile 32 switched to datafile copy
input datafile copy RECID=64 STAMP=728038817 file name=+DATADG1/pmcpbs20/datafile/pbsd_racs.699.728038623
datafile 33 switched to datafile copy
input datafile copy RECID=65 STAMP=728038817 file name=+DATADG1/pmcpbs20/datafile/pbsd_geneva.500.728038611
datafile 34 switched to datafile copy
input datafile copy RECID=66 STAMP=728038818 file name=+DATADG1/pmcpbs20/datafile/pbsd_archive.701.728038623
datafile 42 switched to datafile copy
input datafile copy RECID=67 STAMP=728038818 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.659.728027443
datafile 43 switched to datafile copy
input datafile copy RECID=68 STAMP=728038818 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.671.728032649
datafile 44 switched to datafile copy
input datafile copy RECID=69 STAMP=728038818 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.672.728032685
datafile 45 switched to datafile copy
input datafile copy RECID=70 STAMP=728038818 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.658.728027443
datafile 46 switched to datafile copy
input datafile copy RECID=71 STAMP=728038818 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.650.728022265
datafile 47 switched to datafile copy
input datafile copy RECID=72 STAMP=728038819 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.652.728024851
datafile 48 switched to datafile copy
input datafile copy RECID=73 STAMP=728038819 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.654.728024885
datafile 50 switched to datafile copy
input datafile copy RECID=74 STAMP=728038819 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.682.728036739
datafile 51 switched to datafile copy
input datafile copy RECID=75 STAMP=728038819 file name=+DATADG1/pmcpbs20/datafile/pbsd_index.653.728024885
datafile 52 switched to datafile copy
input datafile copy RECID=76 STAMP=728038819 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.655.728024893
datafile 53 switched to datafile copy
input datafile copy RECID=77 STAMP=728038819 file name=+DATADG1/pmcpbs20/datafile/users.694.728038611
datafile 56 switched to datafile copy
input datafile copy RECID=78 STAMP=728038820 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.660.728027469
datafile 57 switched to datafile copy
input datafile copy RECID=79 STAMP=728038820 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.661.728027485
datafile 58 switched to datafile copy
input datafile copy RECID=80 STAMP=728038820 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.677.728035157
datafile 59 switched to datafile copy
input datafile copy RECID=81 STAMP=728038820 file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.662.728027531
datafile 60 switched to datafile copy
input datafile copy RECID=82 STAMP=728038820 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.663.728027533
datafile 61 switched to datafile copy
input datafile copy RECID=83 STAMP=728038820 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.664.728029949
datafile 62 switched to datafile copy
input datafile copy RECID=84 STAMP=728038821 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.665.728030015
datafile 63 switched to datafile copy
input datafile copy RECID=85 STAMP=728038821 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.666.728030021
datafile 64 switched to datafile copy
input datafile copy RECID=86 STAMP=728038821 file name=+DATADG1/pmcpbs20/datafile/pbsd_index.667.728030037
datafile 66 switched to datafile copy
input datafile copy RECID=87 STAMP=728038821 file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.674.728032701
datafile 67 switched to datafile copy
input datafile copy RECID=88 STAMP=728038821 file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.656.728024901
datafile 68 switched to datafile copy
input datafile copy RECID=89 STAMP=728038821 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.673.728032699
datafile 69 switched to datafile copy
input datafile copy RECID=90 STAMP=728038822 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.657.728024907
datafile 70 switched to datafile copy
input datafile copy RECID=91 STAMP=728038822 file name=+DATADG1/pmcpbs20/datafile/pbsd_index.668.728030073
datafile 71 switched to datafile copy
input datafile copy RECID=92 STAMP=728038822 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_data.685.728037199
datafile 72 switched to datafile copy
input datafile copy RECID=93 STAMP=728038822 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.680.728035353
datafile 73 switched to datafile copy
input datafile copy RECID=94 STAMP=728038822 file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.508.728038329
datafile 74 switched to datafile copy
input datafile copy RECID=95 STAMP=728038822 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.496.728038459
datafile 76 switched to datafile copy
input datafile copy RECID=96 STAMP=728038823 file name=+DATADG1/pmcpbs20/datafile/pbsd_data.681.728035379
datafile 77 switched to datafile copy
input datafile copy RECID=97 STAMP=728038823 file name=+DATADG1/pmcpbs20/datafile/pbsd_racs_data.692.728038445
datafile 78 switched to datafile copy
input datafile copy RECID=98 STAMP=728038823 file name=+DATADG1/pmcpbs20/datafile/pbsd_price_index.649.728038515
Finished Duplicate Db at 26-AUG-10
released channel: prmy1
released channel: prmy2
released channel: prmy3
released channel: prmy4
released channel: prmy5
released channel: prmy6
released channel: stby1
released channel: stby2
released channel: stby3
released channel: stby4

Recovery Manager complete.

HAPPY LEARNING!

SOLARIS USEFUL COMMANDS FOR DBA'S

Not just for DBAs: this is to remind anyone of syntax and options.

1. Handy Solaris commands HW config, swap, patches etc.
2. Real-time performance monitoring vmstat, iostat, mpstat etc.
3. Unix Commands find, awk, sed, grep etc.
4. vi editor commands the 22 most useful vi commands
5. Unix file permissions explained sounds basic, but you may learn something new here!
6. The Solaris Name Service explained how hostname and username lookups work


1. Handy Solaris commands

show hardware config (memory, CPUs etc) :
/usr/platform/sun4u/sbin/prtdiag -v |more
/usr/sbin/psrinfo
show kernel settings:
/usr/sbin/sysdef |more
more /etc/system

show list of Solaris patches:
showrev -p |more

show software installed:
pkginfo |more

check swap space:
/usr/sbin/swap -s

check system load average: an uptime more than double the number of CPUs is getting a bit busy
uptime

top CPU users:
/usr/ucb/ps uax |head

top memory users:
/usr/ucb/ps vax |head

check disk space:
df -k (shows all mounted filesystems -including NFS etc)
df -lk (shows only local filesystems)
df -k -Fufs (shows only local Sun UFS filesystems (normal hard disks)
df -k . (show just the filesystem you are currently in)

2. Real-time performance monitoring:


memory usage :
vmstat 5 -look at memory/free field and page/sr field. Ignore the first line output as it’s historical
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s6 s3 in sy cs us sy id
0 0 83 4456 456 1 431 266 70 167 0 35 6 6 0 2 523 567 31 14 9 76
0 0 62 3588464 46824 0 196 64 0 0 0 0 5 4 0 0 606 9743 882 86 7 7
0 0 62 3587960 42672 1 552 41 1 1 0 0 2 2 0 0 789 5488 1040 84 7 9
0 1 62 3584704 38848 0 471 3 38 38 0 0 5 5 0 1 1426 5270 968 64 9 27
0 0 62 3586464 38456 0 451 0 0 0 0 0 2 2 0 0 929 6039 1265 70 6 24
Also make sure that cpu/us is at least double cpu/sy


disk busy-ness
mpstat 5 (or iostat -c 5 )
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 221 3 544 227 75 582 61 31 28 7 267 18 12 2 68
2 209 2 446 395 178 328 37 31 32 6 299 11 7 2 80
-look at the wt field, this is wait-for-I/O which can be network or disk I/O, and should not be more than 30-40 (percent)

To see individual disk performance and find slow ('hot') disks :
iostat -d 5
sd0 sd1 sd6 sd37
kps tps serv kps tps serv kps tps serv kps tps serv
123 6 44 123 6 42 0 0 42 66 2 8
33 1 3 37 1 1 0 0 0 3 0 5
-check the serv column for each disk: this is the disk service time in milliseconds.
However iostat by default shows only the first four disks: if you have more use -x and/or -l options :
iostat -xdnl 7 5 (e.g. if you have seven hard disks)
extended device statistics
r/s w/s kr/s kw/s wait actv wsvc_t asvc_t %w %b device
0.4 1.6 3.2 70.4 0.0 0.0 0.0 2.7 0 1 c0t0d0
0.2 1.6 1.6 70.4 0.0 0.0 0.0 3.0 0 1 c0t1d0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c0t6d0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t8d0
88.8 19.8 1276.8 158.4 0.0 0.6 0.0 5.7 0 51 c1t9d0
0.0 0.4 0.0 100.8 0.0 0.0 0.0 17.4 0 1 c1t10d0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 c1t11d0


3. Unix Commands

at - run a command or script once in the future
bash$ at 0815 tomorrow
at> rm $HOME/zxc
at> (type Control-D)
commands will be executed using /usr/bin/bash
job 984032100.a at Thu Mar 8 06:15:00 2001



awk


cron
crontab -l to see your crontab
crontab -e to edit it (NB but first do EDITOR=vi (or EDITOR=emacs) ; export EDITOR )
Remember fields are : minute hour day month day_of_week (0=Sun)
0-59 0-23 1-31 1-12 0-6
e.g. run a script only on Tuesdays to Fridays, at 10:12 am, 3:12pm, 4:12pm and 5:12pm
12 10,15-17 * * 2-5/home/oracle/bin/script



du -show disk space usage
du -k -show disk usage in kB in all subdirectories below the current one
du -sk -show just the total of everything below the current dir
du -sk * -show individual totals for each file or directory in the current dir



find
find things you can’t remember the exact name of :
find /usr/lib -name "*socket*"
find big files (more than 20000 blocks, ie about 10MB )
find . -size +20000
find files or directories modified in last day
find . -mtime -1
find files not accessed (read) in 45 days
find /tmp -atime +45
Add -ls to the end of any of the above commands to see a full ls -l listing of the files found.

You can combine multiple options , e.g look for which big files have filled up a filesystem recently
find . -size +20000 -mtime -1 -ls
Or combine options using an "OR" syntax, e.g. find files which were modified either less than 1 week ago or more than 2 weeks ago
find . \( -mtime +14 -o -mtime -7 \) -ls
You can send the ouput of find to another command : the xargs command is ideal for this: e.g. interactively delete all core files under your $HOME
find ~ -type f -name core |xargs rm -i
or look for a particular word in all your .c files:
find . -name "*.c" |xargs grep -l libsocket



grep and its more flexible and faster cousins egrep and fgrep
Search for either of two strings in all log files:
egrep "error|PROBLEM" *log
case-insensitive search
fgrep -i error *log (will find Error, ERROR, etc.)
just see the filenames where the search text was found
grep -l error *log



sort
-n sorts by number instead of alphabetically
e.g. cd /export/home; du -sk * | sort -nr lists who is using most space in their home directory



tar
e.g. to copy a directory tree, preserving symlinks:
cd fromdir; tar cf - . | (cd todir; tar xpf -)



tr translate characters
convert lower-case to upper:
cat myfile | tr [a-z] [A-Z]
change colons to newlines:
tr : "\n" < myfile > newfile



who show who is currently logged on and where from



w show what people are doing


other useful Unix commands for you to check out:


cut, paste , split

diff, sdiff, cmp, dircmp

head, tail, tail -f

id, groups

4. vi commands
The basic vi commands:
i insert before current character a append after current char
I insert at beginning of line A append after end of line
x delete current character X backspace-delete (deletes char to left)
dd delete current line
22dd delete 22 lines u undo the last thing you did
p paste those 22 lines below the current line
12yy copy 12 lines into the ‘clipboard’ for later pasting
to get out of editing (insert/append) mode
:wq to save ('write') and quit (:q! to quit without writing)


vi moving-around Timesavers:


using h,j,k,l to move left,down,up and right is quicker than using the arrow keys (once you get used to it!). w move one word forward b move back a word e go to end of word
Ctl-F move Forward a whole page Ctl-B move Back a page
0 (zero) go to beginning of line $ go to end of line
:242 go to line 242 Ctl-G see what line you are on


vi modifying things:
cw change word 3cw change 3 words C change to end-of-line
dw delete word D delete to end-of-line

cc replace current line with what you type next
r replace one character R endless replace (like over-typing)
o open/add a new line below the current one O open new line above current one
xp swap two characters (e.g. when you make a typo)
/bob search forward for 'bob' n repeat previous search ? search backwards


Probably the handiest vi command:
. (dot) -repeat your last command


useful extra vi commands:
~ swap case of current character (capitalize or lower-case)
Ctl-L re-draw the screen (e.g when something from a background process writes to your screen and messes up your vi window)
:set nu show line numbers (:set nonu to remove line numbers)
:set list show hidden characters, line endings etc. (: set nolist)


Global replace:
:%s/old/new/g (% means all lines)
or :g/old/s//new/g
or :%s/old/new/gc (c is to confirm each replacement, type ‘y’ to accept)



5. Unix file permissions
You probably already know the basics:
Each user in Unix belongs to at least one group, each file or directory on the system belongs to one user and one group. When you do an ls -l on a file you see what permissions the file owner, group owner and everyone else (‘world’ or ‘others’) have on it
-rwxr-xr-- 1 robins devteam 180 Mar 8 13:50 instbb
so on the file instbb there is full access (rwx- read,write,execute) for the owner (robins), read and execute for the group devteam and read-only for everyone else.


What you may not know is that whether someone can delete that file is not determined by the file permissions, but by the permissions of the directory the file is in :
bash$ ls -al
total 598
drwxrwxr-x 3 robins devteam 512 Mar 8 12:02 .
drwxr-xr-x 24 root wheel 1024 Mar 8 12:02 ..
-rwxr-xr-- 1 robins devteam 180 Mar 8 13:50 instbb
In this case the directory (.) is group writeable, which means anyone in the group devteam can delete the file instbb. Although they can’t modify it, they could copy it to a new file in that directory, modify it, then delete the original and rename the new file as instbb. So the file isn’t as secure as it may appear..



6. Solaris Name services
Solaris provides a mechanism for getting hostnames and usernames etc from several sources (e.g DNS, NIS, or the traditional /etc/hosts file) : the file /etc/nsswitch.conf , which may contain
hosts: files dns
this means that when you try to access a remote host by name (e.g. ping neptune) it will look for neptune first in /etc/hosts, then do an lookup in DNS (nslookup using the server specified in /etc/resolv.conf)


Similarly for usernames, you may have
passwd: files nis
So when you run a command which refers to a username (e.g. cd ~oracle ) , it first looks in /etc/passwd then does a lookup in NIS (ypmatch oracle passwd).


However you can look up hosts and users without worrying about where they are stored, using the getent command :
bash$ getent passwd oracle
oracle:##oracle:3008:5001:Oracle DBA:/export/home/oracle:/usr/local/bin/bash
bash$ getent hosts www.inkq.com
192.168.245.12 www.inkq.com
bash$ getent hosts 10.0.0.91
10.0.0.91 plop.inkq.com plop mailhost

HAPPY LEARNING!