Creating a Daily Copy to Demo on a Server Install
Hint Ref: 020701150005
Hint Date: 15/01/2007
The demo service needs to be setup as a second service bearing in mind the hint: One of two database services on the same server will not connect.
Copying the main program to demo on a server install requires shutting down the demo service. The following batch file will do this, copy the database and restart the demo service:
L:\SM4WIN\Space Manager SM4WIN Installs\Central Server Copy to Demo\Copy to Demo (Server).bat
net stop "adaptive server anywhere - testsql"
- This stops the database service testsql
del "c:\program files\spaceman32\demo\*.*" /F /Q
- This deletes the existing demo database files. Not strictly necessary but it doesn't hurt!
dbbackup -c "uid=spaceman;pwd=namecaps;eng=Demo;dbn=testdemo;links=tcpip" -d -t -y "c:\program files\spaceman32\database\test
- Copies the live database into the demo location. Replace eng with the server name, dbn with the database name and the location in quotes at the end with the demo location
net start "adaptive server anywhere - testsql"
- This restarts the demo database service
The batch file can be scheduled to run before the site opens using the scheduler in START - PROGRAMS - ACCESSORIES - SYSTEM TOOLS - Scheduled Tasks
(Please Note: This Procedure can be destructive and should only be used by Advanced Users. RADical Systems (UK) Limited or its Partners cannot be held responsible, in anyway, for any consequence of using this or any other Database Function, Procedure or SQL command. Responsibility resided solely with the user.
However, it is highly recommended that a full and valid Space Manager database backup is taken and verified before making any changes to the database.)