Saturday, June 9, 2018

How to do the backup on the ZDLRA without backup module ?

The documentation say we need to download the backup module from :

Backup module require java on database server. And the first question appeared when our client said: "we have no java on our IBM AIX". For this client we found a solution taking the java from ORACLE_HOME/OPatch. ORACLE_HOME has many javas (find /u01 -name java) and we proved in practice that java 8 from ORACLE_HOME well suite to install backup module.

The backup module ra_install.jar make 3 things:
- download fresh from internet and put it to $OH/lib
- make config file
- make wallet

As you may know the reside in $OH/lib from 12.1 version. So, if you have at least 12.1 then you don't need to copy If you'd like to take fresh copy you may download this file from Oracle and manually copy to $OH/lib. Look note 2219812.1 ZDLRA: Where to download new sbt library ( module)

The config file
you may use or may not use this file (i ommit it in my configuration).
Look how to use it in ALLOCATE CHANNEL clause:

Two syntax of ALLOCATE CHANNEL(two working examples). The first line contain config file, but 2nd line not. I highlighted differences in bold:

PARMS 'SBT_LIBRARY=/u01/app/oracle/product/, 

ENV=(RA_WALLET=LOCATION=file:/u01/app/oracle/product/ CREDENTIAL_ALIAS=z01ingest-scan:1521/zdlra:dedicated)

The wallet:
And finally we need to create the wallet. Example:

$ mkdir $ORACLE_HOME/dbs/zdlra  
$ mkstore -wrl /u01/app/oracle/product/12.2.0/dbhome_1/dbs/zdlra -create   
$ mkstore -wrl /u01/app/oracle/product/12.2.0/dbhome_1/dbs/zdlra -createCredential "zdlra" "fd" "welcome1"

zdlra - is connect descriptor in tnsnames.ora
fd - is owner of virtual catalog, created with racli
welcome1 - is password to virtual catalog

Check the credentials in the wallet:

$ mkstore -wrl /u01/app/oracle/product/12.2.0/dbhome_1/dbs/zdlra -listCredential
Oracle Secret Store Tool : Version

Enter wallet password: 
List credential (index: connect_string username)
1: zdlra fd

The screenshot how i did it:

Next step is to add some lines in sqlnet.ora to point to wallet:


And we're ready to backup our database to ZDLRA:

RUN  {
ALLOCATE CHANNEL ch01 DEVICE TYPE sbt_tape PARMS='SBT_LIBRARY=/u01/app/oracle/product/12.2.0/dbhome_1/lib/,
ENV=(RA_WALLET=LOCATION=file:/u01/app/oracle/product/12.2.0/dbhome_1/dbs/zdlra CREDENTIAL_ALIAS=zdlra)'
FORMAT '%I_%T_%p_%u_%c';
backup incremental level 1 database tag 'B_FD';
plus archivelog tag 'A_$OWNER' delete all input;

In order to do the backup on ZDLRA you have to create the wallet. This is the only obligatory step if your database is of version 12.1 or higher. You may to refresh $OH/lib/ but this is optional
If your database is of version 11.2 or lower, then you need to download and put the into $OH/lib directory.

No comments:

Post a Comment

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 assum...