Perform the following steps to enable SQL access to the Enterprise Database Server database:
| Note: | The following procedure assumes that you are working with a database named MYDB and that any additional semantics are saved in a file called MYDB/GEN. |
-
Log on to the ClearPath MCP system under the usercode containing the database files. For a nonusercoded database, log on under a privileged usercode.
-
Verify that you have at least read access to both the Enterprise Database Server control file and the Enterprise Database Server description file (named MYDB/CONTROL and DESCRIPTION/MYDB for the MYDB database).
-
Set your family statement appropriately.
-
Create the SQL mapping by executing the Schema Administrator.
For example, if you are using CANDE and the database and the MYDB/GEN files are under your current usercode, enter the following statement:
RUN $SYSTEM/MCPSQL/ADMIN ("SQLVIEW DATABASE MYDB"); FILE CARD = MYDB/GENIf you want to allow the Enterprise Database Server database to be updated from SQL queries, add :ACCESSCONTROL = UPDATEOK to the statement, as follows:
RUN $SYSTEM/MCPSQL/ADMIN ("SQLVIEW DATABASE MYDB:ACCESSCONTROL = UPDATEOK"); FILE CARD = MYDB/GENIf you want to optimize queries based on table population, specify the STATISTICS element in the ACCESSCONTROL clause.
If ACCESSCONTROL is omitted, the database is read only.
If the database is a non-usercoded database, explicitly specify the asterisk (*) in the database name. For example, use *MYDB for the name of the database, as follows:
RUN $SYSTEM/MCPSQL/ADMIN ("SQLVIEW DATABASE *MYDB"); FILE CARD = MYDB/GEN
Assuming that the Schema Administrator detected no errors, the Enterprise Database Server database is now SQL-capable.

