Indicates which database file you want to load and connect to when starting a database that is not running.
{ DatabaseFile | DBF }=filename
Embedded databases.
filename This string specifies the path and file name of a database that is already running.
If the file name does not include an extension, SQL 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 database server at a command prompt, the working directory is the directory that you are in when entering the command. If you start the database 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, an attempt is made to connect to a running database with the specified name (the database file is ignored), and if that fails, an attempt is made to start a database automatically using both the database file and database name. The database server is not started automatically.
UNC file names are supported.
For more information about using UNC file names, see SQL Anywhere database server syntax.
There is no default setting.
If the database you want to connect to is not running, use the DatabaseFile (DBF) connection parameter so the database can be started.
It is recommended that deployed applications specify a database server name using the ServerName (Server) parameter when attempting to start a database file automatically if it is not running. Otherwise, the application may connect to a different database server than intended. For example, the database server could connect to a different version of the SQL Anywhere server that is part of an embedded application and already running.
The database file must be on the same computer 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, demo.db:
"DBF=%SQLANYSAMP12%\demo.db" |
The following two examples assume that you have started a database file named cities.db, and renamed the database Kitchener as follows:
dbeng12 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.
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |