Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

From Dbvisit Standby version 11.4, the automatic standby update can be managed using CLI. This is done by using either the dbvagentmanager or dbvcontrol binary. The options are very simple and straightforward.

...

Below is the option for setting up and managing automatic standby updates from dbvagentmanager. These options must be run only from the Primary database server.

Note

The dbvagentmanager CLI commands for auto-update must be run only from the primary database server.

...

The auto-update has two options.

...

Code Block
C:\Program Files\Dbvisit\standbymp\bin>dbvagentmanager.exe auto-update modify -d KEY --set-interval-seconds 90 --noconfirm
Trace log will be written to 'C:\Program Files\Dbvisit\standbymp\log\trace\dbvagentmanager_auto-update_modify_4836.trace.log'.
Will update configuration KEY (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds) to be ENABLED with an interval of 90 seconds
Successfully updated configuration KEY (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com

Auto-Update using dbvcontrol

The above operations from the agentmanager can also be directly done from the dbvcontrol executable. The key advantage is all the options can be done from the single control center server using the dbvcontrol executable.

Code Block
[oracle@dbvel72 bin]$ ./dbvcontrol auto-update -h
Modify the Automated Standby Update settings for one or more configurations

This command operates on one or more configurations, applying the specified modification to the Automated Standby Update settings of each of them.

If the flags specified match more than one configuration, the user is prompted to choose which they wish to operate on, unless the --noprompt flag is specified, in which case all matching configurations
are operated on.

The user is prompted for confirmation before any updates are performed, unless the --noconfirm flag is specified.

Credentials for a Control Center user are required. Set the DBVUSERNAME environment variable or specify the --username flag to set the user name to use. If neither the flag or the environment variable
are set then you will be prompted for the user name.

Set the DBVPASSWORD environment variable to provide the password. It is possible, but not recommended, to specify the password using the --password flag; doing so will cause the password to be visible
to other processes on the system and to be recorded in log files. If neither the flag or the environment variable are set then you will be prompted for the password.

Usage:
  dbvcontrol auto-update [flags]

Examples:
  To disable Automated Standby Update for a named configuration:
    dbvcontrol auto-update --configuration-name DEV --disable

  To disable Automated Standby Update for configurations involving a particular host:
    dbvcontrol auto-update --host-name host1 --noprompt --disable

  To enable Automated Standby Update for selected configurations:
    dbvcontrol auto-update --enable

  To enable Automated Standby Update for all configurations:
    dbvcontrol auto-update --noprompt --enable

  To enable Automated Standby Update for all configurations without confirmation:
    dbvcontrol auto-update --noprompt --enable --noconfirm


Flags:
  -g, --logToStderr                     send logs to STDERR instead of writing to log files
  -U, --username string                 username to log into the Control Center with (you can also use the DBVUSERNAME environment variable)
  -P, --password string                 password to log into the Control Center with (NOT RECOMMENDED - use the DBVPASSWORD environment variable instead!)
  -d, --configuration-name string       name of the configuration to operate on
  -t, --configuration-type string       type of the configuration to operate on
      --host-name string                host name of the configuration to operate on
      --instance-name string            instance name of the configuration to operate on (SQL Server configurations only)
      --enable                          enable Automated Standby Update
      --disable                         disable Automated Standby Update
      --set-enabled enabled             set whether Automated Standby Update is enabled (true or false) (default (unset))
      --set-interval-seconds interval   set the Automated Standby Update interval in seconds (default (unset))
      --noprompt                        update all matching configurations without prompting the user to select
      --noconfirm                       skip the confirmation prompt and proceed immediately
  -h, --help                            help for auto-update

To run any of the options for auto-update using dbvcontrol. The -U and -P must be used (-U username for the control center -P password for the control center). If no option is used the username and password is prompted for the user to enter.

Code Block
[oracle@dbvel72 bin]$ ./dbvcontrol auto-update --disable
Trace log will be written to '/usr/dbvisit/standbymp/log/trace/dbvcontrol_auto-update_25047.trace.log'.
Please enter credentials for the StandbyMP Control Center.
? Username: admin
? Password: *****
Will update configuration orcl21c (Oracle) between dbvel71 and dbvel72 (currently DISABLED with an interval of 300 seconds) to be DISABLED with an interval of 300 seconds
? Update 1 configuration(s) - are you sure? Yes
Successfully updated configuration orcl21c (Oracle) between dbvel71 and dbvel72
[oracle@dbvel72 bin]$
Code Block
[oracle@dbvel72 bin]$ ./dbvcontrol auto-update -U admin -P admin --enable
Trace log will be written to '/usr/dbvisit/standbymp/log/trace/dbvcontrol_auto-update_25123.trace.log'.
Will update configuration orcl21c (Oracle) between dbvel71 and dbvel72 (currently DISABLED with an interval of 300 seconds) to be ENABLED with an interval of 300 seconds
? Update 1 configuration(s) - are you sure? Yes
Successfully updated configuration orcl21c (Oracle) between dbvel71 and dbvel72
Code Block
C:\Program Files\Dbvisit\standbymp\bin>dbvcontrol.exe auto-update -U admin -P admin -d AdWorks --disable
Trace log will be written to 'C:\Program Files\Dbvisit\standbymp\log\trace\dbvcontrol_auto-update_2428.trace.log'.
Will update configuration AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds) to be DISABLED with an interval of 75 seconds
? Update 1 configuration(s) - are you sure? Yes
Successfully updated configuration AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com

The --noconfirm and --noprompt options work exactly the same as the dbvagentmanager auto-update option.

