We demonstrate how to create the database via the command line, as
follows:
1. On the server, log in as user
db2inst1
(the default DB2 instance owner).
2. Execute the
db2 create database
command to create the USERSTUF
database:
db2 create database USERSTUF
DB2 database names
DB2 database names in DB2 v6.1 must be eight characters or less in
length. Hence, we have named our database USERSTUF (instead of
USERSTUFF)
Figure 55 on page 67 shows the results of the
create database
command,
creating the USERSTUF database with default settings. We verify the
database has been created by connecting to it with the DB2
connect to
database
command.
[db2inst1@bdtest1 db2inst1]$ db2 create database USERSTUF
DB20000I The CREATE DATABASE command completed successfully.
[db2inst1@bdtest1 db2inst1]$ db2 connect to userstuf
Database Connection Information
Database server
= DB2/LINUX 6.1.0
SQL authorization ID
= DB2INST1
Local database alias
= USERSTUF
Figure 55. Creating the USERSTUF database on server bdtest1
This command creates a database called USERSTUF in the default location,
/home/db2inst1.
DB2 database backups
Always back up a DB2 database using the
db2 backup database
command.
Backing up the file system, or database files at a file system level, will NOT
accomplish the same result. See Chapter 4,  Operational considerations 
on page 107 for more detail on the DB2 operation.
Chapter 3. Building the Web server
67




  

Home

About Services Network Support FAQ Order Contact
 

Linux Web Hosting

Our partners:Jsp Web Hosting Unlimited Web Hosting Cheapest Web Hosting  Java Web Hosting Web Templates Best Web Templates PHP Mysql Web Hosting Interland Web Hosting Cheap Web Hosting PHP Web Hosting Tomcat Web Hosting Quality Web Hosting Best Web Hosting  Mac Web Hosting 

Lunarwebhost.net  Business web hosting division of Vision Web Hosting Inc. All rights reserved