Previous Page TOC Index Next Page

DATABASE MAINTENANCE


This chapter gives you information on data security and database maintenance. It is divided into following topics

Making Backups

Backups are made to secure the information stored in your database files. If you have lost your database files because of a system failure, you can continue working with the backup database.

You can make backups manually by using SOLID Remote Control, or you can automate the backup operations to be run according to a fixed schedule. To automate backups, see the chapter Entering timed commands at the end of this chapter.


NOTE. Be sure to have enough disk space in the backup directory. You will need space for your database and log files.


To Make a Backup Manually Using SOLID Remote Control

SOLID Server uses a multiversioning technique allowing backups to be made on-line. You need not close the database file or shut down the server. However, it is advisable to automate your backups to be run at non-busy hours. After completing the backup, copy your backup files on tape using your backup software for protection against disk crashes.


NOTE 1. The backup directory entered must be a valid path name in the server operating system! For example, if the server runs on a UNIX operating system, path separators must be slashes, not backslashes.
NOTE 2. The time needed for making a backup is the time that passed between the messages Backup started and Backup completed successfully, which arrive to your SOLID Remote Control MESSAGES page.


Before starting the backup process, a checkpoint is created automatically. This guarantees that the state of a backup database is from the moment the backup process was started. The following files will be copied to the backup directory:

The unnecessary log files are deleted from original directory after successful backup (parameter BackupDeleteLog is set yes by default).

To Correct a Failed Backup

When a backup is completed, you will see a message appear on the backup list in SOLID Remote Control. The first column in this list tells you the status of the backup, which can be either OK or Failed.

If the backup failed, an error message appears on the message list. Correct the cause of the error and try again. The most common causes for failed backups are

Restoring Backups

There are two alternative ways to restore a backup. You can either:

To Return to the State when the Backup was Made

This method will not perform any recovery because no log files exist.

To Revive a Backup Database to the Current State

SOLID Server will automatically use the log files to perform a roll-forward recovery.

Recovering from Abnormal Shutdown

If the server was closed abnormally, i.e. if it was not shut down using the procedures described earlier, SOLID Server will automatically use the log files to perform a roll-forward recovery during the next start up. No administrative procedures are needed to start the recovery.

The message Starting roll-forward recovery appears. After the recovery has been completed, a message will indicate how many transactions were recovered. If no transactions were made since the last checkpoint, this is indicated by the following message
0 transactions recovered.

Logging

Logging guarantees that no committed operations are lost in case of a system failure. When an operation is executed in the server, the same operation is also saved to a log file. The log file is used for recovery in case the server is shut down abnormally.

A backup operation will copy the log and database files to the backup directory and delete the log files from the database directory. You may change the default behavior by changing the parameters BackupCopyLog and BackupDeleteLog in the General section of parameters in solid.ini.

The log file can be written using different modes. The modes differ in the speed and security they offer. The default ping-pong method is the best choice in most cases.

You can set the logging mode using the LogWriteMode parameter in the Logging section of parameters. The different modes are listed in Appendix B Configuration Parameters. The log manager of SOLID Server can run in four different operation modes. The choice of log method depends on the log file media and the level of security needed. The available logging methods are:


TIP For both security and performance reasons, it is a good idea to keep log files and database files on different physical disk devices. If one disk drive is damaged, you will lose either your database files or log files but not both.


Creating Checkpoints

Checkpoints are used to store a consistent state of the database onto the database file. Checkpoints are needed for speeding up the roll-forward recovery after a system failure. In the roll-forward recovery, the database will start recovering transactions from the last checkpoint. The longer it has been since the last checkpoint was created, the more operations are recovered from the log file(s).

To speed up recoveries, checkpoints should be created frequently; however, the server performance is reduced during the creation of a checkpoint. Furthermore, the speed of checkpoint creation depends on the amount of database cache used; the more database cache is used, the longer the checkpoint creation will take. Consider these issues when deciding the frequency of checkpoints. See Appendix B Configuration Parameters for a description of the use of CacheSize parameter.

SOLID Server has an automatic checkpoint creation daemon, which creates a checkpoint after a certain number of writes to the log files. The default checkpoint interval is every 5000 log writes. You may change the value of the parameter CheckpointInterval in the General section of parameters. To learn how to change a parameter value, see the chapter SOLID Server Parameter Settings in this guide.

