Article ID 1751
Article Title HOWTO: Create DBNames.cfg from Pervasive Control Center
Article URL http://www.dataaccess.com/KBasePublic/KBPrint.asp?ArticleID=1751
KBase Category Pervasive.SQL
Date Created 12/20/2002
Last Edit Date 12/13/2006


Article Text
QUESTION:
In PCC, I can see my databases listed in the tree but when selecting Maintain names database (from the pop-up menu displayed when right-clicking on Configuration branch) it is empty. I think I have a corrupted DBNames.cfg and I would like to recreate it. How can I do that?

ANSWER:
In order to recreate DBNames.cfg, you will need to use Pervasive Control Center to remove the databases listed in the tree, delete the file DBNames.cfg and then add the databases back to the tree. This will create a new CFG in the directory specified in "DBNames Configuration Location" configuration setting (Configuration | Server | Directories).

Note:
Before you follow the steps below make sure no user is accessing Pervasive using the relational engine and the registered databases


1- Removing the databases from the tree
- Expand the tree until you see the databases listed there
- Right-click on the database name
- Select "Delete"
- From the Delete Database Wizard, unselect the checkboxes (Delete database name and Delete system files)
- Click on Next
- Click on Finish
- Click on Close

Note: If the databases are not listed in the tree, open ODBC Administrator (from Pervasive Control Center, select Tools | ODBC Administrator; from Control Center, Data Sources (ODBC) or Administrative Tools | Data Sources (ODBC)) and removed the Pervasive DSNs listed there (usually under System DSN tab).


2- Deleting DBNames.cfg
- Open Windows Explorer
- Click on the Windows directory (default C:\Winnt)
- Look for DBNames.cfg file
- Right-click on that file and select Copy
- Press Ctrl+V to paste the file to the same directory (it will be copied as Copy of DBNames.cfg)
- Click on DBNames.cfg again and press Delete


3- Adding databases
- Right-click on Databases from the tree
- Select New Database
- Type in the name and location (where the DDFs are) of the database you deleted
- Click on Next
- Click on Finish
- Click on Close

If step 3 still fails, use ODBC Administrator to create your DSNs - remember to use UNC path when creating the DSNs and to create a new database, by pressing the Create button, with the name you want to use for your database. We recommend you select "System DSN" so that the DSN will be available for all users accessing that machine.



KEYWORDS:
database name, configure, odbc, dsn


Contributed By:
Marcia Booth
Company: Data Access Worldwide
Web Site: http://www.dataaccess.com

Links Related to this Article
DAW Knowledge Base article 1572: ERROR: Cannot retrieve database names
P.SQL KBase - Cannot drop database name in PCC
P.SQL KBase - Message "Database Name is inconsistent with Dbnames.cfg file"
P.SQL KBase - The dbname is truncated to 15 characters when using the Create Database Wizard

Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2024 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.