Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (Français) » SQL Anywhere Server - Database Administration » Starting and Connecting to Your Database » The database server » Database options

 

-n database option

Sets the name of the database. The -n database option must be specified after the database-file, and applies only to that database.

Syntax
{ dbsrv11 | dbeng11 } [ server-options ] database-file -n string ...
Applies to

All operating systems and database servers.

Remarks

Both database servers and databases can be named. Since a database server can load several databases, the database name is used to distinguish the different databases.

By default, the database receives the name of the database file with the path and extension removed. For example, if the database is started on samples-dir\demo.db and no -n option is specified, the name of the database is demo.

Database names cannot:

You can only use the database name utility_db to connect to the SQL Anywhere utility database. See Using the utility database.

See also
Example

The following example starts the database server with a cache size of 3 MB, loads the database, and names the database test. Since no database server name has been specified, the server takes its name from the first database, so the server's name is also test.

dbsrv11 -c 3MB "c:\mydata.db" -n "test"
There are two -n options

The -n option is position dependent. If it appears before a database file name, it is a server option and names the server. If it appears after a database file name, it is a database option and names the database.

For example, the following command names the server SERV and the database DATA:

dbsrv11 -n SERV c:\mydata.db -n DATA

See -n server option.