Questions tagged [db2]
17 questions
17
votes
2 answers
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.
I know the double dash is a comment in SQL, and…
AngocA
- 295
- 1
- 10
2
votes
0 answers
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, and I am trying to install IBM DB2 Advanced…
RAKK
- 1,332
- 2
- 17
- 35
2
votes
1 answer
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 input to SP is prefixed to the output line from the…
dbza
- 155
- 2
- 8
2
votes
3 answers
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 done so far:
I have installed Putty on my Local…
Joye
- 31
- 3
1
vote
1 answer
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 The db2prereqcheck utility failed to find the…
Panadol Chong
- 113
- 1
- 5
1
vote
1 answer
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 hardcoded in the where clause.
How can I pass that…
novice unix db2
- 11
- 2
1
vote
0 answers
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 Jun 26 14:15…
pkaramol
- 2,587
- 4
- 36
- 71
1
vote
2 answers
Database: 0403-009 The specified number is not valid for this command
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/oatest.todo"
LOCKFILE="/tmp/oatest.lck"
function…
RenukaKC
- 33
- 1
- 4
1
vote
3 answers
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 schemas in their databases (created by IBM Design…
TeamWild
- 111
- 1
- 3
1
vote
2 answers
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 the su - user -c command, the call to db2 fails.…
CheckovZA
- 21
- 5
1
vote
1 answer
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
SQL1024N A database connection does not exist.…
dahui
- 11
- 5
1
vote
1 answer
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-javascript will be making a simple query to an IBM db2 9.5…
Lonnie Best
- 4,895
- 6
- 27
- 42
0
votes
0 answers
How to kill multiple process list using command in linux for DB2
I connected mysql in linux server using mysql -u root -p dbnmae then i use cmd show processlist; and its showing result like
+---------+------+
| Id | User |
+---------+------+
| 123 | root |
| 1234 | root |
| 1235 | root |
| 1236 …
priyank
- 1
0
votes
1 answer
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 || ';' FROM sysibmadm.admintabinfo WHERE tabschema…
0
votes
1 answer
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 varchar
IF VARIABLE = 'test1'
THEN
--PRINT TEST1…
looty
- 25
- 4