Dbvisit Multiplatform like previous versions has the option to create reporting replicas and Test/Dev snapshots. Let’s revisit the basics of snapshots and what are the benefits and how does it fit into Dbvisit Multiplatform.

Snapshots is actually a common technology concept that is used and implemented by many vendors of various different products. Some of these come with a large price tag, but they do provide a lot of advanced features of which many are focussed on the enterprise. One of Dbvisit's goals is to take complex things and make it simple, such as the creation and management of an Oracle Standby Database environment. When we started looking at Snapshots - this is no different. We looked at capability available in the Linux Operating System (OS) - with a specific focus on Oracle Linux - but note that these options are available on almost all Linux distributions - especially the ones that are supported by the Oracle Database which include RHEL and SLES.

One of the options available to you on Linux is the use of Logical Volumes (LV) - or Logical Volume Manager (LVM) - for more detail on this technology please see the documentation of the Linux distribution you are using - example - https://docs.oracle.com/cd/E37670_01/E41138/html/ch17s03.html

Now there are high level two new options introduced in Dbvisit Standby Snapshots. These are:

Option 1:  Reporting Replicas

Reporting Replicas can be described as follow:

The diagram below provides and overview of how the Snapshot Group option work. It is described of the Cascading Standby database, but can also be configured from the 1st Standby database.

Using a Cascading Standby Database



Using the Standby Database

Option 2:  Test/Dev Snapshots

Test/Dev Snapshots can be described as follow:

Licensing

Dbvisit Standby Reporting Replicas and Test/DEV Snapshots do not require additional licenses from Version 10.0 onwards. This option is available only on Linux platforms and can be used with the regular licenses provided as part of support agreements.

Pre-Requisites

Before starting with this new option, it is important to understand what the requirements are.  

Snapshots are making use of copy-on-write, which means they are ideal for short lived scenarios and not long term.  Long term snapshots will require more disk space to keep the consistent copy (view).  This needs to be taken into account when planning the storage allocation for the snapshots.

As mentioned Dbvisit is aiming to make technology available in Linux to our users by implementing an easy to use interface to allow the use of these features.  Now in this case the first version of the Snapshot functionality is based on Linux LVM (Logical Volume Manager) which allows for snapshots to be created of Logical Volumes (LV).  Now we will not go into the details of LVM as this can get really complex fast, but having an understanding of what LVM is - which most Linux Administrators do, can be useful.  We will however aim to provide a few high level examples here to get you started.

The key requirements for using this new option are:

  1. The Operating System (OS) must be Linux:

  2. The Standby Database (which can be a cascading standby database) must be located on a single Logical Volume (LVM)

oracle@dbvrosh02 ~ : df -h
Filesystem                 Size  Used Avail Use% Mounted on
devtmpfs                   2.3G     0  2.3G   0% /dev
tmpfs                      2.3G     0  2.3G   0% /dev/shm
tmpfs                      2.3G  8.5M  2.3G   1% /run
tmpfs                      2.3G     0  2.3G   0% /sys/fs/cgroup
/dev/sda3                  6.3G  4.2G  1.9G  70% /
tmpfs                      2.0G  4.0K  2.0G   1% /tmp
/dev/sda1                  488M  279M  175M  62% /boot
/dev/mapper/oradatavg-u02   21G  1.5G   19G   8% /u02
/dev/mapper/orahomevg-u01   16G  5.2G  9.7G  35% /u01
tmpfs                      469M     0  469M   0% /run/user/501
  1. You must have sufficient IO capability in the Volume Group underlying storage (Physical Disks - Using SSD based storage is always recommended for Database Storage)

  2. Make sure your Volume Group (VG) in which the Logical Volume (LV) is located has sufficient disk space

  3. Memory 

  4. The Dbvisit Standby executable - dbvsnap - must be able to execute the LVM commands as the root user.  

  5. Sufficient disk space under the DBVISIT_BASE folder

    1. When creating the snapshots there will be metadata written to the DBVISIT_BASE/standby/meta folder for each snapshot.

Recommendations

There are a number of ways you can go about using this new Dbvisit Standby Snapshot option. The first is that you can run it on your current standby database environment - if you meet the above requirements, most important having the standby database fully located on a Logical Volume (LV).  

The second option is that you can also create a new configuration, using the Dbvisit Standby Cascading option on a second Standby Database Server where you have created a specific area for the database using a Logical Volume.

Important Warnings & Best Practice

Following these rules & suggestions will ensure you have a trouble-free experience using the Dbvisit Standby Snapshot Utility:

The next step that will be required before you can use the new Dbvisit Standby Snapshot option is to make sure the user which in most cases will be the "oracle" UNIX account have the appropriate entries in the /etc/sudoers file.

There are a number of options available to you, you can add the "oracle" user to have full permission, but this will give it full permission, which is not something you might want to do, or you can give it only the specific permissions you want.

Below are the options you can follow:

Option 1:  Give "oracle" UNIX account full admin permission

/etc/sudoers

...
oracle ALL=(ALL) NOPASSWD:ALL

Option 2:  Give the "oracle" UNIX account only permission on certain commands:

