maandag, oktober 31, 2011

how to configure dbvisit to manage existing standby database running SE

Standby database are around since a long time. Since Oracle integrated Data Guard, the maintenance of a standby database has become a lot easier than before, when you are running Enterprise Edition (EE). Those who are running Standard Edition (SE) are left in the cold...

This is exactly where dbvisit jumps in with their product dbvisit standby. This replaces the need for all those fine user cooked scripts and gives maybe even easier management of standby databases when compared to Data Guard. In this demo I will show how this works.

setup

2 hosts (vm) both running el 5.7 hosts are vol01 and vol02.

dbname se11023, Oracle version 11.2.0.3

instances se11023@vol01 and se11023b@vol02

sqlnet is configured, the listeners static configured.

dbvisit standby version used here is 6.0.12

the database is not running using the famous 'oracle' account but using my 'ronr' account, member of the dba group. The oracle account does not exist on any of my servers.

create clone using rman

initse023b.ora on vol02 contains:

audit_file_dest='/home/ronr/app/ronr/admin/se11023b/adump'
audit_trail='db'
compatible='11.2.0.0.0'
control_files='/home/ronr/app/ronr/oradata/se11023b/control01.ctl','/home/ronr/app/ronr/fast_recovery_area/se11023b/control02.ctl'
db_block_size=8192
db_domain=''
db_name='se11023'
db_unique_name='se11023b'
db_recovery_file_dest='/home/ronr/app/ronr/fast_recovery_area'
db_recovery_file_dest_size=4322230272
diagnostic_dest='/home/ronr/app/ronr'
memory_target=259339776
open_cursors=300processes=150
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
db_file_name_convert='se11023','se11023b'
log_file_name_convert='se11023','se11023b'

 

create spfile, copied password file to the standby location and cloned with rman:

rman target=/ auxiliary=sys/unknown@se11023b
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Oct 31 14:16:15 2011
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to target database: SE11023 (DBID=3580957182)connected to auxiliary database: SE11023 (not mounted)

duplicate target database for standby from active database dorecover;

a few minutes later the physical standby database was ready for use.

install dbvisit standby

First download dbvisit from http://www.dbvisit.com/dbvisit_download.php and unzip the downloaded file. Go to the installer location

cd /mnt/hgfs/vm/dbvisit/dbvisit-standby6.0.12_linux/dbvisit

and run ./dbvisit_install

---------------------------------------------------------------------     
     Welcome. Your Dbvisit Standby product is going to be installed now...
     This will install:
            - Dbvisit Standby command line version
            - Dbvserver (to provide a web interface to Dbvisit Standby)
     ---------------------------------------------------------------------
It is recommended to make a backup of our current Dbvisit      
software location for rollback purposes.   
> Oracle user name on this server? [default: "oracle"]
Enter a custom value or press ENTER to accept above default: ronr
Dbvserver is Dbvisit's web server software that provides the web interface
for all Dbvisit products. Dbvserver can be started at the end of this
installation procedure, but in order to do that, a user name and password
must be chosen for secure authentication.
> Dbvserver admin user name? [default: "admin"]
Enter a custom value or press ENTER to accept above default: 
> Dbvserver admin user password? [default: "admin"]
Enter a custom value or press ENTER to accept above default: 
Please specify the Dbvisit main installation directory path.
The default is /usr/local/dbvisit.
Please Note: Dbvisit Standby will be installed under the "standby" subdirectory of this path.
> Dbvisit installation directory path? [default: "/usr/local/dbvisit"]
Enter a custom value or press ENTER to accept above default: /home/ronr/app/ronr/dbvisit

In order to improve the Dbvisit web interface an automatic email can
be sent to Dbvisit support when an issue is detected in the web framework.
No personal information is sent and this information is solely used to improve
our software.
> Turn on automatic email to Dbvisit support: Yes/No [default: "Yes"]
Enter a custom value or press ENTER to accept above default: no

+++ Thank you. Commencing installation right away...
Stopping all old dbvserverd processes possibly running...
Updating Dbvserver configuration file...
A new Dbvisit Standby installation will be performed...
Creating installation sub-directories...
Installing product files...
+++ Dbvisit product installation complete.

Adjusting init script templates...
Please find some init script templates in the dbvserver/etc/init.d
archive directory. These templates will allow your Systems Administrator
to automatically start Dbvserver after a database server reboot.
Templates are available for Sun Solaris, IBM AIX, and the Linux flavours
OpenSuSE, RedHat/Centos/Fedora & Debian/Ubuntu.

