View Single Post

   
  #1 (permalink)  
Old 02-27-2008, 01:32 AM
Roger
 
Posts: n/a
Default Create database from a client

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.
Reply With Quote