Before and after a large database operation, you may want to create a checkpoint manually. You can create checkpoints manually by using SOLID Remote Control or you can automate the checkpoint creation using timed commands. To automate checkpoints, see the chapter Entering timed commands at the end of this chapter. Use the following procedure to create a checkpoint manually.


NOTE. There can be only one checkpoint in the database at a time. When a new checkpoint is created, the older checkpoint is automatically erased.


To Create a Checkpoint Manually Using SOLID Remote Control


On non-graphical user interfaces, you can create a checkpoint using the SOLID Remote Control (Teletype) program. Issue the command checkpoint to start checkpoint creation.


Closing the Database

In some cases you may want to prevent users from connect to the server. For example, when you are shutting down a server, you may want to prevent new users from connecting to the server. After closing the database, only connections from SOLID Remote Control will be accepted. Closing the database does not affect existing user connections.

To Close the Database Using SOLID Remote Control

After this, the database is closed and no new connections are accepted (clients will get SOLID Error Message 14506). This is indicated by the message text No new connections allowed.

To Open a Closed Database Using SOLID Remote Control

After this, the database is opened and new connections are accepted. This is indicated by the message New connections allowed.

Changing Database Location

Changing a database location in SOLID Server is as easy as copying a file from one directory to another.


NOTE. To copy a database file, you need to shut down the server to release the operating system file locks on the database file and log files.


To Change Database Location

Running Several Servers on One Computer

In some cases, you may want to run two or more databases on one computer. For example, you may need a configuration with a production database and a test database running on the same computer.

SOLID Server is able to use one database per database server, but you can start several servers each using its own database file. To make these servers use different databases, either start the server processes from the directories your databases are located in or give the locations of configuration files by using the command line option -c directory-name to change the working directory. Remember to use different network names for each server.

In the SOLID Server Windows version, there is a limitation to using several servers in one computer. Windows memory management allows only one SOLID Server to be run at a time. You can, however, trick Windows by renaming the other SOLID executable. For example, you can run SOLID.EXE and SOLID2.EXE at the same time without problems.

Entering Timed Commands

SOLID Server has a built-in timer, which allows you to automate your administrative tasks. You can use timed commands to execute system commands, to create backups, checkpoints and database status reports, to open and close databases, to disconnect users or to shut down servers.

To Enter a Timed Command Using SOLID Remote Control


NOTE. The format used is HH:MM (24-hour format).


To Enter a Timed Command Manually

Timed commands can be entered manually by editing the At parameter of the [Srv] section in the solid.ini file. The syntax is:

At-string := timed-command[, timed-command]

timed-command := [day] HH:MM command argument
day := sun | mon | tue | wed | thu | fri | sat

If the day is not given, the command is executed daily.

Example:

[Srv]

At=20:30 makecp,21:00 backup,sun 23:00 shutdown

Arguments and the Defaults for the Different Timed Commands

Command

Argument

Default

backup

backup directory

the default backup directory that is set in the configuration file

throwout

user name, all

no default, argument compulsory

checkpoint

no arguments

no default

shutdown

no arguments

no default

report

report file name

no default, argument compulsory

system

system command

no default

open

no arguments

no default

close

no arguments

no default

USING SOLID DATABASE TOOLS

This chapter describes SOLID Database Tools, a set of utilities for performing various database tasks. Not all SOLID Tools are necessarily part of the standard product delivery, and their availability on some platforms may be limited. For information about SOLID Database Tools, contact your SOLID sales representative or Solid Online Services on our Web server. The service is located at:
http://www.solidtech.com/

Command Line Arguments

This paragraph lists and describes the available command line arguments that can be used with all SOLID Database Tools. The tool-specific options are listed with the usage of each tool.


NOTE. When there is a contradiction in the command line, the tool gives you a list of the possible options as a result. Please check the command line you entered.


Command Line Arguments:

Argument

Description

server name

This network name of the SOLID Server that you are connected to. Logical Data Source Names can also be used with tools; refer to the chapter Network Connections for further information. The given network name must be enclosed in quotes.

