Wednesday, April 17, 2019

How to measure network throughput with RMAN ?

Implementing the ZDLRA into customer's environment we often need to measure network throughput. The easy way is to use RMAN. 

I assume you prepared customer database to work with ZDLRA (created wallet, installed libra.so ) and you can backup this database or its datafiles to ZDLRA without errors.
But if the backup run slow, then you need to test network between protected database and ZDLRA.

This step is to prepare the nettest.rman file:

$ cat nettest.rman
# rman target / |tee /home/oracle/rman_log/nettest_`date +%d%H%M`.log
RUN  {
ALLOCATE CHANNEL ch01 DEVICE TYPE sbt_tape PARMS 'SBT_LIBRARY=/home/oracle/zdlra/libra.so,ENV=(RA_WALLET=LOCATION=file:/home/oracle/zdlra/ CREDENTIAL_ALIAS=zdlra_ib)' FORMAT '%I_%T_%p_%u_%c';

SEND CHANNEL ch01 'NETTEST BACKUP 1024M';


Then connect to target database and run this script:

$ rman target / |tee /home/oracle/rman_log/nettest_`date +%d%H%M`.log
Recovery Manager: Release 12.2.0.1.0 - Production on Wed Apr 17 09:46:02 2019
Copyright (c) 1982, 2017, Oracle and/or its affiliates.  All rights reserved.
connected to target database: BR (DBID=1302487780)

RMAN> @nettest.rman

RMAN> # rman target / |tee /home/oracle/rman_log/nettest_`date +%d%H%M`.log
2> RUN  {
3> ALLOCATE CHANNEL ch01 DEVICE TYPE sbt_tape PARMS 'SBT_LIBRARY=/home/oracle/zdlra/libra.so,ENV=(RA_WALLET=LOCATION=file:/home/oracle/zdlra/ CREDENTIAL_ALIAS=zdlra_ib)' FORMAT '%I_%T_%p_%u_%c';
4> SEND CHANNEL ch01 'NETTEST BACKUP 1024M';
5> }

using target database control file instead of recovery catalog
allocated channel: ch01
channel ch01: SID=1460 instance=br1 device type=SBT_TAPE
channel ch01: RA Library (ZDLRA) SID=86B53DD7A23715B3E053E20F1FAC745F

RMAN-06918: warning: allocated SBT channel to the Recovery Appliance in NOCATALOG mode

released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of send command at 04/17/2019 09:46:17
ORA-19559: error sending device command: NETTEST BACKUP 1024M
ORA-19557: device error, device type: SBT_TAPE, device name:
ORA-27194: skgfdvcmd: sbtcommand returned error
ORA-19511: non RMAN, but media manager or vendor specific failure, error text:
   KBHS-00402: NETTEST sucessfully completed
KBHS-00400: NETTEST BACKUP: 1073741824 bytes sent in 4033428 microseconds

RMAN>
RMAN> **end-of-file**

RMAN>

Recovery Manager complete.



Don't pay attention to the errors, they doesn't matter.
Look the numbers in the line
NETTEST BACKUP: 1073741824 bytes sent in 4033428 microseconds

RMAN transferred 1g during about 4 seconds via my network .

The same way you can test the restore operation:
Syntax: NETTEST {[BACKUP | RESTORE]} [<size>M];


RMAN> @nettest.rman

RMAN> # rman target / |tee /home/oracle/rman_log/nettest_`date +%d%H%M`.log
2> RUN  {
3> ALLOCATE CHANNEL ch01 DEVICE TYPE sbt_tape PARMS 'SBT_LIBRARY=/home/oracle/zdlra/libra.so,ENV=(RA_WALLET=LOCATION=file:/home/oracle/zdlra/ CREDENTIAL_ALIAS=zdlra_ib)' FORMAT '%I_%T_%p_%u_%c';
4>
5> #SEND CHANNEL ch01 'NETTEST BACKUP 1024M';
6> SEND CHANNEL ch01 'NETTEST RESTORE 1024M';
7> }
using target database control file instead of recovery catalog
allocated channel: ch01
channel ch01: SID=127 instance=br1 device type=SBT_TAPE
channel ch01: RA Library (ZDLRA) SID=86B5F9BE6256D7B5E053E20F1FACB9D2
RMAN-06918: warning: allocated SBT channel to the Recovery Appliance in NOCATALOG mode

released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of send command at 04/17/2019 10:38:47
ORA-19559: error sending device command: NETTEST RESTORE 1024M
ORA-19557: device error, device type: SBT_TAPE, device name:
ORA-27194: skgfdvcmd: sbtcommand returned error
ORA-19511: non RMAN, but media manager or vendor specific failure, error text:
   KBHS-00402: NETTEST sucessfully completed
KBHS-00401: NETTEST RESTORE: 1073741824 bytes received in 813152 microseconds



Source:
How to measure network performance from RMAN for ZDLRA or Cloud Backups (Doc ID 2371860.1)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

How to disable/setup autostart parameters for specified instance ?

Q: We have a 4-node RAC. I need to disable autostart of the DB on one node only.    How to do it and how to see autostart parameters, confir...