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

Create database from a client

P: n/a
Is it possible to create a database from a db2 client when the
database contains both SMS and DMS tablespaces ? We have a special
file structure that look like this :

x:\instancename_dbname
|-data (for DMS Containers)
|-idx (for DMS Containers)
|-SYSTEM SMS
|-temp SMS

For DMS tablespaces do I run the following :
DB2 CREATE REGULAR TABLESPACE tbspace_name PAGESIZE xK managed by
database using (FILE'location_data\container_name_001' container_size,
FILE'location_data\container_name_002' container_size) EXTENTSIZE
ext_size PREFETCHSIZE pref_size BUFFERPOOL bufferpool_name

and for SMS tablespaces do I run this :
DB2 CREATE REGULAR TABLESPACE tbspace_name PAGESIZE xK managed by
system using ('location_data\tbspace_name') EXTENTSIZE ext_size
PREFETCHSIZE pref_size BUFFERPOOL bufferpool_name

tbspace_name ,location_data ,container_size ,pref_size ,ext_size ,
bufferpool_name are variables (reading them from a txt file)

How should a be able and get the correct location_data eg correct
drive on the database server while running the above from a db2 client
? Creating a simple SMS database works ok but not the more complex
one.... Should I try with ant or something similar ? Note that I'm
running this on Windows.
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Ian
Roger wrote:
Is it possible to create a database from a db2 client when the
database contains both SMS and DMS tablespaces ? We have a special
file structure that look like this :

x:\instancename_dbname
|-data (for DMS Containers)
|-idx (for DMS Containers)
|-SYSTEM SMS
|-temp SMS

For DMS tablespaces do I run the following :
DB2 CREATE REGULAR TABLESPACE tbspace_name PAGESIZE xK managed by
database using (FILE'location_data\container_name_001' container_size,
FILE'location_data\container_name_002' container_size) EXTENTSIZE
ext_size PREFETCHSIZE pref_size BUFFERPOOL bufferpool_name

and for SMS tablespaces do I run this :
DB2 CREATE REGULAR TABLESPACE tbspace_name PAGESIZE xK managed by
system using ('location_data\tbspace_name') EXTENTSIZE ext_size
PREFETCHSIZE pref_size BUFFERPOOL bufferpool_name

tbspace_name ,location_data ,container_size ,pref_size ,ext_size ,
bufferpool_name are variables (reading them from a txt file)

How should a be able and get the correct location_data eg correct
drive on the database server while running the above from a db2 client
? Creating a simple SMS database works ok but not the more complex
one.... Should I try with ant or something similar ? Note that I'm
running this on Windows.

You can certainly create tablespaces from a client, but you need
to know the full drive/directory information in order to write your
DDL.
If you use Control Center (part of the DB2 Admin client), it has a
wizard to create tablespaces and lets you browse the drives/directories
on the server to select the appropriate path.

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #2

P: n/a
Ok, maybe the description wasn't good enough.... I'm aware of the
capability's that CC has but the problem is that this is supposed to
be running in a unattended way. The user should NOT start CC to create
the database etc instead should this be running through a .cmd file or
some fancy java program on the client. Of course does the client has a
db2-client installed.

This how i doing this right now :
attach to the instance from client
run the .cmd file (from the client) to create the database,create
bufferpools,create tablespaces etc.. and this working great after some
hard work.........
It's only thing that has to be fixed and that is how should I be able
and update the database configuration with a new logpath ?
Nov 12 '05 #3

P: n/a
In article <9f**************************@posting.google.com >, Roger
(ka******@hotmail.com) says...
It's only thing that has to be fixed and that is how should I be able
and update the database configuration with a new logpath ?


Attach to the remote instance and run the update db cfg command?
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.