Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [db2]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

Where is the DSNC105I : End of file reached while reading the command error coming from?

I have a dynamic sql file in which name of TBCREATOR changes as given in a parameter. I use a simple python script to change the TBCREATOR=<variable here> and write the result to an output sql ...
user avatar
  • 13
0 votes
0 answers
44 views

Trying to connect to Remote DB2 database from Linux

I am trying to connect to a remote DB2 database from Python which is installed in the Linux system. Below are the details : Have installed the Cdata driver and configured the odbc.ini file in root as ...
user avatar
0 votes
1 answer
110 views

Bash script permission denied

I'm trying to check all counts for all tables in IBM DB2 using Red Hat Linux. When I try to run this DB2 SQL Script db2 "SELECT 'SELECT COUNT(*) AS ROW_COUNT FROM '|| tabschema || '.' || tabname ...
user avatar
0 votes
1 answer
127 views

Multiple values in variable and need to check IF condition for each value

I'm writing DB2 stored procedure. This stored procedure will be called using .ksh script. I was stuck in checking IF condition. VARIABLE = 'test1,test3,test8,......testn' The variable's datatype is ...
user avatar
  • 25
0 votes
1 answer
3k views

Fail to yum install libstdc++.so.6 when installing db2 v11.5 in redhat OS

Good day, I am trying to install DB2 V11.5 (64 bit) in red hat OS. However, I having some warning message as follow: Summary of prerequisites that are not met on the current system: DBT3514W ...
user avatar
17 votes
2 answers
1k views

How does this shebang that starts with a double hyphen (--) work?

I have found the following kind of shebang in the RosettaCode page: --() { :; }; exec db2 -txf "$0" It works for Db2, and a similar thing for Postgres. However, I do not understand the whole line. ...
user avatar
  • 295
1 vote
1 answer
1k views

Passing parameters inside db2 SQLs from an unix shell script

I want to delete certain rows from a table based on my input values to a unix shell script. I am making connections and terminating it inside my shell script. If you notice right now the field is ...
user avatar
1 vote
0 answers
127 views

Permissions confusion when executing binaries via script

ls -al /home/dmsinst1/sqllib/adm/db2start -r-sr-sr-x 1 root dmsiadm1 93613 Jun 26 14:14 /home/dmsinst1/sqllib/adm/db2start ls -al /home/bpminst1/sqllib/adm/db2start -r-sr-sr-x 1 root bpmiadm1 93613 ...
user avatar
  • 2,195
-1 votes
1 answer
1k views

db2start fails with error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

Installed db2 10.5 but installation completes with warning that db2start failed while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory. i have both ...
user avatar
  • 101
2 votes
0 answers
176 views

IBM DB2 for Linux AMD64 does not install on Debian Jessie, installer log suggests issue with IBM-supplied libdb2ure.so

I have a ThinkPad T430 with 8 GB RAM and an Intel Core i5 3320M running Red Hat Enterprise Linux 6.7 using kernel 2.6.32-642, and a KVM-QEMU VM running Debian Jessie for AMD64 with kernel 3.16.0-4, ...
user avatar
  • 1,258
0 votes
2 answers
309 views

Which DB2 client package is needed to compile embedded SQL programs?

I have to work on some embedded SQL files (.sqc) for DB2 which will be compiled on Linux. The DB2 command line processor (db2 command) has to be used for precompilation. What of the many DB2 client ...
user avatar
  • 113
1 vote
2 answers
5k views

Database: 0403-009 The specified number is not valid for this command [closed]

getting the error as Database: 0403-009 The specified number is not valid for this command. Code:: #!/usr/bin/ksh #set -x WORKFILE="/tmp/oatest.out" DDLFILE="/tmp/oatest.ddl" TODOFILE="/tmp/...
user avatar
1 vote
3 answers
3k views

Execute a database query by iterating through results of a previous query

I'm new to Unix and bash scripts so please bare with me if this is a silly question. I've just started working for a company that uses DB2 hosted on a Unix platform and there are a lot of unwanted ...
user avatar
  • 111
1 vote
2 answers
1k views

su -c command fails when sending db2 commands

I have a script I've setup to run a number of tasks, one of which is to set up a table in a DB and later remove it (for automated testing). The issue comes that on only a few of the users that I use ...
user avatar
2 votes
1 answer
4k views

Storing longer text output in memory in shell variables vs Writing to disk

I have the below call to db2 database command line tool inside a loop, which runs 100k iterations. (the output from db2 is 5 rows of 20 chars approx per each call, total of approx 100k calls. The ...
user avatar
  • 155
1 vote
1 answer
1k views

Confusing db2 output

When type in echo $(db2 -x "select count(*) from dict_area") in bash, I get 446. But when I type in echo $(db2 -x "select count(*) from dict_area";db2 -x "select count(*) from dict_area"), I get ...
user avatar
  • 11
2 votes
3 answers
986 views

How Do I install DB2 Remotely?

I have been trying to install IBM DB2 10.5.0.1 on AIX 7.1.0.0 from a Windows 8-64bit using a Remote connection. It has been 3 days and I haven't been able to succeed; Here is a list of everything I've ...
user avatar
  • 31
1 vote
1 answer
3k views

How to install IBM DB2 Database Driver on Ubuntu for Node.js

I need assistance installing IBM DB2 drivers onto Ubuntu. Using Ubuntu 14.04, I'm attempting to create a simple web page that gets served by the node.js server-side framework. A server-side-...
user avatar
  • 4,315