Unix Technical Forum

Create Schema statement failed.

This is a discussion on Create Schema statement failed. within the DB2 forums, part of the Database Server Software category; --> On my DB2 UDB 8.2.7 database user User1 has been granted IMPLICIT_SCHEMA privilege, but when he issues "create schema ...


Go Back   Unix Technical Forum > Database Server Software > DB2

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 12:41 PM
Amber
 
Posts: n/a
Default Create Schema statement failed.

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 12:41 PM
Peri
 
Posts: n/a
Default Re: Create Schema statement failed.

Can u list us the authorizations that the user has?


On Feb 8, 8:11 am, "Amber" <guxiaobo1...@gmail.com> 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.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 12:41 PM
Ian
 
Posts: n/a
Default Re: Create Schema statement failed.

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:28 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com