/etc/sudoers

...
oracle ALL = (root) NOPASSWD: /usr/sbin/lvs
oracle ALL = (root) NOPASSWD: /usr/sbin/vgs
oracle ALL = (root) NOPASSWD: /usr/sbin/lvcreate
oracle ALL = (root) NOPASSWD: /usr/sbin/lvremove
oracle ALL = (root) NOPASSWD: /usr/bin/mount
oracle ALL = (root) NOPASSWD: /usr/bin/umount

Note that the snapshots will be created, then mounted, and when not required anymore will be unmounted then removed, which is why the above options are required.


Configuration

It is important to mention early on that when you are looking at using this new Dbvisit Standby Snapshot option, you should use the Central Console (GUI).

Even though most of the options are available via the Command Line Interface (CLI) utility - dbvsnap, using the Central Console is strongly recommended as it is easy to use and get started.  Using the CLI option (dbvsnap) is only recommended for experienced users.

Before you can create any Snapshots or Snapshot Groups there are a few important things to take into account:

  1. You must have a Primary => Standby configuration

  2. You must have the standby database created and it should be located on a Logical Volume (LV)

    1. You can also create a Cascading Standby database on a new environment if your existing environment does not cater for Logical Volumes or meet the requirements.  Using Cascading Standby databases does provide you with a number of extra flexible options and protection and would be a good approach to using the new Dbvisit Standby Snapshots on.

Once these requirements are met, we recommend using the Central Console (GUI) to configure and use the new Snapshot option.

The Dbvisit Standby Snapshot option can only be used on a Standby or Cascading Standby Database - you cannot and will not be allowed to use this on the Primary Database server.


Reporting Replicas

From the multiplatform control center, choose the configuration and you can see the options for Reporting Replicas ( 1 ) and Snapshots( 2 )

Before moving forward with the creation of the snapshot or reporting replicas ensure the standby database or cascade standby database are created and the pre-requisites are met. Also, ensure the listener is up and running.

  1. The Logic Volume that will be used for the Snapshot.

  2. The Mount Point that will be used for the Snapshot. This is always the same as the mount point of the standby DB, for simplicity's sake.

  3. The Volume Group that the Snapshot will belong to. This is also the same as the standby DB.

  4. The Oracle Service Name is chosen by the user. This is the name that will execute the dbvsnap utility.

  5. If you need your snapshot groups to be in read-only or read-write mode (The database is activated)

  6. The desired number of Snapshots to create/maintain. Allowed values are currently 1 - 4. This is the number of Snapshots that will be kept and switched between every Creation Interval setting (below).

  7. Snapshot Creation Interval - in minutes, how frequently to create new Snapshots (and potentially delete old ones). We recommend this is no less than 10 minutes.

  8. A prefix that will be applied to the names of all created Snapshots. This is provided so that users can easily tell which Snapshots on their system were created by this utility. This is limited to 5 characters, alphanumeric only.

  9. An optional field you can use to specify custom parameters for the mount operation. For advanced users.

  10. The maximum allowed size for a Snapshot to reach. A default value is provided, but it is up to the user to ensure this is set appropriately to their intended use for the Snapshot. Make sure this is not too small - you wouldn't want your Snapshots to run out of space!

  11. Advanced option to provide custom database parameter. The default value is provided for sga_target, should only be changed by expert users. The other database parameters can be added/modified. Below figure shows how.

When using XFS filesystem you have to specify to "Mount Option" field value: "-o nouuid" (without quotes) otherwise snapshot creation would fail

After the parameters are set, Click the start Snapshot generation button to start the reporting replicas generation

The new snapshot is created and name is DBV001 and size occupied is 44.21% out of 1500M and the database status of the snapshot is open read-write.

The space allocated 695.36MB/1572.86MB. The 695.36MB indicated will be the initial size of the snapshot which is nothing but the space occupied by redolog groups and the controlfile which gets created for the activated read-write and read-only snapshots which should be taken into consideration when creating snapshots both single and group.

( 1 ) When a snapshot is created to maintain the database in a consistent state the standby is opened in readonly mode

( 2 ) Snapshot options to Pause Snapshot generation. No new Snapshots will be created, however, all existing Snapshots will remain mounted. Stop Snapshot generation, shut down database instances but does not umount the snapshots. Stop Snapshot generation, shut down database instances but does not umount the snapshots.

( 3 ) Leader indicator, i.e. which Snapshot will all new connections to the DB connect to.

( 4 ) SCN number at the time of the creation.

( 5 ) Snapshot database status.

( 6 ) Creation time and how long the snapshots are running.

( 7 ) Number of active connections connected to snapshot

The server in which snapshots are running has the following

Test/Dev Snapshots

The test/dev snapshots are single snapshots that can be used for reporting/testing purposes. These snapshots can also be used for DR testing purposes. The single snapshots can be retained based on the space available in the logical volume as the space occupied by the snapshots can increase based on the test/development happening on the database and also compensate for the changes happening in the DR database due to archivelogs being applied on the standby.

The settings for a Test/Dev Snapshot are largely the same as those used for Reporting Replicas (discussed above).