user name

This is required to identify the user and to determine which rights he has. Without appropriate rights execution is denied.

password

This password given to the user for accessing the database.

table name

The name of the table accessed. * can be used with SOLID Export to export all tables with one command line.

control file

The name of the control file that defines the import file used with SOLID SpeedLoader. A file of this type is produced by executing SOLID Export.

SOLID SpeedLoader

SOLID SpeedLoader is a tool for loading data from external ASCII files into a SOLID database. SOLID SpeedLoader can load data in a variety of formats and produce detailed information of the loading process into a log file. The format of the import file, i.e., the file containing the external ASCII data, is specified in a control file.

There are two versions of SOLID SpeedLoader, the standalone version and the network version. They both perform the same task but in different manners.

Control File

The control file provides information on the structure of the import file. It gives the following information:


NOTE. Each import file requires a separate control file. SOLID SpeedLoader loads data into one table at a time.


The control file format is somewhat similar to control file structures found in other database management systems, i.e., Oracle and DB/2.


NOTE 1. The table must exist in the database in order to perform data loading.
NOTE 2. Schema support is not currently available in SOLID Speedloader.


Import File

The import file must be of ASCII type. The import file may contain the data either in a fixed or a delimited format:

Data fields within a record may be in any order specified by the control file.


NOTE 1. Data in the import file must be of a suitable type. E.g., numbers that are presented in a Float format cannot be loaded into a field of Integer or Smallint type.
NOTE 2. Data of Varbinary and Long Varbinary type are hexadecimal encoded in the import file.


Message Log File

During loading, SOLID SpeedLoader produces a log file containing the following information:

If the log file cannot be created, the loading process is terminated. By default the name of the log file is generated from the name of the import file by substituting the file extension of the import file with the file extension .log. For example, my_table.ctr creates the log file my_table.log. To specify another kind of file name, use the option -l.

Configuration File

A configuration file is not required for SOLID SpeedLoader. The configuration values for the server parameters are included in the SOLID Server configuration file solid.ini.

Client copies of this file can be made to provide connection information required for SOLID Speedloader. If no server name is specified in the command line, SOLID SpeedLoader will choose the server name it will connect to from the server configuration file. E.g., to connect to a server using the NetBIOS protocol and with the server name SOLID, the following lines should be included in the configuration file:

[Com]

Connect=netbios SOLID

Invoking SOLID SpeedLoader

SOLID SpeedLoader is invoked with the command solload or solloads followed by various arguments. If you invoke SOLID SpeedLoader with no arguments, you will see a summary of the arguments with a brief description, i.e. their usage. The command line syntax is:

solload [options] [server-name] <user-name> <password> <control-file> 

or

solloads [options] [server-name] <user-name> <password> <control-file> 

The possible options are in the following table:

Option

Description

-b<records>

Number of records to commit in one batch

-c<dir>

Change working directory

-l<filename>

Write log entries to this file

-L<filename>

Append log entries to this file

-n<records>

Insert array size (network version)

-t

Print load time

-x emptytable

Load data only if there are no rows in the table

-x errors:<count>

Maximum error count

-x nointegrity

No integrity checks during load (standalone version)

-x skip:<records>

Number of records to skip

-?

Help = Usage

Control File Syntax

The control file syntax has the following characteristics:

SOLID SpeedLoader reserved words must be enclosed in quotes if they are used as data dictionary objects, that is, table or column names. The following list contains all reserved words for the SOLID SpeedLoader control file:

AND

ANSI

APPEND

BINARY

BLANKS

BY

CHAR

CHARACTERSET

DATA

DATE

DECIMAL

DOUBLE

ENCLOSED

ERRORS

FIELDS

FLOAT

IBMPC

INFILE

INSERT

INTEGER

INTO

LOAD

LONG

MSWINDOWS

NOCNV

NOCONVERT

NULLIF

NULLSTR

NUMERIC

OPTIONALLY

OPTIONS

PCOEM

POSITION

PRECISION

PRESERVE

REAL

REPLACE

SCAND7BIT

SKIP

SMALLINT

TABLE

TERMINATED

TIME

TIMESTAMP

TINYINT

VARBIN

