Loading a database means storing data, usually from an existing TDT file, into an already-created database. Several options are available which control merging of TDTs, standardization, and handling of indirect data.
sthorman
and select the databases
menu. Select the database you just created and load it with
the file test.tdt
.
% sthorman
Version: sthorman 4.62
....................................................
. STHORMAN -- Serial THOR Manager Program. .
. .
. Enter "?" for help at any prompt. .
. The menu selection "." goes to top-level menu. .
....................................................
STHORMAN needs to be connected to a server.
Enter machine the server is running on: ("dia")
Enter port (service) of server: ("thor")
Enter username: ("jj")
Enter server username's password:
Connected to new server.
Current service: dia:thor
SERVER MENU (TOP LEVEL MENU):
1) Connect to a new server
2) List server's version
3) List current users
4) Change server security...
5) Databases...
6) Send message to users...
7) Evict user...
0) Quit
Enter menu selection (or '?'): 5
DATABASE MENU:
1) List known databases
2) Change database search-path...
3) Get database information...
4) Create a database...
5) Load a database
6) Dump a database
7) Crunch a database
8) Change a database's configuration...
9) Destroy a database
10) Send message to users of a database...
11) Evict users of a database...
0) Go back to server menu
Enter menu selection (or '?'): 5
40) /daylight/thordb/test
41) /daylight/thordb/test_datatypes
42) /daylight/thordb/test_indirect
43) /daylight/thordb/uncan-mer
44) /daylight/thordb/uncan-mer_datatypes
45) /daylight/thordb/uncan
46) /daylight/thordb/uncan_datatypes
47) /daylight/thordb/z
48) /daylight/thordb/z_datatypes
Enter number of existing database: 40
Enter WRITE password:
Enter TDT file to load: test.tdt
What should happen when TDTs being loaded are already in
the database? Choices are:
1) MERGE existing data with new data.
2) OVERWRITE existing data (discard old data, replace with new data).
3) DON'T OVERWRITE, leave existing data alone (discard new data).
Enter menu selection : 1
Log errors to a file? ("yes")
Enter filename for logging errors: load.log
Minor/Major report every (1/50) TDTs: ("yes")
Number of errors to accept before pausing?
(0 continues to the end): 100
Database ............................ /daylight/thordb/test.THOR
TDT file ............................ test.tdt
Error log file ...................... load.log
Load mode ........................... standardize TDTs
merge with existing TDTs
Report frequency (minor/major) ...... 1/50
Error limit (before pausing) ........ 100
Load above database? ("yes")
Loading database.
.............w.. 16 TDTs
16 TDTs stored, 1 warnings, 0 errors.
Database loaded.
tdtcount -VERBOSE TRUE
on each file.
In this way verify that the data has been stored. Are there
any differences in the files? If so, examine them and
try to explain why.
DATABASE MENU:
1) List known databases
2) Change database search-path...
3) Get database information...
4) Create a database...
5) Load a database
6) Dump a database
7) Crunch a database
8) Change a database's configuration...
9) Destroy a database
10) Send message to users of a database...
11) Evict users of a database...
0) Go back to server menu
Enter menu selection (or '?'): 6
Dump data from database: /daylight/thordb/test.THOR? ("yes")
Enter READ password:
Enter TDT file to make: z.tdt
Keep indirect-references? ("yes")
Dump TDTs in MULTIPLE LINE format? ("yes")
(one line per dataitem)
Dump entire database? ("yes")
Minor/Major report every (1/50) TDTs: ("yes")
Database ............................ /daylight/thordb/test.THOR
TDT file ............................ z.tdt
Indirect-references ................. keep as indirect-references
Dump format ......................... one line per dataitem
TDT limit ...........................
thorload
requires that all parameters
are specified on the command line. Here is an example:
thorload test < test.tdt
thorlist
,
and again compare with the input file using tdtcount
.
% thorlist test > z.tdt
Enter server access password for dia:thor:mug >>
Enter password for database test@dia:thor:* >>
...
Done: 30 TDTs written, 60060 bytes total