The ASM ora-04031 error, better known as: Adding more disks to an ASM Instance than there is memory..

To accommodate a change of strategy  I needed to add an additional 20 disks to the current ASM instance I had running..This needed to be done in the shortest time possible, and when the Storage and Linux Admin where done, I could start and create the ASM Disks and diskgroups. Labeling the disks with

# oracleasm createdisk DATA099 /dev/lun99

went fine for all the LUNs, however when I wanted to created the disk groups in ASM, I was suddenly greeted by an

ORA-04031: unable to allocate 32 bytes of shared memory ("shared pool", .... )

message..and there was no more possibility to add another disk group. This made sense, when checking the SGA of the running instance:

$ sqlplus / as sysasm
sql> show parameters sga
< output here>

Fortunately: the current disks/disk groups kept running despite the out of memory of the ASM. I’m not sure if this was by design, but I at least was happy it kept humming along, especially since this ASM instance hosts all the DEV/TST environments and they needed to keep running until we had a convenient time to shut all the databases neatly down.

There are at least two solutions to this issue:

A) Allocate more memory to the ASM instance with a shutdown.

B) Prevent this issue from happening in the first place by enlarging the memory before adding disks.

In my case I’m using AMM in conjunction with /dev/shm and not ASMM with HugePages. Make sure the /dev/shm can accommodate the new setting you plan to use, otherwise the instance won’t start at the next boot/restart of the instance!

Posted in ASM, Databases, Technical Stuff | Tagged , , | Leave a comment

When Adding A Node To RAC fails..Or.. “Try It Again, Sammy!”

Normally when adding a new node to a RAC Cluster is fairly simple, provided one keeps the OS the same, and specifically the Linux kernel EXACTLY the same..But as always, it’s different in the real world where reality is creating havoc..

So, as it happened in our case: the addNode failed..to be more specific: it failed multiple times on various points.

This is our story… (ok, watched to many episodes of Law&Order)..

The first issue was: the voting disk was not found..

Error:
[ CSSD][1686370048]clssnmvDiskVerify: discovered a potential voting file
[ CSSD][2286941952]clssnmvDiskVerify: TOC format mismatch expected(0x634c7373 0x546f636b), found(0x0000 0x0000)

ASM was able to find the disks, however not able to determine the voting disk. Strange issue, but after some searching it had to do with the newer kmod-oracleasm (kmod-oracleasm-2.0.8-13.el6_8.x86_64) we had installed, where we had a lower version on the other nodes. For details that lead to the solution: Doc ID 1994371.1

In short: add to the oracleasm config file (/etc/sysconfig/oracleasm) the following:

ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true 

(in the Doc ID it states to set this to ‘false’ but this was not logically for us..)

The above solved the  issue with the voting disk.

The second issue we ran into was: ASM instance refused to start..

Error:
GIMH: GIM-00104: Health check failed to connect to instance.
GIM-00090: OS-dependent operation:open failed with status: 2
GIM-00091: OS failure message: No such file or directory
GIM-00092: OS failure occurred at: sskgmsmr_7

When running the root.sh multiple times due to troubleshooting the first error, the file hc_* in $GRID_HOME/dbs/hc was created, but due to the voting disk error, never completed correctly.

Removing this file, and cleaning the whole oracle home of traces of this DB solved the issue, and enabled us to re-run the root.sh installation step to succes.

Posted in ASM, Databases, RAC | Tagged , | Leave a comment

Clone Database From NetBackup…Or..”Where Is The Tape, Watson?”

When cloning a live database, this has it’s impact on the live database..open door, I know, but still, it’s a fact. This is not always what we want, since the users can have a lot of issues and even on a test database, deadlines seem to apply.

To remedy this issue, and get the most out of our investment, we decided to clone a database (CLONE! not restore, this is another post on this blog!) from the latest backup we’ve had from the source database. Since we have it, why not using it?

The main reason? Speed. The source database was not loaded in any way at all, and the Netbackup infrastructure is basically not used during business hours, since the backups take place at night. When I try to sleep, or play with the XBox One..;-)

To get started, what do we need?

  • Empty storage to hold the cloned database.
  • The location of the database backup (backup server and backup client names).
  • Enough permissions to read the backup.
  • This blog.😉

