![]() | ![]() |
Home |
|
|
System Administration Guide Supplement for OS/2 |
|
| Appendix B: System Administration Guide Examples |
This appendix provides OS/2 examples for the Transact-SQL commands and procedures introduced in the System Administration Guide . For background information on these examples, see the corresponding chapters of the System Administration Guide .
The following example shows the command used to start a mirrored master device:
sqlsrvr -dc:\masters\master.dat
-rd:\mirrors\masterm.dat
-ec:\sql10\install\errorlog
This section provides examples on how to use the dump and load commands for backup, recovery, and log truncation. Refer to Chapter 8 of the System Administration Guide for background information on these examples.
The Sytron tape backup device drivers and support software can be used with a compatible tape device to provide tape backups. You must install the tape device and the Syplus tape backup software on your system. Verify that the tape device is functioning properly as a standard tape backup system.
After the tape device has been installed, you must:
DEVICE=D:\SYPLUS\SYFILES\TBS2150B.SYSRefer to Sytron Syplus documentation for more information.
Set the SYTAPE: variable within config.sys to the path of the corresponding Syplus Dynamic Link Libraries (DLL's). For example:
SET SYTAPE:=D:\SYPLUS\SYFILES\TBS2150B.DLL
Once DEVICE and SYTAPE: are properly configured, you can reference SYTAPE: as any standard OS/2 device.
The following example shows how to use the tape drive configured as SYTAPE: for dumps and loads:
dump database pubs2 to "SYTAPE:" capacity=100000
load database pubs2 from "SYTAPE:"
Note: Always specify the capacity in kilobytes when you use the dump database command to dump a tape device.
The following example dumps to and loads from a remote OS/2 Backup Serverä named REMOTE_BKP_SERVER:
dump database pubs2
to "SYTAPE:" capacity=100000
at REMOTE_BKP_SERVER
load database pubs2
from "SYTAPE:"
at REMOTE_BKP_SERVER
The following example dumps and loads a transaction log using the default Backup Server file name with the file clause:
dump tran publications
to "SYTAPE:"
load tran publications
from "SYTAPE:"
with file = "cations930590E100"
The following example uses a user-defined file naming convention with the file clause. The 15-character file name, mydb93jul201800 , identifies the database ( mydb ), the date (July 20, 1993), and the time (18:00, or 6:00 p.m.) the dump was made. The load command advances the tape to mydb93jul201800 before loading. The example file names are valid only for systems that use the HPFS file system. If you are using a FAT-based file system, file names are limited to 8 characters with a 3-character extension:
dump database mydb
to "SYTAPE:" capacity=100000
with file = "mydb93jul201800"
load database mydb
from "SYTAPE:"
with file = "mydb93jul201800"
The following examples return header information for the first file and then for the file mydb9229510945 :
load database mydb
from "SYTAPE:"
with headeronly
load database mydb
from "SYTAPE:"
with headeronly, file = "mydb9229510945"
This section provides examples on how to restore the master, model and sybsystemprocs databases. Refer to Chapter 9 of the System Administration Guide for background information on these examples.
This example rebuilds the master database on a 17MB (8704 2K pages) master device:
bldmastr -d c:\devices\master.dat -s8704 -m
The following command starts SQL Server in master-recover mode using the -m option:
c:\sql10\bin\sqlsrvr -dc:\masters\master.dat
-sSYBASE -ec:\sql10\install\errorlog
-ic:\sql10\ini -m
The following example loads the most recent backup of the master database from disk with the load database command. After the load database command is completed successfully, SQL Server automatically shuts itself down. Watch for any error messages during the load and during the shutdown:
load database master from "SYTAPE:"
The following example commands run the instmodl script to build a new model database:
cd %sql10%\scripts
isql -Usa -P password -S server_name < instmodl
Where password and server_name are the values for your system.
The following buildmaster command restores the model database without affecting master :
bldmastr -d c:\devices\master.dat -x
The following example commands run the installmaster script:
cd %sql10%\scripts
isql -Usa -P password -S server_name < instmstr
Where password and server_name are the values for your system.
The following example shows how to restore a backup of the sybsystemprocs database with the load database command:
load database sybsystemprocs from "SYTAPE:"
|
|