Product Documentation

Knowledgebase

Previous Topic

Next Topic

Error While Creating SQL Database

While creating a SQL database, it is possible to encounter the following error:

Error while creating the SQL Database: 19

When the ctreesql server is started, it will check for the file ctdbdict.fsd (the session dictionary) which has a list of all known CTDB and SQL databases. If this file doesn't exist it will be created. Next, it will check the session dictionary for the SQL_DATABASE specified in ctsrvr.cfg (ctreeSQL by default). If this database isn't known, the server attempts to create a new one.

This creation operation may fail with error 19, indicating that the database already exists on disk (but it isn't listed in ctdbdict.fsd).

To use this (or any other) existing database, you can add a reference to ctdbdict.fsd using the ctsqlcdb.exe command line utility, found in tools\cmdline\admin\client\.

Use the following command to add an existing database named ctreeSQL:

run: ctsqlcdb -add ctreeSQL FAIRCOMS

If you don't want the database that is on disk, delete the directory ctreeSQL.dbs (or SQL_DATABASE.dbs for a database called “SQL_DATABASE”), and run the following command to create a new database named ctreeSQL:

ctsqlcdb -create ctreeSQL FAIRCOMS

You can also use c-treeISAMExplorer to add or create databases by right-clicking on the root of the tree in the left-hand pane.

TOCIndex