VARCHAR

WHITESPACE

The control file begins with the statement LOAD DATA followed by several statements that describe the data to be loaded. Only comments or the OPTIONS statement may optionally precede the LOAD DATA statement.

The following table describes the full syntax of the control file.

Syntax Element


control-file

::= [option-part] load-data-part into-table-part

option-part

::= OPTIONS (options)

options

::= option [, option ]

option

::= [SKIP = 'int_literal'] | [ERRORS = 'int_literal']

load-data-part

::= LOAD [DATA] [characterset-specification] [DATE date_mask] [TIME time_mask]
[TIMESTAMP timestamp_mask] [INFILE filename] [PRESERVE BLANKS]

characterset-specification

::= CHARACTERSET
{ NOCONVERT | NOCNV | ANSI | MSWINDOWS | PCOEM | IBMPC | SCAND7BIT }

into-table-part

::= INTO TABLE tablename [APPEND | INSERT | REPLACE]
[FIELDS TERMINATED BY
{ WHITESPACE | hex_literal |'char']}
[FIELDS [OPTIONALLY] ENCLOSED BY
{"char'"| hex_literal} [AND "char" | hex_literal]] (column_list)

hex_literal

::= X'hex_byte_string'

column_list

::= column [, column]

column

::= column_name datatype_spec
[POSITION ('int_literal' {: | -} 'int_literal')]
[DATE date_mask ] [TIME time_mask ]
[TIMESTAMP timestamp_mask ]
[NULLIF BLANKS | NULLIF NULLSTR| NULLIF 'string' | NULLIF (('int_literal' {: | -} 'int_literal') = 'string')]

datatype_spec

::= {BINARY | CHAR [ length ] | DATE |
DECIMAL [ ( precision [ , scale ] ) ] | DOUBLE PRECISION | FLOAT [ ( precision ) ] | INTEGER | LONG VARBINARY | LONG VARCHAR | NUMERIC [ ( precision [ , scale ] ) ] | REAL | SMALLINT | TIME |
TIMESTAMP [ ( timestamp precision ) ] | TINYINT | VARBINARY | VARCHAR [ ( length ) ] }

The following paragraphs explain syntax elements and their use is in detail.

CHARACTERSET

The CHARACTERSET keyword is used to define the character set used in the input file. If the CHARACTERSET keyword is not used or if it is used with the parameter NOCONVERT or NOCNV, no conversions are made. Use the parameter ANSI for the ANSI character set, MSWINDOWS for the MS Windows character set, PCOEM for the ordinary PC character set, IBMPC for the IBM PC character set, and SCAND7BIT for the 7-bit character set containing Scandinavian characters.

DATE, TIME, and TIMESTAMP

These keywords can be used in two places with different functionality:


NOTE 1. Masks used as part of the load-data-part element must be in the following order: DATE, TIME, and TIMESTAMP. Each is optional.
NOTE 2. Data must be of the same type in the import-file, the mask, and the column in the table into which the data is loaded.


The following table shows the available data masks:

Data Type

Available Data Masks

DATE

YYYY/YY-MM/M-DD/D

TIME

HH/H:NN/N:SS/S

TIMESTAMP

YYYY/YY-MM/M-DD/D HH/H:NN/N:SS/S

In the above table, year masks are YYYY and YY, month masks MM and M, day masks DD and D, hour masks HH and H, minute masks NN and N, and second masks SS and S. Masks within a date mask may be in any order, e.g., a date mask could be ‘MM-DD-YYYY’. If the date data of the import file is formatted as 1995-01-31 13:45:00, use the mask YYYY-MM-DD HH:NN:SS.

PRESERVE BLANKS

The PRESERVE BLANKS keyword is used to preserve all blanks in text fields.

into-table-part

The into-table-part element is used to define the name of the table and columns that the data is inserted into.

FIELDS TERMINATED BY

The FIELDS TERMINATED BY keyword is used to define the character used to distinguish where fields end in the input file.

The ENCLOSED BY keyword is used to define the character that precedes and follows data in the input file.

POSITION

The POSITION keyword is used to define a field's position in the logical record. Both start and end positions must be defined.

NULLIF

