Auto Update Using CLI
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.
Auto-Update using dbvagentmanager
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.
The dbvagentmanager CLI commands for auto-update must be run only from the primary database server.
The auto-update has two options.
Modify: This option helps you to manage the automatic standby update for one or multiple configurations.
Status: This option provides the status of a single or multiple configurations
Let's look at the individual options and various functions of these.
Status Option:
[oracle@dbvel71 bin]$ ./dbvagentmanager auto-update status -h
Show the status of Automated Standby Update for one or more configurations
This command operates on one or more configurations whose primary host is the current host.
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.
Usage:
dbvagentmanager auto-update status [flags]
Examples:
To show the status of Automated Standby Update for a named configuration:
dbvagentmanager auto-update status --configuration-name DEV
To show the status of Automated Standby Update for selected configurations:
dbvagentmanager auto-update status
To show the status of Automated Standby Update for all configurations with primary on the current host:
dbvagentmanager auto-update status --noprompt
Flags:
-g, --logToStderr send logs to STDERR instead of writing to log files
-d, --configuration-name string name of the configuration to operate on
-t, --configuration-type string type of the configuration to operate on
--instance-name string instance name of the configuration to operate on (SQL Server configurations only)
--noprompt update all matching configurations without prompting the user to select
-h, --help help for status
[oracle@dbvel71 bin]$
Examples:
If there is only one configuration between the agents and the control center, no other options other than status need to be provided.
[oracle@dbvel71 bin]$ ./dbvagentmanager auto-update status
Trace log will be written to '/usr/dbvisit/standbymp/log/trace/dbvagentmanager_auto-update_status_7084.trace.log'.
orcl21c (Oracle) between dbvel71 and dbvel72: ENABLED with an interval of 600 seconds (daemon running with pid 6461)
[oracle@dbvel71 bin]$
For SQLServer, you can choose the options to view the status of specific configurations. An option is provided to choose the specific configuration using the keyboard.
The output would look like this.
AdWorks (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com: ENABLED with an interval of 120 seconds
TEAM (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com: ENABLED with an interval of 120 seconds
NEW (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com: ENABLED with an interval of 120 seconds
LINE (SQL Server) between MSSQLSERVER on toru.MP-webinar.envbuilder.cubicle-labs.com and MSSQLSERVER on wha.MP-webinar.envbuilder.cubicle-labs.com: ENABLED with an interval of 300 seconds
If there are multiple configurations on the setup, then the -d option can be provided to get the status of a specific configuration using the configuration name.
Oracle:
SQL Server:
Status with -t option
This option lets us choose to view the status of either Oracle or SqlServer.
The -g option provides you with standard log output of the status on the screen rather than in the log file. This is useful for troubleshooting in case the auto-update is not working as expected.
Modify Option:
This option has flags to disable, enable, set time intervals between standby and primary, and various other options.
Â
Disable/Enable Automatic Standby Update:
disable/enable with noconfirm: This option does not ask for confirmation but disables your automated standby update
Disable/enable with noprompt: This option would disable all the active configurations without letting the user choose what configuration to disable. This is valid only when you have multiple configurations. But confirmation is required to disable/enable.
noprompt with noconfirm. This would disable all active configurations and not ask for confirmation or let you choose any configuration.
disabling and enabling specific configurations: To use this option -d is used to choose the configuration for which the options can be enabled or disabled
Change Automatic Standby Interval
The option --set-interval-seconds is used to change the automated standby interval time. The -d option is used to specify the configuration for which the interval is changed. The option of noprompt and noconfirm is used in the same way as above. If -d is not used, all the configuration’s interval is changed to the provided value. The -t option is used to change for specific database types (Oracle, SQLServer).
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.
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.
The --noconfirm and --noprompt options work exactly the same as the dbvagentmanager auto-update option.
The -d option is used for choosing the specific configuration name, and the -t option is used for choosing either Oracle or SqlServer.
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.