If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How do you create a table space? I granted all permissions but still can't create

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-22-07, 13:40
mr_coffee mr_coffee is offline
Registered User
 
Join Date: Aug 2007
Posts: 28
Arrow How do you create a table space? I granted all permissions but still can't create

Hello everyone.

So I almost got my DDL script to run in DB2 v8.2 but now i'm getting the following error:

CREATE TABLE agent ( aIndMACAddress CHARVAR_32767, EventCorrelator CHARVAR_32767,
.....
......


DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0286N A default table space could not be found with a page size of at
least "16384" that authorization ID "CORY" is authorized to use.
SQLSTATE=42727


This is how I created the Database...

I went into Control Center
Under All databases I selected Create a new database->Standard.

I then selected my machine name, and under instance DB2.

I then just clicked all the defaults and granted all permissions on the database for user name, Cory

Then I opend up Command Editor and pointed to the new database I connected to and clicked use Implicit Credentials (Only for local databases)

And I get the following message:
------------------------------ Commands Entered ------------------------------
connect to TEST2DB ;
------------------------------------------------------------------------------
connect to TEST2DB

Database Connection Information

Database server = DB2/NT 8.2.0
SQL authorization ID = CORY
Local database alias = TEST2DB


A JDBC connection to the target has succeeded.


Now I run the query and I get:

CREATE TABLE agent ( aIndMACAddress CHARVAR_32767, EventCorrelator CHARVAR_32767,
.....
......


DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0286N A default table space could not be found with a page size of at
least "16384" that authorization ID "CORY" is authorized to use.
SQLSTATE=42727



NOTE: I also tried to log in with the user name/password when I installed DB2 and it gave me the same error, just didn't user name.


Any ideas what I'm doing wrong?


Thanks!
__________________
IBM: Tivoli zSeries Co-op
Reply With Quote
  #2 (permalink)  
Old 10-22-07, 14:04
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
What the error message says is that there is not a tablespace that can accommodate the row size of the table AGENT. Tablespace page size must be big enough to fit all table columns, except large data columns.

"db2 list tablespaces show detail" will show you all tablespaces along with their page sizes.
Reply With Quote
  #3 (permalink)  
Old 10-22-07, 15:21
mr_coffee mr_coffee is offline
Registered User
 
Join Date: Aug 2007
Posts: 28
I created a new table space and made it 8k but I still get the same error, once I create a new table space do I have to do somthing special to make sure the user is assigned the table space? I made it avaiable to public and to the speicfic user, Cory.

It says it has to be: 16384 bytes isn't 8kb big enough for this?
__________________
IBM: Tivoli zSeries Co-op
Reply With Quote
  #4 (permalink)  
Old 10-22-07, 16:10
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by mr_coffee
It says it has to be: 16384 bytes isn't 8kb big enough for this?
This is a joke, right?
Reply With Quote
  #5 (permalink)  
Old 10-22-07, 16:16
mr_coffee mr_coffee is offline
Registered User
 
Join Date: Aug 2007
Posts: 28
oops i need at least 16kb, i was thinking 16384 bits, not bytes :P
16384bytes/1024 bytes = 16kb
__________________
IBM: Tivoli zSeries Co-op
Reply With Quote
  #6 (permalink)  
Old 10-23-07, 04:06
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
There is a conceptual difference between tables and tablespaces. A tablespace is a container for tables and represents the physical files on disk. It cannot be accessed in SQL statements. A table is an object in a tablespace and can be used in SQL statements.

Note: everything in an RDBMS is a table (views, aliases, base tables, nicknames, temp tables, ...). So what I said above actually applies to "base tables" only.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On