First: check if the backup actually succeeded. Yes, you can asume, but this really is an issue when you have to restore and find out the version you need is not really accessible.

If there is some information that seems to “just be there”, like where is the control file listing coming from in this post, please search the blog, basically all key information is documented on this blog. Or just send me a message, and I’ll clarify and update this post.

Let’s roll!

Open a terminal on the server where the clone needs to be located. There we need to determine the backup we want to use for the clone:

$ /usr/openv/netbackup/bin/bplist -S backup_Server -C backup_client -t 4 -l -R  -I -keyword "*DUMMY*" /

This provides us with the following list:

-rw-rw---- oracle    dba          30932992 Nov 02 02:08 /c-377112624-20161102-02
-rw-rw---- oracle    dba          30932992 Nov 02 02:07 /ctrl_dDUMMY_uvprjsa2u_s3065_p1_t926820446
-rw-rw---- oracle    dba          30932992 Nov 02 02:06 /c-377112624-20161102-01
-rw-rw---- oracle    dba         736886784 Nov 02 02:05 /arch_dDUMMY_uvnrjs9uj_s3063_p1_t926820307
-rw-rw---- oracle    dba          30932992 Nov 02 02:04 /c-377112624-20161102-00
-rw-rw---- oracle    dba         281542656 Nov 02 00:35 /bk_dDUMMY_uvlrjs4n1_s3061_p1_t926814945
-rw-rw---- oracle    dba         327942144 Nov 01 23:00 /bk_dDUMMY_uvkrjrv4v_s3060_p1_t926809247
-rw-rw---- oracle    dba          30932992 Nov 01 02:08 /c-377112624-20161101-02
-rw-rw---- oracle    dba          30932992 Nov 01 02:07 /ctrl_dDUMMY_uvirjplmk_s3058_p1_t926734036
-rw-rw---- oracle    dba          30932992 Nov 01 02:06 /c-377112624-20161101-01
-rw-rw---- oracle    dba         756023296 Nov 01 02:04 /arch_dDUMMY_uvgrjplhv_s3056_p1_t926733887
-rw-rw---- oracle    dba          30932992 Nov 01 02:03 /c-377112624-20161101-00
-rw-rw---- oracle    dba         280494080 Nov 01 00:39 /bk_dDUMMY_uverjpgio_s3054_p1_t926728792
-rw-rw---- oracle    dba         325320704 Oct 31 23:00 /bk_dDUMMY_uvdrjpaot_s3053_p1_t926722845

Optionally the SPFILE can be restored and altered to be used by the clone as a startup, but since I maintain a standard template, it’s just as easy in our situation to create the pfile by hand. Saves a restore run. But use the step below if you want to restore the SPFILE also:

We want to use the latest backup, so select the following backupfile to restore:

/c-377112624-20161102-02

Create a connection to the netbackup server and restore the spfile.

RMAN> run {
allocate channel t1 type 'SBT_TAPE' parms 'ENV=(NB_ORA_CLIENT=client),SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
send 'NB_ORA_SERV=server,NB_ORA_CLIENT=client';
restore spfile to '/tmp/spfile' from '/c-377112624-20161102-02';
release channel t1;
}

Copy the file over to the correct location, start an instance with this, create pfile, alter settings, create new spfile, start a new instance with this spfile..etc..You know the drill…

NOTE: Before we can restore the spfile, make sure the clone instance is available in NOMOUNT state! Otherwise RMAN cannot do much to help us..

NOTE: derived from some documentation, it might not hurt to set the following environment setting before starting RMAN:

$ export NB_ORA_CLIENT=client

In order to do the clone, we need to connect to the live database, however the data will be retrieved from the backup.

As such we need to connect RMAN like this:

$ rlwrap rman target sys/secret@exp04 auxiliary sys/secret@exp05

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Nov 2 12:22:20 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: EXP04 (DBID=344562624)
connected to auxiliary database: EXP05 (not mounted)

