Creating, Modifying, Deleting, and Repairing PSQL Databases
The following tasks pertain to databases.
For conceptual information on named databases, see PSQL Database Concepts in Advanced Operations Guide.
*Note: On Linux and OS X, the owner of the directory where you want to create the database must be psql. If not, error message 7039: Dictionary path is invalid results. Use the chown command to change owner of the directory. For example, chown psql directoryname.
1
2
Click New > Database.
The Create New Database dialog box appears (see Figure 20).
3
The name cannot be the same as an existing DSN.
Also, no two files can share the same file name and differ only in their file name extension if both files are in the same directory. For example, do not name a data file Invoice.btr and another one Invoice.mkd in the same directory. This restriction applies because the database engine uses the file name for various areas of functionality while ignoring the file name extension. Since only the file name is used to differentiate files, files that differ only in their file name extension look identical to the database engine.
4
1
2
On the Properties dialog, click the tree node for which you want to specify properties:
3
You cannot delete the database to which you are currently logged in. See To log out from a database engine in PSQL User's Guide.
If database security is set to Mixed or Database, you must first remove the security, or it cannot be deleted. See To turn off security using PSQL Explorer and To turn off security using SQL.
If when you delete a datase you also want to remove its DSN, then in Window > Preferences > PSQL > General, the option Always remove associated DSN entries must be selected.
1
2
Click Delete.
3
Yes, but only database name - Delete only the database name in dbnames.cfg.
Yes, database name and ddfs - Delete the database name and associated DDF files.
No - Cancel without deleting.
*Note: Deletion of a database does not affect its user data files.
Using the tables (data files) from one database for a newly created database with a different name can result in the inability to open the tables for the new database. In certain situations, the tables can have the original database name bound to them. For example, if the original database is set to Bound or if Referential Integrity is being enforced, the data files are bound to that database name. (See also Bound Database versus Integrity Enforced.)
To ensure that such tables can be opened for the new database, you need to repair the database name for the new database. The tables are then associated with the new database.
1
In PCC PSQL Explorer, expand the Databases node and right-click the database name that you want to repair.
2
Click Repair Database Name.
The following table explains additional actions, if any, that are required based on security settings for the database, the tables, or both. See also Security Tasks.
See also Database Security in Advanced Operations Guide.
See also Classic in Advanced Operations Guide.
See also Database in Advanced Operations Guide.
You can omit providing an owner name for a specific table with the Skip button. To skip all tables with an owner name, select Do not ask again for owner names. Tables requiring an owner name that is unknown will be skipped then click Skip.