![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I use the following to create a service: dbsvc @dbsvc.ini where dbsvc.ini contains: ### Network or Standalone -t Network ### Automatic or Manual Start -s Automatic ### Account name -a domain\useraccount ### Account password -p password ### Display Name -sn "Application Name" ### Description -sd "Application Description" ### No confirmations -y ### Service Name -w "Servname" ### Locaion of Server Executable "D:\Program Files\application\dbsrv10.exe" ### Server Start Line Configuration file "@D:\DB\SwitchFile.Txt" This works, but it seems SwitchFile.txt is expanded when the service is created. Is it possible to tell the service to use the contents of SwitchFile.Txt when the service is started? Thanks, Roger SQLAnywhere 10.0.1.3960 (W2003SP2Std) |
#3
| |||
| |||
|
|
so it doesn't know about this little parsing quirk in dbsvc. |
|
If you specify the @file on the command line, this will work as you expect. Remove @D:\DB\SwitchFile.Txt from the dbsvc.ini file and execute: dbsvc @dbsvc.ini @D:\DB\SwitchFile.Txt This happens because @files can be nested, so one file can load another. dbsvc parses its command line parameters a little differently than other tools, so that @files specified before the service executable are read in (eg. dbsvc.ini) but those specified after the service executable are left as-is. The code to read from @files is shared among all the tools (and the server, and MobiLink, etc.) so it doesn't know about this little parsing quirk in dbsvc. Graeme Perrow Senior Software Developer gperrow _at_ ianywhere _dot_ com Sybase iAnywhere Engineering SQL Anywhere Developer Community http://www.sybase.com/developer/libr...ere-techcorner SQL Anywhere Blog Center http://www.sybase.com/sqlanyblogs Roger Holmes wrote: Hi, I use the following to create a service: dbsvc @dbsvc.ini where dbsvc.ini contains: ### Network or Standalone -t Network ### Automatic or Manual Start -s Automatic ### Account name -a domain\useraccount ### Account password -p password ### Display Name -sn "Application Name" ### Description -sd "Application Description" ### No confirmations -y ### Service Name -w "Servname" ### Locaion of Server Executable "D:\Program Files\application\dbsrv10.exe" ### Server Start Line Configuration file "@D:\DB\SwitchFile.Txt" This works, but it seems SwitchFile.txt is expanded when the service is created. Is it possible to tell the service to use the contents of SwitchFile.Txt when the service is started? Thanks, Roger SQLAnywhere 10.0.1.3960 (W2003SP2Std) |
![]() |
| Thread Tools | |
| Display Modes | |
| |