Monday, September 27, 2010

Setup database

Here are what I have done today:

1) Created a new database named GEOCITY in server machine

Problems:

1) Got a problem while I was creating tables in database. For example, typing the query: db2 CREATE TABLE blocks (startIpNum INTEGER NOT NULL, endIpNum INTEGER NOT NULL, locId INTEGER NOT NULL, PRIMARY KEY (endIpNum)). It returns syntax error near unexpected token'('. I tried the same query on my machine which was running under Windows XP. It run well and created the table in database. I am trying to figure out the problem.

1 comment:

  1. This is because Windows processes the command to DB2 differently than Unix does. In order for this to work, you have to put the entire command (after the DB2) in double-quotes on the Unix system. For example:

    db2 "create table blocks (....)"

    ReplyDelete