Westermo MR Series User Manual

Page 370

Advertising
background image

370

6622-3201

Web Interface and Command Line Reference Guide

www.westermo.com

sqlsave 0 <filename>

Where <filename> is the name of the destination file. For example, to save the learnt database
entries to a file called backup.csv

sqlsave 0 backup.csv

If there are no learnt entries, this command will not create a file. To view the number to learnt
entries, use the command sql 0 ? and refer to the section headed Learning info.

Learning info.

items learned:0

matched retrievals:0

OK

Confi gure a Westermo to use a backup database
Once the Westermo has been configured to run a SQL csv database locally, this backup csv data-
base can be used in the event of the main SQL database going offline. The configuration parameters
required are:

Configure the IP address of the SQL server to use.

egroup 0 dbhost “192.168.0.50”

Configure the IP address of the SQL server that will have a backup database. If a socket connection
fails to this IP address, the Westermo will use the backup IP address.

ipbu 0 IPaddr “192.168.0.50”

Configure the backup database IP address. eg. the loopback address of the Westermo router or an
alternative SQL server, this eaxmple shows the loopback IP address of the Westermo router.

ipbu 0 BUIPaddr “127.0.0.1”

Set the amount of time in seconds that the connection to the main SQL server will be retried.

ipbu 0 retrysec 30

Set the Westermo to use the backup IP address if the main database is unavailable.

ipbu 0 donext ON

For example, to configure and use a local backup database when the main SQL database at

192.168.0.50 is offline, the configuration may look similar to this:

egroup 0 dbhost “192.168.0.50”

sql 0 dbsrvmem 200

sql 0 dbfile “sardb.csv”

sql 0 dbname “sarvpns”

sql 0 learn ON

sql 0 intrude ON

sqlsave 0 backup.csv

ipbu 0 IPaddr “192.168.0.50”

ipbu 0 BUIPaddr “127.0.0.1”

ipbu 0 retrysec 30

ipbu 0 donext ON

Memory info

smem

Displays the amount of memory allocated, in use and available for use by the MySQL server on the
Westermo.

Transact SQL commands
To query a SQL database manually using transact SQL statements, the following commands can be
used.

Advertising
This manual is related to the following products: