6. Firmware Upgrade and Configuration Management
ROS® v3.11User Guide
112
RMC30
>sql select from ethportcfg where Media_Type = Auto_Select
Port Name Status Media Type Flow Control FEFI Link Alarms
5 Port 7 Enabled Auto Select Enabled Disabled Enabled
6 Port 8 Enabled Auto Select Disabled Disabled Enabled
2 records selected
It is also possible to select rows based on multiple parameters using "and" and "or" operations
between comparisons in the "where" clause. For example:
>sql select from ethportcfg where Media_Type = Auto_Select and Flow_control =
Disabled
Port Name Status Media Type Flow Control FEFI Link Alarms
6 Port 8 Enabled Auto Select Disabled Disabled Enabled
1 records selected
6.7.4. Changing Values in a Table
The "where" clause can be used to select rows in a table and to modify the fields in that row.
As an example, suppose that it is desirable to identify all ports on the device operating in 100
Mbps full-duplex mode with flow control disabled, and to enable flow control on these ports:
>sql update ethportcfg set flow_control=enabled where ( media_type = Auto_Select
and flow_control = disabled )
1 records updated
6.7.5. Setting Default Values in a Table
It is sometimes desirable to restore one table to its factory defaults without modifying the
remainder of the configuration. The “sql default” command allows an individual table to be
defaulted.
>sql default into ethportcfg
6.7.6. Using RSH and SQL
The combination of remote shell scripting and SQL commands offers a means to interrogate
and maintain a large number of devices. Consistency of configuration across sites may
be verified by this method. The following presents a simple example where the devices to
interrogate are drawn from the file “Devices”:
C:> type Devices
10.0.1.1
10.0.1.2
10.0.1.3
c:\> for /F %i in (devices) do rsh %i -l admin,admin sql select from ethportcfg
where flow_control = disabled
C:\>rsh 10.0.1.1 -l admin,admin sql select from ethportcfg where flow_control =
disabled
Port Name Status Media Type Flow Control FEFI Link Alarms