Database Management via Shdbinst.exe
The Shdbinst.exe console utility is used to work with the database, with which you can perform the following operations:
- creating a new database
- restoring a database from an archived copy
- updating the current database.
Shdbinst.exe Parameters
To get a list of supported parameters, you need to run Shdbinst.exe from the command line (cmd.exe) without specifying parameters.
The path to the utility: C:\UCS\StoreHouse_5\Shdbinst.exe
Launch examples
Creating a new database:
Shdbinst.exe /sSDBSERV /fC:\UCS\StoreHouse_5\Database\SH5DB /i22 /tC:\UCS\StoreHouse_5\Database\SH5DBLog /aAdmin /d"New db" /uAdmin /lC:\UCS\StoreHouse_5\Server\shcrtdb64.dll |
Recovering the database:
Shdbinst.exe /sSDBSERV /fC:\UCS\StoreHouse_5\Database\SH5DB /i22 /tC:\UCS\StoreHouse_5\Database\SH5DBLog /aAdmin /d"Restore db" /uAdmin /bC:\UCS\StoreHouse_5\Backup\backup.bkp |
Updating the database:
Shdbinst.exe /sSDBSERV /fC:\UCS\StoreHouse_5\Database\SH5DB /i22 /tC:\UCS\StoreHouse_5\Database\SH5DBLog /aAdmin /d"Update db" /uAdmin /bC:\UCS\StoreHouse_5\Backup\backup.bkp /lc:\UCS\StoreHouse_5\Server\shcrtdb64.dll |
or
Shdbinst.exe /s127.0.0.1 /fC:\UCS\StoreHouse_5\Database\SH5DB /i1024 /tC:\UCS\StoreHouse_5\Database\SH5DBLog /aAdmin /d"Update db" /uAdmin /lc:\UCS\StoreHouse_5\Server\shcrtdb64.dll |
Supported parameters
- /s<Server_name> — the name of the SH5 server for connection
- /f<DB_File_Name> — the name of the DB file, which should include the full path to the file
- /i<DB_Size> — the size of the created database, MB
- /t<Transactions_Log_Name> — the name of the transaction log file, which should include the full path to the file
- /z<Transactions_Log_Size> — the size of the transaction log to be created, MB, 10Mb by default
- /a<Admin_Name> — the name of the DB administrator
- /p<Admin_Password> — DB administrator's password, empty by default
- /d<DB_Description> — DB description, empty by default
- /b<Backup_Copy_File_name> — the name of the backup file when restoring or updating the database, may include the full path to the file
- /l<Control_Library)path> — the path to the shcrtdb64.dll library, is used for creating or updating a database
- /u<User_name> — user name, when the database is loaded
- /v<User_password> — user password, when the database is loaded
Error codes
- 0 Ok
- 1 Invalid parameter
- 2 Parameter not found
- 3 Error initializing domm.dll
- 4 Error initializing sdbcli.dll
- 5 Error executing procedure domm.dll
- 6 Error executing procedure sdbcli.dll
- 7 Unknown error
- 8 Operation aborted by user
Starting the server
To start the server, run Sdba and Sdbserv via the command line.
Launching Sdba Service
- Service name: Sdba or Sdba64
- Display name: Sdbserv assistent or Sdbsrv64 assistent
- Command line: <full_path> + /s parameter.
Example of the command: C:\UCS\StoreHouse_5\Shdbinst>C:\UCS\StoreHouse_5\Server\Sdba64.exe /s
Launching Sdbserv Service
- ServiceName and DisplayName: Sdbserv: + <server_instance_name> or Sdbsrv64: + <server_instance_name>
- Command line: full_path + /s parameter + /n parameter + <server_instance_name>
Example: C:\UCS\StoreHouse_5\Shdbinst>c:\UCS\StoreHouse_5\Server\SdbSrv64.exe /s /nSDBSERV
You can check whether the services have started or not in the processes, in the task manager
Registry Settings
Server Parameters
General Server Parameters
The server parameters are located in HKLM\SOFTWARE\UCS\Sdbserv.2 (root branch).
If the instance name is not specified when starting the server (the /n parameter), the HKLM\SOFTWARE\UCS\Sdbserv branch is used.2\SDBSERV |
Parameters available in the root branch HKLM\SOFTWARE\UCS\Sdbserv.2:
- Autorun (string) is a list of server instances separated by semicolumn for autostart at Windows launch (but not by services)
- RootDir (string) is the directory from which the server and its utilities are started
Server Instance Parameters
The parameters of a specific server instance are stored in the HKLM\SOFTWARE\UCS\Sdbserv.2\<Server_instance_name> branch
Parameters available in the server instance branch:
General Server Parameters
- params (DWORD) - bitmask of the following parameters:
- AutoRepair=1 — to automatically restore the database from the transaction log
- DisableAutoValidation=2 — to prohibit checking the data file when loading while the transaction log recording is broken
- OpenDbReadOnly=4 — the database file is opened only for reading (read only)
- PriorityHigh=8 — to run with high priority
- PriorityIdle=16 — to run with low priority
- ShowInitErrors=64 — initialization errors will be displayed on the screen (ignored for the service)
- SafeMode=128 — only the database file will be loaded without application libraries
If the AutoRepair flag is not set and an incomplete transaction is detected, then
- the service will be stopped
- non-service will be stopped if the ShowInitErrors flag is not set
- otherwise, a dialog box will be displayed on the screen
Logging Parameters
- lgprms (DWORD) - bitmask of the following parameters (optional parameter):
Other Parameters