ASA Database Administration Guide
Connection and Communication Parameters
Connection parameters
For use when starting a database that is not already running. The DatabaseFile connection parameter indicates which database file you want to load and connect to.
If you want to connect to an already running database, use the DatabaseName (DSN) parameter.
Embedded databases
String
There is no default setting.
The DatabaseFile (DBF) connection parameter is used to load and connect to a specific database file that is not already running on a database server.
If the database you want to connect to is not already running, use the DatabaseFile (DBF) connection parameter so the database can be started.
If the filename does not include an extension, Adaptive Server Anywhere looks for a file with the .db extension.
The path of the file is relative to the working directory of the database server. If you start the server from a command prompt, the working directory is the directory that you are in when entering the command. If you start the server from an icon or shortcut, it is the working directory that the icon or shortcut specifies. It is recommended that you supply a complete path and file name.
If you specify both the database file and the database name, the database file is ignored and is not used to try to connect to a database that is already running.
You can also use UNC filenames and Novell NetWare Directory Services file names.
For information about using UNC filenames and Novell NetWare Directory Services file names, see The database server.
CautionThe database file must be on the same machine as the database server. Starting a database file that is located on a network drive can lead to file corruption. |
The DatabaseFile (DBF) connection parameter in the following example loads and connects to the sample database, asademo.db, installed in the directory c:\Program Files\Sybase\SQL Anywhere 9:
DBF=c:\Program Files\Sybase\SQL Anywhere 9\asademo.db
The following two examples assume that you have started a database file named cities.db, and renamed the database Kitchener as follows:
dbeng9 cities.db -n Kitchener
To successfully start and connect to a database and name it Kitchener:
DBN=Kitchener;DBF=cities.db
Specifying DBF=cities.db
would fail to connect to the running database named Kitchener.
DatabaseName connection parameter [DBN]