473,786 Members | 2,765 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_d ata\container_n ame_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
3 3618
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_d ata\container_n ame_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
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,cre ate 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
In article <9f************ **************@ posting.google. com>, Roger
(ka******@hotma il.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2452
by: Phil Powell | last post by:
I have a client database in my db dev server environment I need to create, but the client name contains a dash "-". This blows up upon attempting to do create database my-site; How then do I create this database, simple as that? Thanx Phil
5
3276
by: Frank van Vugt | last post by:
Hi, I noticed that when using the single commandline: drop database <name>; create database <name>; this sometimes fails due to a pg_autovacuum process running on the background. When this happens, the error returned is:
9
3229
by: Bob Achgill | last post by:
I would like to use the timestamp on files to manage the currency of support files for my VB windows application. In this case I would only put the timestamp of the file in the management database and not the file itself. To do this I will need to have a File class property for Create time and date that will let me "set" the Create time and date of the file to my own chooseing. The VB file class does not appear to have the ability
0
1487
by: tommie.nygren | last post by:
I am using Visual Studio.NET 2003 Enterprise Architect Edition (according to my IT guy... how do I actually check what version of it I am using?) and SQL Server Developer Edition (8.00.194 for you who care). In the documentation it says: To generate create scripts 1. In Server Explorer, right-click the database object for which you want to generate create scripts. This might be the entire database, a specific table, stored procedure,...
3
17260
by: The Woo | last post by:
Can one programatically create a file folder which has the same name as a key field, using a command button? Or, Can there be a a command button which opens up a directory tree to a specified location. I'm thinking this is a visual basic-related question? Why? I have a client tracking database. When the client's record is
14
6142
by: mistral | last post by:
Need php script to create mySQL database programmatically; since hosting configuration may not allow create database from script, script also need eliminate/rewrite all restrictions in appropriate places in that hosting.
3
5822
by: teddysnips | last post by:
I have a need to create a database, and then populate it. However, the code below doesn't work as I hoped it might (it creates the table in the "master" database, which is Not A Good Thing). I know already (thanks Tony!) that if you use Dynamic SQL for the USE command, then the subsequent operations need to be Dynamic SQL as well, which is a pity since there are over 11,000 lines of it and I don't really fancy debugging it! Does...
0
4264
by: vaibhavsumant | last post by:
<project name="DBCreate" default="usage" basedir="."> <property name="user" value="db2admin"/> <property name="passwd" value="db2admin"/> <property name="dbprefix" value=""/> <property name="driver" value="COM.ibm.db2.jdbc.app.DB2Driver"/> <property name="starturl" value="jdbc:db2:temp"/> <property name="db2dir" location="${basedir}/../../../../.." /> <target name="CreateTestData" > <echo message="in mydbs db2dir = ${db2dir}" />
2
3129
by: kirthi.amudha | last post by:
Hi, I have app dev client installed on my machine. Can we create the sample database using db2sampl. I was able to create database using the 'Create Database' command. But I am not able to create Sample database using db2sampl.
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.