RMAN> run {
allocate channel t1 type 'SBT_TAPE' parms 'ENV=(NB_ORA_CLIENT=client),SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
allocate auxiliary channel stby01 type disk;
allocate auxiliary channel chan01 type 'SBT_TAPE' parms 'ENV=(NB_ORA_CLIENT=client),SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';

send 'NB_ORA_SERV=server,NB_ORA_CLIENT=client';
SET NEWNAME FOR DATABASE TO '+DATA5DG';
DUPLICATE DATABASE TO exp05
NOFILENAMECHECK;
}

sent command to channel: stby01
sent command to channel: chan01

executing command: SET NEWNAME

Starting Duplicate Db at 02-NOV-16

contents of Memory Script:
{
sql clone "alter system set  control_files =
''+DATA5DG/EXP05/controlfile/current.258.926857701'', ''+FRA5DG/EXP05/controlfile/current.257.926857701'' comment=
''Set by RMAN'' scope=spfile";
sql clone "alter system set  db_name =
''EXP04'' comment=
''Modified by RMAN duplicate'' scope=spfile";
sql clone "alter system set  db_unique_name =
''EXP05'' comment=
''Modified by RMAN duplicate'' scope=spfile";
shutdown clone immediate;
startup clone force nomount
restore clone primary controlfile;
alter clone database mount;
}
executing Memory Script

sql statement: alter system set  control_files =   ''+DATA5DG/EXP05/controlfile/current.258.926857701'', ''+FRACCDM5DG/EXP05/controlfile/current.257.926857701'' comment= ''Set by RMAN'' scope=spfile

sql statement: alter system set  db_name =  ''EXP04'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''EXP05'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area   12827369472 bytes

Fixed Size                     2265224 bytes
Variable Size               3925872504 bytes
Database Buffers            8858370048 bytes
Redo Buffers                  40861696 bytes
allocated channel: stby01
channel stby01: SID=926 device type=DISK
allocated channel: chan01
channel chan01: SID=992 device type=SBT_TAPE
channel chan01: Veritas NetBackup for Oracle - Release 7.6 (2013111313)

Starting restore at 02-NOV-16

channel chan01: starting datafile backup set restore
channel chan01: restoring control file
channel chan01: reading from backup piece c-377112624-20161102-02
} channel chan01: piece handle=c-377112624-20161102-02 tag=TAG20161102T020823
channel chan01: restored backup piece 1
channel chan01: restore complete, elapsed time: 00:01:05
output file name=+DATA5DG/EXP05/controlfile/current.258.926857701
output file name=+FRA5DG/EXP05/controlfile/current.257.926857701
Finished restore at 02-NOV-16

database mounted

