This is a bit vague. Care to post some representative peice of this "SQL
dump"?
If you also have the CREATE TABLE statements then all you may need to do
is execute db2 -t<yourdelimiter> -f <filename>

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
> This is a bit vague. Care to post some representative peice of this "SQL
> dump"?
> If you also have the CREATE TABLE statements then all you may need to do
> is execute db2 -t<yourdelimiter> -f <filename>
The whole sql file is just for creating table. Here is a part of the sql
file:
...
CREATE TABLE category (
id INTEGER NOT NULL AUTO_INCREMENT,
category CHAR(255)) NULL,
PRIMARY KEY(id)
);
CREATE TABLE user_context_history (
id INTEGER NOT NULL AUTO_INCREMENT,
users_fkid INTEGER NOT NULL,
longitude DOUBLE NULL,
latitude DOUBLE NULL,
category INTEGER NULL,
PRIMARY KEY(id, users_fkid),
FOREIGN KEY(users_fkid)
REFERENCES users(id)
ON DELETE NO ACTION
ON UPDATE NO ACTION
);
...
When I tried: db2 -t ; -f d:\db.sql I get the following error:
DB21034E The command was processed as an sql command....
SQL processing: SQL1024N No connection to database.
But in the command centre I right-clicked on the database and selected
connect.
By the way. I can't figure out at which port db2 is listening.
m0002a@yahoo.com - 17 Feb 2006 17:28 GMT
You need to run:
db2 connect to database-name; (or include it in your script)
You find the port with db2 get dbm cfg
If it lists a service name, then you need to look in /etc/services for
the translation. The default is 50000.
Franz Demmel - 17 Feb 2006 19:17 GMT
m0002a@yahoo.com schrieb:
> You need to run:
> db2 connect to database-name; (or include it in your script)
>
> You find the port with db2 get dbm cfg
> If it lists a service name, then you need to look in /etc/services for
> the translation. The default is 50000.
Thanks. I will try. As you see my questions are very simple. Is there a
good resource for DB2 to lookup such essential infos? The manual
provided by IBM very, very detailed and it's hard to find such
information very quickly.