To grant database privileges

  1. Using a command line navigate to Micro Focus XDBC bin directory. Run mfsql from the command line using the following syntax:
    mfsql -u system -p manager -c myconfigfile.cfg

    (This command creates the default schema of authorization ID system with the password manager.)

    The following prompt appears:

    SQL (/? for help) ==>
    Note: If you REVOKE privileges from system before creating another authorization ID with database administrator (DBA) privileges, no one will be able to connect and your system will be unusable. Should this happen, you will need to recreate the system catalog as described in the section Creating a System Catalog and Views in the chapter Using Micro Focus XDBC.
  2. Grant DBA privileges to yourself by issuing a GRANT statement such as:
    GRANT DBA TO tsmith IDENTIFIED BY password123;
  3. Grant the privileges CONNECT and/or RESOURCE to each of your users:
    CONNECT Lets grantees connect to the database when the password is correct
    RESOURCE    Lets grantees create objects/tables in the database
    DBA Implies both CONNECT and RESOURCE and lets grantees read or modify any table in the database (we suggest that you use caution when granting this privilege — anyone with DBA privileges has complete control over a database)

    For example, you might issue the following commands:

    GRANT CONNECT,RESOURCE TO jsmith IDENTIFIED BY password1;
    GRANT CONNECT TO sjones IDENTIFIED BY password2;
  4. When you have finished granting privileges, quit the query tool by entering:

    /q