The NULLIF keyword is used to give a column a NULL value if the appropriate field has a specified value. An additional keyword specifies the value the field must have. The keyword BLANKS sets a NULL value if the field is empty; the keyword NULL sets a NULL value if the field is a string 'NULL'; the definition 'string' sets a NULL value if the field matches the string 'string'; the definition '((start : end) = 'string')' sets a NULL value if a specified part of the field matches the string 'string'.

Loading Fixed-format Records

Examples of the control file when loading data from a fixed-format import file:

-- EXAMPLE 1

LOAD DATA
INFILE 'EXAMP1.DAT'
INTO TABLE SUPPLIERS (
NAME POSITION(01:19) CHAR,
ADDRESS POSITION(20:40) VARCHAR,
ID POSITION(41:48) INTEGER ) -- EXAMPLE 2
OPTIONS (SKIP = 10, ERRORS = 5)
-- Skip the first ten records. Stop if
-- errorcount reaches five.
LOAD DATA
INFILE 'sample.dat'
-- import file is named sample.dat
INTO TABLE TEST1 (
ID INTEGER POSITION(1-5),
ANOTHER_ID INTEGER POSITION(8-15),
DATE1 POSITION(20:29) DATE 'YYYY-MM-DD',
DATE2 POSITION(40:49) DATE 'YYYY-MM-DD' NULLIF NULL)

Loading Variable-length Records

Examples of the control file when loading data from a variable-length import file:

-- EXAMPLE 1

LOAD DATA
INFILE 'EXAMP2.DAT'
INTO TABLE SUPPLIERS
FIELDS TERMINATED BY ','
(NAME VARCHAR, ADDRESS VARCHAR, ID INTEGER) -- EXAMPLE 2
OPTIONS (SKIP=10, ERRORS=5)
-- Skip the first ten records. Stop if
-- errorcount reaches five.
LOAD
DATE 'YYYY-MM-DD HH:NN:SS'
-- The date format in the import file
INFILE 'sample.dat'
-- The import file
INTO TABLE TEST1
-- data is inserted into table named TEST1
FIELDS TERMINATED BY X'2C'
-- Field terminator is HEX ',' == 2C
-- This line could also be:
-- FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '[' AND ')'
-- Fields may also be enclosed
-- with '[' and ')'
(
ID INTEGER,
ANOTHER_ID DECIMAL(2),
DATE1 DATE(20) DATE 'YYYY-MM-DD HH:NN:SS',
DATE2 NULLIF NULL
)
-- ID is inserted as integer
-- ANOTHER_ID is a decimal number with 2
-- digits.
-- DATE1 is inserted using the datestring
-- given above
-- The default datestring is used for DATE2.
-- If the column for DATE2 is 'NULL' a NULL is
-- inserted.

Running a Sample Load Using Solload

To Run a Sample Load Using Solload

solload "shmem solid" dba dba delim.ctr 

The user name and password are assumed to be 'dba'. To use the fixed length control file, use the following command line:

solload "shmem solid" dba dba fixed.ctr 

The output of a successful loading using delim.ctr will be:

SOLID Speed Loader v.02.20.0004
(C) Copyright Solid Information Technology Ltd 1992-1997
Load completed successfully, 19 rows loaded.

The output of a successful loading using fixed.ctr will be:

SOLID Speed Loader v.02.20.0004
(C) Copyright Solid Information Technology Ltd 1992-1997
Load completed successfully, 19 rows loaded.

Running a Sample Load Using Solloads

To Run a Sample Load Using Solloads

solloads dba dba delim.ctr

The user name and password are assumed to be 'dba'. To use the fixed length control file, use the following command line:

solloads dba dba fixed.ctr 

The output of a successful loading using delim.ctr will be:

SOLID Speed Loader v.02.20.0004
(C) Copyright Solid Information Technology Ltd 1992-1997
Load completed successfully, 19 rows loaded.

The output of a successful loading using fixed.ctr will be:

SOLID Speed Loader v.02.20.0004
(C) Copyright Solid Information Technology Ltd 1992-1997
Load completed successfully, 19 rows loaded.

Hints to Speed up Loading

The following hints can be used to ensure that loading is done with maximum performance:

