DB2 V9 LUW (on Windows)
I need to give a user access to the explain tables so that they can run db2expln and do their own query optimization.
Can I just generate DDL for existing explain tables and create new ones using the USERS schema name?
DB2 Help says to do this:
Quote:
If DB2 has not already been started, issue the db2start command.
From the DB2 CLP prompt, connect to the database that you want to use. To connect to the SAMPLE database, issue the connect to sample command.
Create the explain tables, using the sample command file that is provided in the EXPLAIN.DDL file. This file is located in the sqllib\misc directory. To run the command file, go to this directory and issue the db2 -tf EXPLAIN.DDL command. This command file creates explain tables that are prefixed with the connected user ID. This user ID must have CREATETAB privilege on the database, or SYSADM or DBADM authority.
I really do not want to give the user CREATETAB privilege on the database!!???
I need to give a user access to the explain tables so that they can run db2expln and do their own query optimization.
Can I just generate DDL for existing explain tables and create new ones using the USERS schema name?
DB2 Help says to do this:
Quote:
If DB2 has not already been started, issue the db2start command.
From the DB2 CLP prompt, connect to the database that you want to use. To connect to the SAMPLE database, issue the connect to sample command.
Create the explain tables, using the sample command file that is provided in the EXPLAIN.DDL file. This file is located in the sqllib\misc directory. To run the command file, go to this directory and issue the db2 -tf EXPLAIN.DDL command. This command file creates explain tables that are prefixed with the connected user ID. This user ID must have CREATETAB privilege on the database, or SYSADM or DBADM authority.
I really do not want to give the user CREATETAB privilege on the database!!???