The easiest way to execute such commands is with the isql
EXEC
command as follows:
isql 1111 dba dba exec="UPDATE WS.WS.SYS_DAV_USER SET U_PWD='abc' WHERE U_NAME='dba';checkpoint;"
which when run gives:
De-iMac-2448:~ hwilliams$ isql 1111 dba dba exec="UPDATE WS.WS.SYS_DAV_USER SET U_PWD='abc' WHERE U_NAME='dba';checkpoint;"
Connected to OpenLink Virtuoso
Driver: 07.20.3214 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
Done. -- 0 msec.
Done. -- 18 msec.
De-iMac-2448:~ hwilliams$
or you can set the verbose=off
flag to turn off the display output and just execute silently:
De-iMac-2448:~ hwilliams$ isql 1111 dba dba verbose=off exec="UPDATE WS.WS.SYS_DAV_USER SET U_PWD='abc' WHERE U_NAME='dba';checkpoint;"
De-iMac-2448:~ hwilliams$
Although to change the dba
administrator password you would be better of using the set password
command as indicated in the Default Password documentation as follows:
De-iMac-2448:~ hwilliams$ isql 1111 dba dba exec="set password dba abc;checkpoint;"
Connected to OpenLink Virtuoso
Driver: 07.20.3214 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
Done. -- 3 msec.
Done. -- 23 msec.
De-iMac-2448:~ hwilliams$