DBTOOL <COMMAND> /<parameter> <value> etc.
===DBTOOL RESTORE (restore a database)===
Parameters
DBTOOL restore /server myservername /user myusername /pwd mypassword /spi false /cat mynewcatalog /bak "C:\MSSQL\Backup\mybackup.bak" /force false /ndpath "C:\SQL\Data\mynewcatalog.mdf" /nlpath "C:\SQL\Data\mynaewcatalog.ldf" /odname myoriginalcatalog /olname myoriginalcatalog_log
===DBTOOL UBIKSET (set a UBIK setting value)===
Parameters
/setting ... the system setting key (e.g. /setting 0)
ExamplesExample:
DBTOOL UBIKSET /server myservername /user myusername /pwd mypassword /spi false /cat mynewcatalog /key 0 /setting "\\myserver\mydatapath"
===DBTOOL RUN (run a sql expression)===
Parameters
/sep ... (optional, default ";") the expression (e.g. /sep "\t")
ExamplesExample:
DBTOOL RUN /server myservername /user myusername /pwd mypassword /spi false /cat mynewcatalog /sql "SELECT * from mytable"
===Examples===
====* RUN====
dbtool RUN /sql "SELECT * FROM dbo.UST_BASECLASS" /cat "UBIK.TEST" /server "sqlserver" /user "sa" /pwd ****** /verbose false
dbtool RUN /sql "update UST_SYSTEMSETTINGS set PR_VALUE='\\fileserver\UBIKData\UBIK.TEST.COPY' where PR_KEY=0" /cat "UBIK.TEST.COPY" /server "sqlserver" /user "myuser" /pwd "mypwd"
====* UBIKSET====
dbtool UBIKSET /cat "UBIK.TEST:COPY" /server sqlserver /user myuser /pwd mypwd /key 0 /setting "\\fileserver\UBIKData\UBIK.TEST.COPY"
====* RESTORE====
dbtool RESTORE /cat UBIK.MANUALTEST03 /server auglnz2sql /user myuser /pwd mypwd /bak "C:\MSSQL\Backup\UBIK.TEST.bak"
dbtool RESTORE /cat UBIK.MANUALTEST04 /server auglnz2sql /user sa /pwd mypwd /bak "C:\MSSQL\Backup\UBIK.TEST.bak" /force true /ndpath "C:\MSSQL\Data\UBIK.TEST.COPY.mdf" /nlpath "C:\MSSQL\Data\UBIK.TEST.COPY.ldf" /odname "UBIK.TEST" /olname "UBIK.TEST_log"