Access to objects can be secured on both the database and the object level with AcuXDBC. If you created your database using xdbcutil or ainit with the -p or the -pa options, you will have a database that supports user authorization IDs. (By default, ainit will create the database with the -pa option, providing both database-level privileges and object-level privileges.)
By default, the system will create a single user system with the password manager. There is also a second special authorization ID called public, which is used only in the context of object-level privileges. Any object owned by public is accessible by all authorization IDs. By default, when you load an XFD into AcuXDBC, the owner of the object will be public. You may override this by specifying the -o option to xdbcutil or the -u option to addfile.
Once you have created your database with database-level privileges, you will need to create additional user authorization IDs. This is done using the SQL GRANT command from within the command-line query tool or script (xdbcquery or asql) or some other ODBC-enabled query tool that will allow the input of SQL commands. (The GRANT statement is described in detail in the topic GRANT (Database Privileges) command. The command-line query tool is described in To start xdbcquery from the command line.
If you wish, you can load the system catalog with your XFDs and send the loaded tables to your customer or end user. A site administrator can grant database and table permissions.
A second — and perhaps more efficient — approach to setting up a new database is to use an SQL script file to create all of the user authorization IDs and object-level privileges. This script can then be run at the end-user site using the command-line query tool. For example:
asql -u system -p manager -r my_script.sql
where my_script.sql is a text file containing the SQL commands to perform. For an example of this, see the ainit script, which executes the cview.sql script to create the information schema in new databases.
Once you have granted users database privileges, you can modify their object-level privileges as well.