Code Block
C:\Program Files\Dbvisit\standbymp\bin>dbvcontrol.exe auto-update -U admin -P admin -d AdWorks --enable --noconfirm
Trace log will be written to 'C:\Program Files\Dbvisit\standbymp\log\trace\dbvcontrol_auto-update_344.trace.log'.
Will update configuration AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently DISABLED with an interval of 75 seconds) to be ENABLED with an interval of 75 seconds
Successfully updated configuration AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com

The -d option is used for choosing the specific configuration name, and the -t option is used for choosing either Oracle or SqlServer.

Code Block
C:\Program Files\Dbvisit\standbymp\bin>dbvcontrol.exe auto-update -U admin -P admin -t sqlserver --disable --noconfirm
Trace log will be written to 'C:\Program Files\Dbvisit\standbymp\log\trace\dbvcontrol_auto-update_3640.trace.log'.
? Please choose the configurations to operate on AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds), TEAM (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds), NEW (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds), KEY (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 90 seconds), LINE (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds)
Will update configuration AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds) to be DISABLED with an interval of 75 seconds
Will update configuration TEAM (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds) to be DISABLED with an interval of 75 seconds
Will update configuration NEW (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds) to be DISABLED with an interval of 75 seconds
Will update configuration KEY (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 90 seconds) to be DISABLED with an interval of 90 seconds
Will update configuration LINE (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com (currently ENABLED with an interval of 75 seconds) to be DISABLED with an interval of 75 seconds
Successfully updated configuration AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com
Successfully updated configuration TEAM (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com
Successfully updated configuration NEW (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com
Successfully updated configuration KEY (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com
Successfully updated configuration LINE (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com

The other option is to use --host-name is used for changing the auto-update setting specific to primary host. This can be done to update the setting if configurations have different primary and standby hosts. and --instance-name is used for SQL Server instance names.

The status of the configuration can be directly got from the dashboard option of the dbvcontrol.

Code Block
[oracle@dbvel72 bin]$ ./dbvcontrol dashboard
Trace log will be written to '/usr/dbvisit/standbymp/log/trace/dbvcontrol_dashboard_27355.trace.log'.
Please enter credentials for the StandbyMP Control Center.
? Username: admin
? Password: *****
+--------------------------------------------------------------------------------+
| orcl21c (Oracle) between dbvel71 and dbvel72                                   |
|                                                                                |
|   Primary database on dbvel71: ONLINE                                          |
|   Standby database on dbvel72: RECOVERING                                      |
|   Automated Standby Update is enabled and configured to run every 300 seconds. |
|   Time gap: 1 minute 16 seconds                                                |
+--------------------------------------------------------------------------------+
Code Block
C:\Program Files\Dbvisit\standbymp\bin>dbvcontrol.exe dashboard
Trace log will be written to 'C:\Program Files\Dbvisit\standbymp\log\trace\dbvcontrol_dashboard_3748.trace.log'.
Please enter credentials for the StandbyMP Control Center.
? Username: admin
? Password: *****
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com |
|                                                                                                                                                       |
|   Primary database on toru.MP-webinar.envbuilder.cubicle-labs.com: ONLINE                                                                             |
|   Standby database on wha.MP-webinar.envbuilder.cubicle-labs.com: RESTORING                                                                           |
|   Automated Standby Update is enabled and configured to run every 75 seconds.                                                                         |
|   Time gap: 22 seconds                                                                                                                                |
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| TEAM (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com    |
|                                                                                                                                                       |
|   Primary database on toru.MP-webinar.envbuilder.cubicle-labs.com: ONLINE                                                                             |
|   Standby database on wha.MP-webinar.envbuilder.cubicle-labs.com: RESTORING                                                                           |
|   Automated Standby Update is enabled and configured to run every 75 seconds.                                                                         |
|   The Observer is monitoring this configuration.                                                                                                      |
|   Time gap: 22 seconds                                                                                                                                |
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| NEW (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com     |
|                                                                                                                                                       |
|   Primary database on toru.MP-webinar.envbuilder.cubicle-labs.com: ONLINE                                                                             |
|   Standby database on wha.MP-webinar.envbuilder.cubicle-labs.com: RESTORING                                                                           |
|   Automated Standby Update is enabled and configured to run every 75 seconds.                                                                         |
|   Time gap: 23 seconds                                                                                                                                |
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| KEY (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com     |
|                                                                                                                                                       |
|   Primary database on toru.MP-webinar.envbuilder.cubicle-labs.com: ONLINE                                                                             |
|   Standby database on wha.MP-webinar.envbuilder.cubicle-labs.com: RESTORING                                                                           |
|   Automated Standby Update is enabled and configured to run every 75 seconds.                                                                         |
|   The Observer is monitoring this configuration.                                                                                                      |
|   Time gap: 23 seconds                                                                                                                                |
+-------------------------------------------------------------------------------------------------------------------------------------------------------+
| LINE (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com    |
|                                                                                                                                                       |
|   Primary database on toru.MP-webinar.envbuilder.cubicle-labs.com: ONLINE                                                                             |
|   Standby database on wha.MP-webinar.envbuilder.cubicle-labs.com: RESTORING                                                                           |
|   Automated Standby Update is enabled and configured to run every 75 seconds.                                                                         |
|   The Observer is monitoring this configuration.                                                                                                      |
|   Time gap: 23 seconds                                                                                                                                |
+-------------------------------------------------------------------------------------------------------------------------------------------------------+