Use rman to create a duplicate database on the some host
[
2010/03/23 16:35 | by askwan ]
2010/03/23 16:35 | by askwan ]
As we all known! it's a common task to create a duplicate database from the target production database as a DBA.this is an example that i have noted the processes to create a duplicate database step by step,and duplicate database from source database to another host is the same .
IP:192.168.0.21
DB: Oracle 10g R2 for linux 64bit
Source database instance name : dg1
ORACLE_BASE=/u01
ORACLE_HOME=/u01/oracle/product/10.2.0/db_1
Duplicate database instance name :dg2
step 1.backup the source database use rman :
IP:192.168.0.21
DB: Oracle 10g R2 for linux 64bit
Source database instance name : dg1
ORACLE_BASE=/u01
ORACLE_HOME=/u01/oracle/product/10.2.0/db_1
Duplicate database instance name :dg2
step 1.backup the source database use rman :
$ rman target /
RMAN> backup full database plus archivelog ;
Starting backup at 23-MAR-10
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=154 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=2 recid=1 stamp=714411579
input archive log thread=1 sequence=3 recid=2 stamp=714411579
input archive log thread=1 sequence=4 recid=3 stamp=714411668
input archive log thread=1 sequence=5 recid=4 stamp=714412284
channel ORA_DISK_1: starting piece 1 at 23-MAR-10
channel ORA_DISK_1: finished piece 1 at 23-MAR-10
piece handle=/u01/oracle/product/10.2.0/db_1/dbs/01l9a47t_1_1 tag=TAG20100323T155125 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 23-MAR-10
Starting backup at 23-MAR-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/oracle/oradata/dg1/system01.dbf
input datafile fno=00003 name=/u01/oracle/oradata/dg1/sysaux01.dbf
input datafile fno=00005 name=/u01/oracle/oradata/dg1/example01.dbf
input datafile fno=00002 name=/u01/oracle/oradata/dg1/undotbs01.dbf
input datafile fno=00004 name=/u01/oracle/oradata/dg1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAR-10
channel ORA_DISK_1: finished piece 1 at 23-MAR-10
piece handle=/u01/oracle/product/10.2.0/db_1/dbs/02l9a486_1_1 tag=TAG20100323T155134 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 23-MAR-10
channel ORA_DISK_1: finished piece 1 at 23-MAR-10
piece handle=/u01/oracle/product/10.2.0/db_1/dbs/03l9a49u_1_1 tag=TAG20100323T155134 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 23-MAR-10
Starting backup at 23-MAR-10
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=6 recid=5 stamp=714412353
channel ORA_DISK_1: starting piece 1 at 23-MAR-10
channel ORA_DISK_1: finished piece 1 at 23-MAR-10
piece handle=/u01/oracle/product/10.2.0/db_1/dbs/04l9a4a1_1_1 tag=TAG20100323T155233 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 23-MAR-10
RMAN> backup full database plus archivelog ;
Starting backup at 23-MAR-10
current log archived
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=154 devtype=DISK
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=2 recid=1 stamp=714411579
input archive log thread=1 sequence=3 recid=2 stamp=714411579
input archive log thread=1 sequence=4 recid=3 stamp=714411668
input archive log thread=1 sequence=5 recid=4 stamp=714412284
channel ORA_DISK_1: starting piece 1 at 23-MAR-10
channel ORA_DISK_1: finished piece 1 at 23-MAR-10
piece handle=/u01/oracle/product/10.2.0/db_1/dbs/01l9a47t_1_1 tag=TAG20100323T155125 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 23-MAR-10
Starting backup at 23-MAR-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/oracle/oradata/dg1/system01.dbf
input datafile fno=00003 name=/u01/oracle/oradata/dg1/sysaux01.dbf
input datafile fno=00005 name=/u01/oracle/oradata/dg1/example01.dbf
input datafile fno=00002 name=/u01/oracle/oradata/dg1/undotbs01.dbf
input datafile fno=00004 name=/u01/oracle/oradata/dg1/users01.dbf
channel ORA_DISK_1: starting piece 1 at 23-MAR-10
channel ORA_DISK_1: finished piece 1 at 23-MAR-10
piece handle=/u01/oracle/product/10.2.0/db_1/dbs/02l9a486_1_1 tag=TAG20100323T155134 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 23-MAR-10
channel ORA_DISK_1: finished piece 1 at 23-MAR-10
piece handle=/u01/oracle/product/10.2.0/db_1/dbs/03l9a49u_1_1 tag=TAG20100323T155134 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 23-MAR-10
Starting backup at 23-MAR-10
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=6 recid=5 stamp=714412353
channel ORA_DISK_1: starting piece 1 at 23-MAR-10
channel ORA_DISK_1: finished piece 1 at 23-MAR-10
piece handle=/u01/oracle/product/10.2.0/db_1/dbs/04l9a4a1_1_1 tag=TAG20100323T155233 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 23-MAR-10
"ORA-12528"
[
2010/03/22 16:32 | by askwan ]
2010/03/22 16:32 | by askwan ]
today,i create a duplicate database from a source databse
when connect to instance test,
read metalink 419440.1,found that from all oracle 9i to oracle 11g have this problem !
what cause of this problem is, although instance starts, but did not register to the listener.
Instance through the PMON process to listen on the register, while the PMON process requires
the instance start in the MOUNT status!
then editor $ORACLE_HOME/network/admin/listener.ora
add :
then restart listener,and then
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 22-MAR-2010 16:23:38
…………
Instance "test1", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
…………
Instance "test1", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
when connect to instance test,
"ORA-12528: TNS:listener: all appropriate instances are blocking new connections"
read metalink 419440.1,found that from all oracle 9i to oracle 11g have this problem !
what cause of this problem is, although instance starts, but did not register to the listener.
Instance through the PMON process to listen on the register, while the PMON process requires
the instance start in the MOUNT status!
then editor $ORACLE_HOME/network/admin/listener.ora
add :
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_NAME = test1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = test1)
)
)
(SID_LIST =
(SID_DESC =
(GLOBAL_NAME = test1)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME = test1)
)
)
then restart listener,and then
Instance "test1", status UNKNOWN, has 1 handler(s) for this service...l
Streaming Replication in postgresql 9.0
[
2010/03/18 14:46 | by askwan ]
2010/03/18 14:46 | by askwan ]
Streaming Replication (SR) is an important new feature in postgresql 9.0 ,it can provides the capability to continuously ship and apply the WAL XLOG records to some number of standby servers in order to keep them current.
and,this new feature has included in PostgreSQL 9.0 Alpha4.
now, i write this article to test and experience this new feature !
env:
OS version: debian lenny 5.0 x86_64
Postgresql version : 9.0 alpha4
IP: 192.168.0.156
my planning is below
Master:
====================================
installded : /usr/local/pgsql_master
DATA=/usr/local/pgsql_master/data
port:5432
Archive_dest:/usr/local/pgsql_master/data/archive_master
Standby:
=====================================
installded : /usr/local/pgsql_standby
DATA=/usr/local/pgsql_standby/data
port:5433
Archive_dest:/usr/local/pgsql_standby/data/archive_standby
step 1 : download PostgreSQL 9.0 Alpha4 and install postgresql for both master and standby
and,this new feature has included in PostgreSQL 9.0 Alpha4.
now, i write this article to test and experience this new feature !
env:
OS version: debian lenny 5.0 x86_64
Postgresql version : 9.0 alpha4
IP: 192.168.0.156
my planning is below
Master:
====================================
installded : /usr/local/pgsql_master
DATA=/usr/local/pgsql_master/data
port:5432
Archive_dest:/usr/local/pgsql_master/data/archive_master
Standby:
=====================================
installded : /usr/local/pgsql_standby
DATA=/usr/local/pgsql_standby/data
port:5433
Archive_dest:/usr/local/pgsql_standby/data/archive_standby
step 1 : download PostgreSQL 9.0 Alpha4 and install postgresql for both master and standby
Oracle Block Change Tracking
[
2010/03/16 17:27 | by askwan ]
2010/03/16 17:27 | by askwan ]
Oracle Block Change Tracking is a new feature in oracle 10g ,it can improve RMAN incremental backup proformance by recording changed blocks in each datafile use a change tracking file.If change tracking is enabled, RMAN uses the change tracking file to identify changed blocks for incremental backup, thus avoiding the need to scan every block in the datafile.
Identify current database enable block change tracking feature or not:
Enabling and Disabling Change Tracking:
Identify current database enable block change tracking feature or not:
SQL> select filename,status,bytes from v$block_change_tracking;
FILENAME
--------------------------------------------------------------------------------
STATUS BYTES
---------- ----------
DISABLED
FILENAME
--------------------------------------------------------------------------------
STATUS BYTES
---------- ----------
DISABLED
Enabling and Disabling Change Tracking:
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
*
ERROR at line 1:
ORA-19773: must specify change tracking file name
ENABLE BCT:
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
2 USING FILE '/opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f' REUSE;
Database altered.
SQL> select filename,status,bytes from v$block_change_tracking;
FILENAME
--------------------------------------------------------------------------------
STATUS BYTES
---------- ----------
/opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f
ENABLED 11599872
ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
*
ERROR at line 1:
ORA-19773: must specify change tracking file name
ENABLE BCT:
SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING
2 USING FILE '/opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f' REUSE;
Database altered.
SQL> select filename,status,bytes from v$block_change_tracking;
FILENAME
--------------------------------------------------------------------------------
STATUS BYTES
---------- ----------
/opt/oracle/oracle/flash_recovery_area/CAPITALV/rman_change_track.f
ENABLED 11599872