contents of Memory Script:
{
set until scn  6402052692;
set newname for datafile  1 to
"+DATA5DG";
set newname for datafile  2 to


executing command: SET NEWNAME
Starting restore at 02-NOV-16

channel chan01: starting datafile backup set restore
channel chan01: specifying datafile(s) to restore from backup set
channel chan01: restoring datafile 00002 to +DATA05DG
channel chan01: reading from backup piece bk_dEXP04_usjrjha6t_s2963_p1_t926460125
...

As is visible above: the controlfile is restored from tape, and the rest of the restore also gets the data from the backup lib, NOT from the live database, although we do have a connection to this.

After the data reading from tape is done, the output should look like the following:

...
datafile 77 switched to datafile copy
input datafile copy RECID=76 STAMP=926872015 file name=+DATA5DG/EXP05/datafile/za_indx.314.926870347
datafile 78 switched to datafile copy
input datafile copy RECID=77 STAMP=926872015 file name=+DATA5DG/EXP05/datafile/es_indx.315.926870413

Reenabling controlfile options for auxiliary database
Executing: alter database force logging

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

database opened
Finished Duplicate Db at 02-NOV-16
released channel: t1
released channel: stby01
released channel: chan01

RMAN>

And that’s it! When the process is complete, and has no errors (most will be related with running out of storage space, so check this first).

Note: This is a very careful approach, but it’s up to the DBA to allocate a lot more channels to speed up this process. I normally hit the four channels and complete the process a lot quicker than with just one..

Posted in ASM, backup, Databases, Technical Stuff | Tagged , , | Leave a comment

Alerting on Illegal Login..Or..”Catch Me If You Can”..

We had the requirement to generate an alert whenever a user was logging into the database while bypassing the application server. Although a lot of discussion is out there of using triggers or not, I opted for a trigger due to the advantages it gives me.

This trigger does not kick the user out, but does logs him/her and raises an alert.

Prereqs are to create a table to hold the ‘audit’ info, located anywhere but in the SYSTEM tablespace, and setting the permissions to have a user insert it’s information.

SQL> create table audit.login_program_info (LOGON_TIME date, USERNAME VARCHAR2(200),PROGRAM VARCHAR2(500),MACHINE VARCHAR2(500));
SQL> grant insert on audit.login_program_info to public;

Now we only want to have the illegal login, but not the monitoring and maintenance logins (there is another audit method for these, provided by Oracle).

The trigger code:

create or replace TRIGGER login_trigger
AFTER LOGON ON DATABASE

DECLARE
PRAGMA AUTONOMOUS_TRANSACTION;
loginDate date;
userAccount varchar2(200);
programma varchar2(200);
hostName varchar2(200);

BEGIN

select sysdate, username,program,machine into loginDate, userAccount,programma,hostName from v$session WHERE AUDSID = Sys_Context('USERENV', 'SESSIONID');

INSERT INTO audit.login_program_info values ( loginDate, userAccount,programma,hostName);
COMMIT;

if ( userAccount not in ('SYS','SYSTEM','DBSNMP') ) and (instr(upper(programma),'SOCKET') = 0)
then
begin
  EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = ''mail.server.com''';
  UTL_MAIL.send(sender => 'oracle@'||sys_context('USERENV','DB_NAME')||'.server.com',
  recipients => 'admin@server.com',
  subject => 'Illegal Login Alert',
  message => 'The user '||userAccount|| ' is logged into the db ' ||sys_context('USERENV','DB_NAME')|| ' at ' ||to_Char(loginDate,'DD-MON-YYYY HH24:MI:SS')|| ' from '|| hostName ||' with program:'||programma,
  priority => 1,
  mime_type => 'text; charset=us-ascii');
 end;
end if;
END;

Note: don’t forget to clean out the table, over time it will fill up..😉

This is just a basic mechanism to handle this, but easy to build out upon..

 

Posted in Databases | Tagged , , | Leave a comment

Oracle OEM 13c Metric Collection Error..Or..”Show Me The Graphs!”

When implementing the OEM 13C version, we have a server where we house about 16 databases. Adding the first bunch of the databases went like a breeze, but when all was said and done, we had 3 databases which didn’t want to be monitored..Removing, adding again, all to no avail..

Long story short:

The error message:

Message=Metric evaluation error start – Received an exception when evaluating sev_eval_proc for:Target name = [DBNAME]_SYS, metric_name = Response, metric_column = Status; Error msg = Target encountered metric erros; at least one member in in metric error.

(Yes, there are typos in the error message..for once, their not mine😉 )

Selection_001

It is not the agent, it is not the (shared) oracle home…it’s the specific database self:

In 13c cloud control, database target status shows metric collection error as below:
“Dynamic Category property error, Get dynamic property error, No such metadata, Computation of a critical dynamic property failed. Retries Completed”

Computing dynamic properties of the target fails with below error:

<AGENT_INST_HOME>/bin>./emctl reload agent dynamicproperties DBNAME:oracle_database
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD reload error:Target oracle_database.orcl is broken: 
Target {oracle_database.orcl} is broken: Dynamic Category property error,
Get dynamic property error,No such metadata - No valid queryDescriptor 
or executionDescriptor found for target [oracle_database.orcl$57] is 
broken: Dynamic Category property error,Get dynamic property error,
 No such metadata - No valid queryDescriptor or executionDescriptor 
found for target [oracle_database.DBNAME$66]

*Note: the dbname is Case Sensitive!

The dynamic properties are these:

There is no bundle_series column in dba_registry_history table for the problematic database as below:

SQL> desc dba_registry_history

Name Null? Type
----------------------------------------- -------- ----------------------------
ACTION_TIME TIMESTAMP(6)
ACTION VARCHAR2(30)
NAMESPACE VARCHAR2(30)
VERSION VARCHAR2(30)
ID NUMBER
COMMENTS VARCHAR2(255)

How to fix?

Fairly easy: just execute catbundle.sql on problematic database to ensure that bundle_series column exists in dba_registry_history table.

Example:

Log in as sys on the database.

SQL*Plus: Release 11.2.0.4.0 Production on Mon May 9 12:32:26 2016
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> @?/rdbms/admin/catbundle.sql
Enter value for 1: cpu
Enter value for 2: apply

PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.

....<snip>....

SQL> COMMIT;

Commit complete.

SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/oracle/11.2.0.4/base/cfgtoollogs/catbundle/catbundle_CPU_DBNAME_APPLY_2016May09_12_32_44.log

SQL>

Or just check the dba_registry_history table again:

SQL> desc dba_registry_history
Name Null? Type
---------------------------------------------------------------------------
ACTION_TIME TIMESTAMP(6)
ACTION VARCHAR2(30)
NAMESPACE VARCHAR2(30)
VERSION VARCHAR2(30)
ID NUMBER
BUNDLE_SERIES VARCHAR2(30)
COMMENTS VARCHAR2(255)

Tadaa!!

Re-run the metric collection again:

$ ./emctl reload agent dynamicproperties DBNAME:oracle_database
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
EMD recompute dynprops completed successfully

Refresh the overview page in OEM, and all should be green..

 

 

Posted in Databases, Technical Stuff | Tagged , , | 4 Comments

Integrate OEM 13c With MS Active Directory..Or..”One Account To Rule Them All…”

There are some instructions on the internet floating around in order to integrate the OEM 13c (or basically Weblogic 12c) and OEM 13c with Microsoft Active Directory/LDAP.

However in our case things went not as smoothly as advertised (Duh!). We have two OEM installations (OEM 12c and OEM 13c) in our company, but using the same AD. One would expect to just copying the settings from the working installation (OEM 12c) to the new OEM (13c) and everything would be peachy..Alas…This was not so much what was happening on our site.

With the aid of Oracle Support (credit where credit is due!) we (they) where able to solve this issue..

Both for future reference and documentation I’m sharing the settings we needed to set to make the stack play together nicely..

I’m not going to re-write the excellent instructions provided by oracle with the video located here: Oracle AD instructions

When following the above instruction don’t work, continue with my experiences as a last resort before contacting Oracle Support..

Start with the basics and open the WebLogic Console in the browser:

Selection_013Log in, and navigate to the page indicated by the green bars:

Selection_014

The key is in the configuration parameters used (once again: duh!). Below are the settings which worked for our site:

 *note* anything NOT mentioned should be either default, or the same as in the tutorial video from oracle

Host:  <Domain Controller without domain name e.g. DC01 instead of DC01.domain.com >
Port:  389
Principal:  CN=XXXX,OU=Service Accounts,DC=company,DC=com
User Base DN:  DC=company,DC=com
All Users Filter:  <cleared/empty>
User From Name Filter: (&(sAMAccountName=%u)(objectclass=person))
User Name Attribute=sAMAccountName
 
Group Base DN:  OU=OEM,OU=Groups,OU=Global Accounts,OU=Company_Locations,DC=company,DC=com
All Groups Filter: <cleared/empty>
Group From Name Filter: (&(cn=%g)(objectclass=group))
Group Membership Searching= <select> limited
Max Group Membership Search Level=3
Static Group DNs from Member DN Filter=(&(member=%M)(objectclass=group))
Save

restart OEM with:
./emctl stop oms -all -force
./emctl start oms
This is what did it for us, hope it helps.

If not in your case…revert to Oracle Support or Google some more😉

Posted in Oracle Enterprise Manager, Technical Stuff | Tagged , | Leave a comment

Configure NetBackup For Oracle RAC..Or..”Back Me Up!”

When configuring Netbackup to backup a RAC database, we ran into the following error:

1/29/2016 3:28:02 PM - Info bphdb(pid=2717) INF - Database status is: SHUTDOWN
1/29/2016 3:28:02 PM - Info bphdb(pid=2717) INF - Database open mode is: NOT MOUNTED
1/29/2016 3:28:02 PM - Info bphdb(pid=2717) INF - ARCHIVE LOG mode is: UNKNOWN
1/29/2016 3:28:12 PM - Error bpbrm(pid=13636) from client <servername>: ERR - Script exited with status = -5407 <Database is in the wrong state (must be OPEN) for the requested action>
1/29/2016 3:28:12 PM - Error bpbrm(pid=13636) from client <servername>: ERR - bphdb exit status = 5407: Database is in the wrong state (must be OPEN) for the requested action
1/29/2016 3:28:14 PM - Info bphdb(pid=2717) done. status: 5407: Database is in the wrong state (must be OPEN) for the requested action
1/29/2016 3:28:14 PM - end writing
Database is in the wrong state (must be OPEN) for the requested action(5407)

In Netbackup the node was automagically picked up by the Netbackup client, which reads the /etc/oratab. In the oratab this database was known by it’s SCAN name. However when trying to connect, the connection to the node is random due to the nature of RAC. When the backup starts, the check is failing, resulting in a somewhat wrong error message of the client.

Now the question is: how to fix this?

Delete all the references in Netbackup of this database (to avoid confusion, since the listing of the /etc/oratab will be propagated again by the client to the server in due time).

Make sure the node/instance name is NOT in the /etc/oratab.

+ASM:/oracle/11.2.0.4/grid:N # line added by Agent
dummydb0:/oracle/11.2.0.4/base/db/dbhome_1:N # line added by Agent

In this case: the instance is dummydb01, the SCAN name is dummydb0.

In Netbackup:

sshot01.png

Add the instance MANUALLY by providing the information above. Make sure to provide the credentials.

sshot02.png

sshot03.png

On the oracle database server:

Make sure the added INSTANCE is reachable by adding this to the listener.ora.

$ vi listener.ora

SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=dummy01)
(SID_NAME=dummydb01)
(ORACLE_HOME=/oracle/11.2.0.4/base/db/dbhome_1)
)
)

$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 29-FEB-2016 12:11:38

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 12-OCT-2015 02:51:52
Uptime 140 days 10 hr. 19 min. 45 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/11.2.0.4/grid/network/admin/listener.ora
Listener Log File /oracle/base/diag/tnslsnr/<servername>/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xx.xx.xx)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM", status READY, has 1 handler(s) for this service...
Instance "dummydb01", status READY, has 1 handler(s) for this service...
The command completed successfully

Configure the RMAN settings:

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name DUMMYDB0 are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%F';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE 'SBT_TAPE' TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE';

Make sure the settings in bold are set.

The PARALLELISM is set to 1, further testing should show if the backups are faster by a higher number. For now we just want to get this proces to work.

For testing purposes, create a manual backup in netbackup. When this is finished, this backup is visible in RMAN:

RMAN> list backup summary;
<..>
6545 B 0 A SBT_TAPE 29-FEB-16 1 1 NO TAG20160229T115522
6546 B F A SBT_TAPE 29-FEB-16 1 1 NO TAG20160229T141956
6547 B A A SBT_TAPE 29-FEB-16 1 1 NO TAG20160229T142121
6548 B F A SBT_TAPE 29-FEB-16 1 1 NO TAG20160229T142157
6549 B F A SBT_TAPE 29-FEB-16 1 1 NO TAG20160229T142314
6550 B F A SBT_TAPE 29-FEB-16 1 1 NO TAG20160229T142351

RMAN>

Validate the backup (from the “tape”):

RMAN> run {
allocate channel t1 type 'SBT_TAPE' parms 'ENV=(NB_ORA_CLIENT=<nodeName),SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64';
send 'NB_ORA_SERV=<netbackup_server>,NB_ORA_CLIENT=<nodeName>';
restore database validate;
release channel t1;
}

using target database control file instead of recovery catalog
allocated channel: t1
channel t1: SID=606 instance=dummbydb01 device type=SBT_TAPE
channel t1: Veritas NetBackup for Oracle - Release 7.6 (2013111313)

sent command to channel: t1

Starting restore at 29-FEB-16

channel t1: starting validation of datafile backup set
channel t1: reading from backup piece bk_dDUMMYDB01_u9sqv4u1b_s8508_p1_t905082923

For more information about restoring, see the other post on my blog!

Posted in Databases | Tagged , , | Leave a comment