ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » DB2 error, unable to create database..

Post new topic  Reply to topic
 DB2 error, unable to create database.. « View previous topic :: View next topic » 
Author Message
Everest
PostPosted: Tue Mar 06, 2007 12:07 pm    Post subject: DB2 error, unable to create database.. Reply with quote

Novice

Joined: 02 Feb 2007
Posts: 16

Hi all.. I am new in WebSpehere Message Broker world. I tried to create two db2 databases using the following script (mydbScript.sql)

CREATE DB ERRORDB
CONNECT TO ERRORDB
BIND '%DB2TEMPDIR%\bnd\@db2cli.lst' blocking all grant public
CATALOG SYSTEM ODBC DATA SOURCE ERRORDB
CONNECT RESET
CONNECT TO ERRORDB
DROP TABLE ERRORS
CREATE TABLE ERRORS (MSGID BLOB(4, TEXT CHAR(250), ERRORNUM INTEGER, ERRORDATE TIMESTAMP, FLOWNAME CHAR(32), NODENAME CHAR(32), MSGDATA BLOB(3200))
CONNECT RESET
CREATE DB STAFFDB
CONNECT TO STAFFDB
BIND '%DB2TEMPDIR%\bnd\@db2cli.lst' blocking all grant public
CATALOG SYSTEM ODBC DATA SOURCE STAFFDB
CONNECT RESET
CONNECT TO STAFFDB
DROP TABLE STAFF
CREATE TABLE STAFF (STAFFNUM CHAR(10), LASTCHANGE TIMESTAMP, FIRSTNAME CHAR(30), LASTNAME CHAR(30))
CONNECT RESET
TERMINATE
...

I get the following message [C:>db2 -vf mydbScript.sql]
..
DB21034E The command was processed as an SQL statement becasue it was not a valid Command Line Processor command. During SQL processing it returned: SQL1024N A dabatabase connection does not exist. SQLSTATE=08003

When I go to db2 control center I dont find any db created there.

I am using db2 8.1,(FP2) on WinXP.

Any help? I can create any sample databases, so i dont think there is any problem with my db2 installation.
Back to top
View user's profile Send private message
Gaya3
PostPosted: Tue Mar 06, 2007 10:34 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

Hi


Hope you are not in the db2 command line processor, next time post in the correct location.

Please make sure the above one.

check this it will help you
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/r0002025.htm

Thanks and Regards
Gayathri
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
pathipati
PostPosted: Wed Mar 07, 2007 6:55 am    Post subject: Reply with quote

Master

Joined: 03 Mar 2006
Posts: 296

Everest wrote:
C:>db2 -vf mydbScript.sql

I guess, you are already in command line. Try commands in the script manually and see what the result will be. If you still get same problem then I guess you may have to apply latest fixpac.
Back to top
View user's profile Send private message Yahoo Messenger
tillywern
PostPosted: Tue Mar 13, 2007 8:56 am    Post subject: Delimiter Reply with quote

Centurion

Joined: 28 Jan 2003
Posts: 109
Location: Colorado

Let me hazard a guess that you have not specified a statement delimiter. If this is the case all of your input lines are considered one statement. Try looking at the -d option. -td @ would allow you to use @ symbols at the end of your lines while other use -dt$ or -td;. Depends on what you are used to and what characters you are using.

But this would really apply if using a file for input which is an assumption of mine. You can always try "db2 ? options" or start the information center.

Also check out db2look for dumping DDL of a database that is already created. it also uses the -td parameter. The two tools are designed to work together to allow databases to be modeled and created.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » DB2 error, unable to create database..
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.