Sybase 12.4.2 User Manual

Page 52

Advertising
background image

Using command-line switches

32

asiqsrv12 mydb.db sample.db

Naming databases

You can name databases by supplying a

-n

switch following the database file.

For example, the following command line starts a database and names it:

asiqsrv12 mydb.db -n MyDB

Naming a database lets you use a nickname in place of a file name that may be
difficult to remember.

Naming the server

You name the server by supplying a

-n

switch before the first database file. For

example, the following command line starts a server named

Cambridge_sample

and the

sample

database on that server:

asiqsrv12 -n Cambridge_sample sample.db -gm 10 -gp 4096

Putting the host name, in this case Cambridge, at the start of the server name is
a useful convention. It is especially important in a multiuser, networked
environment where shared memory will be used for local database
connections. This convention ensures that all users will be able to connect to
the correct database, even when other databases with the same name have been
started on other host systems.

To allow Adaptive Server IQ to locate the server no matter what character set
is in use, include only seven-bit ASCII (lower page) characters in the server
name. For more information on character sets, see Chapter 9, “International
Languages and Character Sets”

Specifying a server name lets you start a database server with no database
loaded. The following command starts a server named

Galt

with no database

loaded:

asiqsrv12 -n Galt -gm 10 -gp 4096

Note

Although you can start a server by relying on the default server name, it

is better to include both the server name and the database name, and to make
the two names different. This approach helps users distinguish between the
server and the databases running on it. You must specify the server name in
order to start the server without starting a specific database.

For information about starting databases on a running server, see “Starting and
stopping databases”.

Case sensitivity and
naming conventions

Server names and database names are case insensitive on Windows NT, and
case sensitive on UNIX.

Advertising