To disable logging the LogEnabled parameter needs to be used. The following lines in the solid.ini file will disable logging:

[Logging]

LogEnabled=no

After the loading has been completed, remember to enable logging again. The following line in the solid.ini file will enable logging:

[Logging]

LogEnabled=yes

NOTE. Running the server with logging disabled is strongly discouraged. If logs are not written, no recovery can be made if an error occurs due to power failure, disk error etc.


SOLID Export

SOLID Export is a product for unloading data from a SOLID database to ASCII files. SOLID Export produces both the import file, i.e., the file containing the exported ASCII data, and the control file that specifies the format of the import file. SOLID SpeedLoader can directly use these files to load data into a SOLID database.


NOTE. The user name used for performing the export operation must have select rights on the table exported. Otherwise no data is exported.


Invoking SOLID Export

SOLID Export is invoked with the command solexp. If you invoke solexp with no arguments, you'll see a summary of the arguments with a brief description. The command line syntax is:

solexp [options] [servername] <username> <password> <tablename|*>

The possible options are

Option

Description

-c<dir>

Change working directory

-e<sql-string>

Execute SQL string for export

-f<filename>

Execute SQL string from file for export

-h, -?

Help = Usage

-l<filename>

Write log entries to this file

-L<filename>

Append log entries to this file

-o<filename>

Write exported data to this file

-s<schemaname>

Use only this schema for export


NOTE 1. The symbol * can be used to export all tables with one command. However, it cannot be used as a wildcard.
NOTE 2. The -tTABLENAME (Export table) option is still supported in order to keep old scripts valid.


SOLID Data Dictionary

SOLID Data Dictionary is a product for retrieving data definition statements from a SOLID database. SOLID Data Dictionary produces an SQL script that contains data definition statements describing the structure of the database. The generated script contains definitions for tables, views, procedures, sequences, and events.


NOTE 1. User and role definitions are not listed for security reasons.
NOTE 2. The user name used for performing the export operation must have select right on the tables. Otherwise the connection is refused.


Invoking SOLID Data Dictionary

SOLID Data Dictionary is invoked with the command soldd. If you invoke soldd with no arguments, you'll see a summary of the arguments with a brief description. The command line syntax is:

soldd [options] [servername] <username> <password> [tablename]

The possible options are:

Option

Description

-c<dir>

Change working directory

-h, -?

Help = Usage

-o<filename>

Write data definitions to this file

-O<filename>

Append data definitions to this file

-s<schemaname>

List definitions from this schema only

-x indexonly

List index definitions only

-x tableonly

List table definitions only

Example:

soldd -odatabase.sql "tcp database_server 1313" dbadmin f1q32j4

NOTE 1. If no table name is given, all definitions are listed to which the user has rights.
NOTE 2. The -ttablename option is still supported in order to keep old scripts valid.


SOLID Remote Control (Teletype)

With SOLID Remote Control (Teletype), commands can be given at the command line, command prompt, or by executing a script file that contains the commands.


NOTE. The user performing the administration operation must have administrator’s rights, or the connection will be refused.


Invoking SOLID Remote Control (Teletype)

SOLID Remote Control (Teletype) is invoked with the command solcon. On Novell Netware, you start SOLID Remote Control (Teletype) with the command load solcon at the command prompt. SOLID Remote Control (Teletype) connects to the first server specified in the Connect parameter in the solid.ini file. If you start SOLID Remote Control (Teletype) with no arguments, you'll be prompted for the database administrator’s user name and password. The command line syntax is:

solcon [options] [servername] [username password]

The possible options are:

Option

Description

-c<dir>

Change working directory

-e<string>

Execute command string

-f<filename>

Execute command string from file

-h, -?

Help = Usage

You can give the connection information at the command line to override the connect definition in solid.ini.

Example:

solcon "spx solid"

Also the administrator's user name and password can be given at the command line.

Example:

solcon "tcp localhost 1313" admin iohi4y

Using SOLID Remote Control (Teletype)

After the connection to the server has been established, the command prompt appears.

Available commands are described in the following table:

Command

Abbreviation

Explanation

backup

bak

Makes a backup of the database. The default backup directory is the one specified in the configuration file. The backup directory may also be given as an argument.

