Westermo MR Series User Manual
Page 371
371
6622-3201
Web Interface and Command Line Reference Guide
www.westermo.com
To connect to the SQL server and database:
sqlcon
For example:
sqlcon 192.168.0.50 sqluser sqlpass eroute-db
To issue transact SQL statements:
sqldo <”cmd”>
For example:
sqldo “select * from site where subnet=’10.110.100.0’ limit 3”
To limit the sqldo command to only act on specified fields, the following command can be used:
sqlfields “
For example:
sqlfields “remmsk password peerip”
After issuing the sqlfields command, all further sqldo commands will apply to these fields only. When
finished, to close the SQL server connection correctly:
sqlclose
If the database being queried is held locally on the Westermo, these commands can be preceded
with the SQL debug command to give extra feedback on any commands issued.
To enable the SQL communications debug:
sql 0 debug 1
To enable the SQL local server file handling debug:
sql 0 debug 2
To enable both the SQL communications and file handling debug:
sql 0 debug 3
To disable the SQL debug:
sql 0 debug 0