By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,226 Members | 1,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,226 IT Pros & Developers. It's quick & easy.

Create Schema statement failed.

P: n/a
On my DB2 UDB 8.2.7 database user User1 has been granted
IMPLICIT_SCHEMA privilege, but when he issues "create schema test",
the error message "SQL0552N, USER1 does not have the previliege to
execute the operation create schema" was thrown. But if he issues
"create table test.test(a int)", the operation can execute
successfully. So how can I let users issue the create schema statement.

Feb 8 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Can u list us the authorizations that the user has?
On Feb 8, 8:11 am, "Amber" <guxiaobo1...@gmail.comwrote:
On my DB2 UDB 8.2.7 database user User1 has been granted
IMPLICIT_SCHEMA privilege, but when he issues "create schema test",
the error message "SQL0552N, USER1 does not have the previliege to
execute the operation create schema" was thrown. But if he issues
"create table test.test(a int)", the operation can execute
successfully. So how can I let users issue the create schema statement.

Feb 8 '07 #2

P: n/a
Ian
Amber wrote:
On my DB2 UDB 8.2.7 database user User1 has been granted
IMPLICIT_SCHEMA privilege, but when he issues "create schema test",
the error message "SQL0552N, USER1 does not have the previliege to
execute the operation create schema" was thrown. But if he issues
"create table test.test(a int)", the operation can execute
successfully. So how can I let users issue the create schema statement.

Unless a user has DBADM or SYSADM, they can only create a schema
explicitly if the schema name is the same as their auth ID.

i.e.

$ db2 connect to mydb

Database Connection Information

Database server = DB2/6000 8.2.2
SQL authorization ID = IANBJOR
Local database alias = MYDB
$ db2 create schema x
DB21034E The command was processed as an SQL statement because it was
not a valid Command Line Processor command. During SQL processing it
returned:
SQL0552N "IANBJOR" does not have the privilege to perform operation
"CREATE SCHEMA". SQLSTATE=42502

$ db2 create schema ianbjor
DB20000I The SQL command completed successfully.

See the documentation for CREATE SCHEMA:

http://publib.boulder.ibm.com/infoce...n/r0000925.htm

Ian
Feb 9 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.