backuplist

bls

Displays a status list of last backups.

close

clo

Closes server connections; no new connections are allowed.

errorcode

ec

Displays a description of an error code. Give the code number as an argument.

exit

ex

Exits SOLID Remote Control.

help

?

Displays available commands.

hotstandby

hsb

Executes a hot standby command.

makecp

mcp

Makes a checkpoint.

messages

mes

Displays server messages.

monitor

mon

Sets server monitoring on and off.

open

ope

Opens server connections; new connections are allowed.

report

rep

Generates a report of server info to a file given as an argument.

shutdown

sd

Shuts down SOLID Server.

status

sta

Displays server statistics.

throwout

to

Throws out users from SOLID Server. To throw out a specified user, give the user id as an argument. To throw out all users, use the keyword ALL as an argument.

userlist

ul

Displays a list of users.

version

ver

Displays server version info.

You can execute all commands either using this interface or giving them at the command line with the -e option or in a text file with the
-f option. Commands can be given using either the complete command name or its abbreviation.

SOLID SQL Editor (Teletype)

With SOLID SQL Editor (Teletype), statements can be given at the command line, command prompt, or by executing a script file that contains the SQL statements.


NOTE. The user performing SQL statements must have appropriate user rights on the corresponding tables, or the connection will be refused.


Starting SOLID SQL Editor (Teletype)

SOLID SQL Editor (Teletype) is started by entering the command solsql. On Novell Netware, you start SOLID SQL Editor (Teletype) with the command load solsql at the command prompt. SOLID SQL Editor (Teletype) connects by default to the first server specified in the Connect parameter in solid.ini file and prompts for a user name and password. The command line syntax is:

solsql [options] [servername] [username] [password] [filename]

The possible options are:

Option

Description

-a

Auto commit every statement

-c

Change working directory

-e<sql-string >

Execute SQL string

-f<filename>

Execute SQL string from file

-h, -?

Help = Usage

-o<filename>

Write result set to this file

-O<filename>

Append result set to this file

-s<schemaname>

Use only this schema

-t

Print execution time per command

-x onlyresults

Print only rows


NOTE. If user name and password are given as command line arguments also the server name must be given as a command line argument. Also if the name of the SQL script file is given as a command line argument (not with the option -f), the server name, user name and password must also be given as command line arguments.


Using SOLID SQL Editor (Teletype)

Executing SQL Statements

After the connection to the server has been established a command prompt appears. SOLID SQL Editor (Teletype) executes SQL statements terminated by a semicolon.

Example:

create table testtable (value integer, name varchar);
insert into testtable (value, name) values (31, ‘Duffy Duck’);
select value, name from testtable;
drop table testtable;

Exiting SOLID SQL Editor

To exit from SOLID SQL Editor (Teletype) enter the command:

exit;

Executing an SQL Script

To execute an SQL script from a file, the name of the script file must be given as a command line parameter:

solsql server-name user-name password file-name

All statements in the script must be terminated by a semicolon. SOLID SQL Editor (Teletype) exits after all statements in the script file have been executed.

Example:

solsql "tcp localhost 1313" admin iohe4y tables.sql

NOTE. Remember to commit work at the end of the SQL script or before exiting SOLID SQL Editor (Teletype). If an SQL-string is executed with the option -e, commit can only be done using the -a option.


Tools Sample: Reloading a Database

This example demonstrates how a SOLID Server database can be reloaded to a new one. At the same time the use of each SOLID tool is introduced with an example. This reload is a useful procedure since it shrinks the size of the database file solid.db to a minimum.

To Reload the Database:

Walkthrough

In this example the server name is SOLID and the protocol used for connections is Shared Memory. Therefore, the network name is "ShMem SOLID". The database has been created with the user name "dbadmin" and the password "password".


NOTE. It is recommended that a backup is created of the old database before it is deleted. This can be done using SOLID Remote Control (Teletype).



NOTE. No server name is needed with solloads.exe since the server is off-line. SOLID SpeedLoader (network) has the required functionality of a database server embedded.


Batch files that can be used are:

Previous Page TOC Index Next Page

Copyright © 1992-1997 Solid Information Technology Ltd All rights reserved.