Start Dbvserver - the web framework for Dbvisit?
This will provide a web interface to Dbvisit Standby and allows it to be run through a web browser: Yes/No [default: "Yes"]
Enter a custom value or press ENTER to accept above default: 
Starting Dbvserver - the web framework for Dbvisit. Please wait...
.......done. Dbvserver is up and running. The process name is dbvserverd.
+++ Next steps: Dbvisit Standby may be configured either through a web-browser (GUI)
OR througha command line utility (CLI).
  Configure Dbvisit Standby through a (GUI) web-browser (using Dbvserver):  ==> This is only required on the primary server.
    i) Please point your web browser to the following URL to login to
       Dbvserver and configure your Dbvisit product:
       Default username/password is admin/admin
http://127.0.0.1:8082

Configure Dbvisit Standby through command line (CLI):
    i) cd /home/ronr/app/ronr/dbvisit/standby
   ii) Run ./dbvisit_setup
Please note the following requirements before configuring Dbvisit Standby on the primary server:
  i) Dbvisit software is installed on the standby server.
 ii) SSH without a password or passphrase is setup between primary and standby servers.
Dbvserver may produce output on this terminal session, it is therefore recommended to exit out this terminal session.
/mnt/hgfs/vm/dbvisit/dbvisit-standby6.0.12_linux/dbvisit/dbvisit_install completed.

This took a little more than a few seconds. Lets say one whole minute.

The same installation also on vol02, left as an exercise for the reader :-D

(When using time ./dbvisit_install

real0m31.496s

user0m0.251s

sys0m2.109s

)

configure using web GUI

Now the software is installed and dbvserverd is running on port 8081 it is time to fire up the fox and point it to

http://vol01:8081Dbv6012 01

After logon a clean screen is shown:

Dbv6012 02

Since it is specifically asked for newbies, read the note:

Dbv6012 03

Select the Setup option to be greeted with the license overview:

Dbv6012 04

After accepting the Agreement we get:

Dbv6012 05

Here we select New Dbvisit Setup because this is a new configuration. The numbers suggest a workflow. Missing here is the option to register an existing standby database instead of creating one. It would have been nice is step 4 was changed in 4a and 4b where

  1. a) is creating a new standby database,
  2. b) using existing standby database

followed by step 4.5 that registers the standby database for both options.

Dbv6012 06

a lot of defaults are ok, make sure that your ORACLE_SID/ORACLE_HOME get the correct values. In my case they are taken from the oratab file and were initially wrong because the database in question is not listed as first in the oratab. dbvisit is going to create a database schema into the database, default called dbvisit with a password. This schema is used to administer the files, progress and license.

Next

Now enter the details for the standby database, the hostname, instance name, log directory and the standby archive log location.Dbv6012 07

Dbv6012 08

surprising here is the default for the archive destination. It is nonexistent, points to a different ORACLE_SID so I changed that to /home/ronr/app/ronr/fast_recovery_area/SE11023/archivelog

NEXT

Dbv6012 09

Not using RAC

NEXT

Enter at least a value for an admin:

Dbv6012 10

NEXT

Accept all defaults for the log managements on both the primary and standby:Dbv6012 11

Dbv6012 12

Select a valid tablespace for the dbvisit schema and hit Finish

Dbv6012 13

to get:

Dbv6012 14

next steps:

install dbvisit on standby server - done

setup host equivalence for ssh - done

here is gets a little vague. What I want is to start using the existing standby database and not create a new one. Lets try 'run Dbvisit Standby'. This could be a correct choice but its not very clear or intuitive what we get:

Dbv6012 15

Run looks like a valid option.

Dbv6012 16

a green light as a result can hardly be bad news. the configuration is copied to the standby host. The configuration is almost done now. What left is scheduling of the transports:

back to Home, select Run -> Schedule.

Here are a lot of options to schedule the recovery and log transport. Play with it.

Dbv6012 17

dbvisit also has nice reporting screens to give a quick overview of what happened, or not. In this case nothing is happening. In a regular production database or one with a serious load, more interesting graphics will be visible.

Dbv6012 18

Dbv6012 19

summary

In this article I wanted to show how easy the setup of a physical standby database with automated log transport with gap detection can be done using dbvisit. There is more possible than shown here, this was all about quick setup but this will be fine for many installations. No need to use the CLI for any action, as long as the dbvserverd processes are running. Literature/manuals used: NONE.

I hope this helps some people to keep their installation running SE instead of an expensive upgrade to EE, for DR only.