473,387 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to create a default tablespace

Hi,
when i am trying to create a table in Db2, and specifies the
tablespace as default,it gives an error saying "There is no default
tablespace".Can anybody please help me out to assign a tablespace as a
default one.
Thanks
Pattnayak
Nov 12 '05 #1
2 13050
Pattnayak <dp*******@hotmail.com> wrote:
Hi,
when i am trying to create a table in Db2, and specifies the
tablespace as default,it gives an error saying "There is no default
tablespace".Can anybody please help me out to assign a tablespace as a
default one.


What are you trying to do? Which SQL statements do you run?

You can find in the documentation for the CREATE TABLE statement how DB2
determines which tablespaces should be used. It says:

IF table space IBMDEFAULTGROUP over which the user
has USE privilege exists with sufficient page size
THEN choose it
ELSE IF a table space over which the user has USE privilege
exists with sufficient page size
(see below when multiple table spaces qualify)
THEN choose it
ELSE issue an error (SQLSTATE 42727)

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2
DB2 does that automatically for you.
If you have created a tablespace while logged on, it has your id as the
schema name and DB2 will use that automatically as the target residence
of your table.
If you have not created one then DB2 has created one for you when ther
db was created, it is called USERSPACE1 and that's where your table will
go if you do not specify anything.
The create table command has a parameter IN that allows you to specify
which tblspc. to use. If you don't use the parm. then the command will
behave as explained above.
HTH, Pierre.

Pattnayak wrote:
Hi,
when i am trying to create a table in Db2, and specifies the
tablespace as default,it gives an error saying "There is no default
tablespace".Can anybody please help me out to assign a tablespace as a
default one.
Thanks
Pattnayak


--
Pierre Saint-Jacques - Reply to: sesconsjunk at attglobaljunk dot com
Reconstruct address: Remove the two junk and replace at and dot by
their symbols.
IBM DB2 Cerified Solutions Expert - Administration
SES Consultants Inc.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: leecho | last post by:
Hi, i am a new assigned dba. My question is now, in my db has only one tablespace to keep all my table. Now, i want to create a user who will not need to create any tables. but only to view data...
1
by: Jens H. Hamann | last post by:
Hi, I am having a strange problem with the storage parameters in Oracle 9.2.0.1 database. I create a tablespace with some default storage parameters but when i am adding a table to the tablespace...
1
by: xixi | last post by:
There is one thing I don't understand, I have default tablespace userspace1 is database managed type, with total freepages 506048. another one called tmpxx is DMS type too, with 525120 free pages....
5
by: Christian Traber | last post by:
Hi! just playing with tablespaces... - moved a existing table to a new tablespace - tried to move it back to default tablespace (ALTER TABLE accounts SET TABLESPACE pg_default;) Got the...
2
by: pankaj_wolfhunter | last post by:
Greetings, In sybase there is a create default statement in order to create a default object. like CREATE DEFAULT one as 1 go this object then can be bound to different table columns as...
2
by: jonefer | last post by:
I found this code written in C# - can someone convert it to VB.NET for me? TextBox1.Attributes.Add("onkeydown", "if(event.which || event.keyCode){if ((event.which == 13) || (event.keyCode ==...
2
by: kw.housing | last post by:
is there a way to tell the current tablespace for tables i create without IN clause? i know i can do that by create a table and select its tablespaceid from syscat any better solutions?
0
by: wuge | last post by:
after I convert one big no perform query to CTE, I have Problem with .TDA files in SMS. I want to know if CTE create or use temp table space? in my CTE query, I use distint and order. I query...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.