Some time ago, I posted that EMC had added a jobquery utility to allow probing of the NetWorker jobs database (the one created/maintained by nsrjobd). Unfortunately, at the time, jobquery had been somewhat muzzled – you could give it commands, and it would spit output back to you, but it would never give you any indication that it was waiting for you. No prompting, no nothing. It made working with jobquery somewhat of a hassle.

Thankfully though, as of NetWorker 7.6, the duct tape has been fully removed and jobquery will happily give you that meta-information:

[root@nox ~]# jobquery
NetWorker jobs query utility.
Use the "help" command for help.
jobquery> help
Legal commands are:
print [query] (set current query)
show [attrlist]
types
all
quit
help [command]
. [query]
? [command]
Where:
query ::= attrlist
attrlist ::= attribute [; attribute]*
attribute ::= name [: [value [, value]* ]
jobquery> types
Known types: job indication, save job, probe job,
savegroup job, session info, index save job,
savefs job, bootstrap save job, utility job,
active job db;

Now sure, in previous versions you could type commands in and get output, but not having the prompt to tell you when jobquery was waiting, or when it was working, or when (as I originally thought) it was hanging on startup, is a fairly critical part in having a useful user interface.

Having a responsive user interface makes jobquery a little nicer to work with. For instance, let’s look at the “save job” type and run a backup. There’s a lot of fields in the “save job” resource type, so I’m going to limit it as follows:

jobquery> show command:; group name:; host:; job state:; level:
jobquery> print type: save job
                     command: \
"save -s nox.anywebdb.com -g \"Staging Servers\" -LL -f - -m nox\
 -t 1262601936 -l incr -q -W 78 -N /d/nsr/01 /d/nsr/01";
                  group name: Staging Servers;
                        host: nox;
                   job state: COMPLETED;
                       level: incr;

Then, once the backup starts, if I run (and abbreviate the output, remembering it shows all jobs in the database!), I can see:

                     command: \
savepnpc -s nox.anywebdb.com -g archon -LL -f - -m archon -t 1262818820 -l in\
cr -q -W 78 -N / /;
                  group name: archon;
                        host: archon;
                   job state: ACTIVE;
                       level: incr;

However, the “ACTIVE” state simply means that the job is actively queued, not that it’s actually sending data. If you want to only see jobs that are actively backing up rather than just simply active, you’d look for a job state of “SESSION ACTIVE”:

jobquery> print type: save job; job state: SESSION ACTIVE
                     command: \
savepnpc -s nox.anywebdb.com -g archon -LL -f - -m archon -t 1262818820 -l in\
cr -q -W 78 -N / /;
                  group name: archon;
                        host: archon;
                   job state: SESSION ACTIVE;
                       level: incr;

                     command: \
savepnpc -s nox.anywebdb.com -g archon -LL -f - -m archon -t 1262818814 -l in\
cr -q -W 78 -N /Volumes/Yu /Volumes/Yu;
                  group name: archon;
                        host: archon;
                   job state: SESSION ACTIVE;
                       level: incr;
What does this mean? For a start, it provides a way of checking (outside of NMC) which jobs are currently queued to run, and which jobs are actually running. As is always the case, the better you can monitor regardless of circumstance, the more likely you are to be able to understand your server state. Now that jobquery however at least tells us when it’s waiting for input, I’m looking forward to properly exploring what it can do. I previously said that I anticipated it being a useful tool. Now I know it’s going to be a useful tool, and will do some further digging/testing and do a future posting on using it further to track activities.
 

Since I have more than a passing interest in databases, I always try to keep appraised of the Oracle module for NetWorker. It therefore surprised me a few days ago to see that v5 of the module had been released in March. I guess my excuse is that March was an insanely busy month for me between work and travel. (Well, that’s my excuse, and I’m sticking to it.)

So yesterday I downloaded v5 of the module (for Linux), and spun it up. This is a version I really, really like.

Now, here’s a few bullet points before I get to the most impressive feature:

  • No longer supports Oracle 9i or lower; if you want older, unsupported versions of Oracle you have to use an older version of the module.
  • Requires features that exist only in Networker 7.5.x as the underlying client.
  • Must have the NetWorker regular client installed and running in order for the module software to correctly install and activate,
  • Can work with the 7.4.x NetWorker server with the exception that what I’m about to describe below doesn’t work with a 7.4 server.
  • Now has a client configuration wizard that works within NMC and makes Oracle backup configuration a breeze.

Honestly, if you’re about to do a new NetWorker install into a site that has Oracle, skip everything else and install 7.5.1. I.e., this is one of these compelling reasons for 7.5.x.

The Oracle client configuration wizard is integrated into NMC’s wizards. Right-click on a client in the configuration panel, choose “Client Backup Configuration -> New”, and you’re off and running:

Oracle Client Configuration Step 1

Oracle Client Configuration Step 1

Oracle Client Configuration Step 2

Oracle Client Configuration Step 2

Note that you won’t reach this point if you’ve disabled ‘nsrauth’ authentication on the backup server. I had done so on my lab server as a test on Monday, and spent half an hour trying to work out a … rather inexact … error message.

Oracle Client Configuration Step 3

Oracle Client Configuration Step 3

Oracle Client Configuration Step 4

Oracle Client Configuration Step 4

The above step is where things get fun. Note that if you are given these details, you don’t even need to log onto the client to setup an nsrnmo script any longer. This is the start of A Really Good Thing.

Also, I should note, in the above screen shot, because I was using a temporary database installed just for a few tests and I was in a rush, I used the sys account for connecting to the target database. No, you shouldn’t ever do that – create a backup user and use that account, please.

Note that Oracle, and the Oracle Listener, must both be running on the client in order to clear the above step.

After the above, we then start to get into the ‘regular’ client configuration options:

Oracle Client Configuration Step 5

Oracle Client Configuration Step 5

Oracle Client Configuration Step 6

Oracle Client Configuration Step 6

Oracle Client Configuration Step 7

Oracle Client Configuration Step 7

This summary screen shows you what you’re going to get as far as the configuration is concerned – including the RMAN script that has been automatically generated for you:

Oracle Client Configuration Step 8

Oracle Client Configuration Step 8

Confirmation of sweet success:

Oracle Client Configuration Step 9

Oracle Client Configuration Step 9

The finished client in NMC:

Oracle Client Configuration Step 10

Oracle Client Configuration Step 10

Once configured, you’re ready to start backing up straight away. Honestly, it couldn’t be simpler.

As a closing note, I know some other backup products have had Oracle backup wizards for some time, so I’m not claiming EMC is the first with this style of setup, but I do think it’s a great feature to see included now.

© 2012 The NetWorker Blog Suffusion theme by Sayontan Sinha