Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
7069 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 The db2prereqcheck utility failed to find the following 32-bit library file: "/lib/libpam.so*". DBT3514W The...
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 following 32-bit library file: "/lib/libpam.so*". DBT3514W The db2prereqcheck utility failed to find the following 32-bit library file: "libstdc++.so.6". Then I go to do yum install libstdc++.i686, but hitting another error which is as follow: enter image description here Not understand that why the system hitting 32 bit error when I am installing 64 bits DB2. And My OS is redhat 64 bits: enter image description here Kindly advise how can I continue to fix this issue? Edit ** I downloaded the db2 v11.5 from IBM website, the file name will be as follow: DB2_Svr_11.5_Linux_x86-64.tar
Panadol Chong (113 rep)
Feb 7, 2020, 03:11 AM • Last activity: May 24, 2025, 08:02 AM
1 votes
0 answers
217 views
The db2prereqcheck utility was unable to determine the Linux distribution level
I am trying to check prerequisites before installing IBM db2. I got this error DBT3505E The db2prereqcheck utility was unable to determine the Linux distribution level. % I'm using XeroLinux (newbee) After some research I stumbled across this [solution][1] My `/etc/issue` has this line only: [![etc/...
I am trying to check prerequisites before installing IBM db2. I got this error DBT3505E The db2prereqcheck utility was unable to determine the Linux distribution level. % I'm using XeroLinux (newbee) After some research I stumbled across this solution My /etc/issue has this line only: etc/issue My problem is how to edit this /etc/issue file in order for db2 to detect the kernel version.
cybercaesar (11 rep)
Nov 17, 2023, 11:33 AM • Last activity: Nov 28, 2023, 11:05 AM
0 votes
0 answers
185 views
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 | root | | 1004 | root | | 1205 | root | | 1216 | root | Now I wa...
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 | root | | 1004 | root | | 1205 | root | | 1216 | root | Now I want to kill some process_id (1234,1005,1205) using one command only. When I tried to kill in many ways but its not working properly. Its showing error like a mysql> kill 1234 1005 1205; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1205' at line 1 Can you please help me to how to solve this issue. This is a DB2 server.
priyank (1 rep)
Apr 6, 2023, 02:34 PM
0 votes
1 answers
570 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 ```sh db2 "SELECT 'SELECT COUNT(*) AS ROW_COUNT FROM '|| tabschema || '.' || tabname || ';' FROM sysibmadm.admintabinfo WHERE tabschema not like 'SYS%' order by tabschema, tabname asc"...
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 not like 'SYS%' order by tabschema, tabname asc" > script
Linux will return
bash: script: Permission denied
Taqiuddin Shokordey (1 rep)
Mar 9, 2021, 02:46 AM • Last activity: Mar 9, 2021, 08:48 AM
0 votes
1 answers
604 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 `varchar` IF VARIABLE = 'test1' THEN --PRINT TEST1 HERE; END IF; IF VARIABLE = 'test8' THEN --PRINT...
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 HERE; END IF; IF VARIABLE = 'test8' THEN --PRINT TEST8 HERE; END IF; could you please help me to achieve this?
looty (25 rep)
May 14, 2020, 05:02 PM • Last activity: May 14, 2020, 06:41 PM
2 votes
3 answers
1073 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 done so far: 1. I have installed Putty on my Local Machine ( win-8, 64 bit) 2. I have installed Xmi...
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: 1. I have installed Putty on my Local Machine ( win-8, 64 bit) 2. I have installed Xming 3. I even installed Cygwin ---------- I keep receiving the following error message after several unsuccessful trys to install the DB on the remote machine: > (The Tools) command-line, telnet, and relogin client have stopped > working. **Additional Information**: The Database file is zipped using tar format and I have already untarred it, and I want to attempt an install using the db2setup command, which as far as I understand starts the Installer Wizard. **Connection Setup** I disabled my firewall, and am only connected to the remote AIX Server through my LAN. My LAN is also not connected to the internet. ---------- I tried to run the following commands: xclock and Xming separately from the command line of Putty and Cygwin. The result was an error. I also tried to export the display with the command : DISPLAY=127.0.0.1:0.0; export DISPLAY DISPLAY=datapc:0.0; export DISPLAY DISPLAY=localhost:0.0; export DISPLAY After I tried once and the installation failed, I kept trying while adding new troubleshooting, and kept failing. I am ready to start with a clean slate, so instead of trying to repair what I've done already, I'm looking for help from all of you regarding the BEST method. Id appreciate that!! Thanks a lot !!
Joye (31 rep)
Sep 23, 2014, 09:37 AM • Last activity: Apr 22, 2020, 10:44 AM
17 votes
2 answers
1619 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. I know the double dash is a comment in SQL, and after that it calls the Db2 executable with some parame...
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 after that it calls the Db2 executable with some parameters passing the file itself as file. But what about the parenthesis, the curly brakets, the colon and semi-colon, and how can replace a real shebang #! ? https://rosettacode.org/wiki/Multiline_shebang#PostgreSQL
AngocA (295 rep)
Dec 14, 2018, 09:47 PM • Last activity: Dec 15, 2018, 03:29 PM
1 votes
1 answers
2002 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 hardcoded in the where clause. **How can I pass that value as a parameter to the script?** #!/bin/ksh se...
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 value as a parameter to the script?** #!/bin/ksh set -x export DB2INSTANCE=db2clnt1 db2 ""CONNECT TO DBNAME user USER using passwd"" db2 ""delete from table where field =\'abcdefghijklmn\'"" db2 ""CONNECT RESET""
novice unix db2 (11 rep)
Jan 24, 2018, 11:26 PM • Last activity: Jan 25, 2018, 12:55 AM
2 votes
0 answers
206 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, and I am trying to install IBM DB2 Advanced Enterprise Server Edition 11.1 (as an IBM employee I can u...
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 Enterprise Server Edition 11.1 (as an IBM employee I can use it without cost for private purposes, training in my case) using X forwarding for graphical interface (which I know it works because from the same command prompt I can launch Synaptic). When I try to launch the official db2setup graphical installer I get the splash screen, but then the installer quits. Reading the installer log file /tmp/db2setup.err, the crash is due to a segmentation fault on library libdb2ure.so, which is supplied by IBM on the installer package. Googling revealed two possible fixes that didn't work: adding my machine's hostname to /etc/hosts (did that to no effect), and making sure to install DB2 from a local filesystem (I am doing that). Then I followed this post and tried making sure all the library's dependencies listed by readelf were installed (they are), then I installed the Korn shell (KSH93) from APT (it didn't work). I would like to explore other possible fixes before going ahead with building another VM running CentOS (DB2 is certified to run on RHEL, not Debian), as I fear running a second VM for my DB2 server would put too much strain on my workstations's RAM.
RAKK (1412 rep)
May 4, 2017, 03:55 PM • Last activity: Jul 14, 2017, 04:52 PM
1 votes
0 answers
138 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 Jun 26 14:15 /home/bpminst1/sqllib/adm/db2start groups dmsinst1 dmsinst1 : dmsiadm1 groups bpminst1 bp...
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 /home/bpminst1/sqllib/adm/db2start groups dmsinst1 dmsinst1 : dmsiadm1 groups bpminst1 bpminst1 : bpmiadm1 So, when running the following script as root: #!/bin/bash su bpminst1 -c "/home/bpminst1/sqllib/adm/db2start" su dmsinst1 -c "/home/dmsinst1/sqllib/adm/db2start" I get: [root@dmsnl857-vm ~]# ./startAll.sh SQL1092N The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation. User ID: "BPMINST1". 06/29/2017 09:16:03 0 0 SQL1063N DB2START processing was successful. SQL1063N DB2START processing was successful. The second command is apparently executed without errors. **update**: with set -x [root@dmsnl857-vm ~]# ./startAll.sh + echo 'Starting BPM DB2 instance ... ' Starting BPM DB2 instance ... + su bpminst1 -c /home/bpminst1/sqllib/adm/db2start SQL1092N The requested command or operation failed because the user ID does not have the authority to perform the requested command or operation. User ID: "BPMINST1". + echo 'Starting DMS DB2 instance ... ' Starting DMS DB2 instance ... + su dmsinst1 -c /home/dmsinst1/sqllib/adm/db2start 06/29/2017 09:44:13 0 0 SQL1063N DB2START processing was successful. SQL1063N DB2START processing was successful.
pkaramol (3109 rep)
Jun 29, 2017, 09:21 AM • Last activity: Jun 29, 2017, 09:44 AM
-1 votes
1 answers
2042 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 libstdc++.so.5 and libstdc++.so.6 in my /usr/lib/ [root@lnxcm8 adm]# ll /usr/lib | grep libstdc++.s...
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 libstdc++.so.5 and libstdc++.so.6 in my /usr/lib/ [root@lnxcm8 adm]# ll /usr/lib | grep libstdc++.so. lrwxrwxrwx 1 root root 18 Jun 25 16:56 libstdc++.so.5 -> libstdc++.so.5.0.7 -rwxr-xr-x 1 root root 824172 Jul 2 2015 libstdc++.so.5.0.7 lrwxrwxrwx 1 root root 19 Jun 26 16:23 libstdc++.so.6 -> libstdc++.so.6.0.19 -rwxr-xr-x 1 root root 1075592 Aug 31 2016 libstdc++.so.6.0.19 Also while installation dn2prereq stated that i need *libstdc++.so.6* so i installed it, and now when it complete its installation it fails with error failed to load libstdc++.so.5.
Yogesh Kumar (101 rep)
Jun 26, 2017, 03:51 PM • Last activity: Jun 26, 2017, 03:57 PM
1 votes
2 answers
5693 views
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 cleanup { chmod 666 $WORKFILE rm $WORKFILE chmod 666 $TODOFIL...
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 cleanup { chmod 666 $WORKFILE rm $WORKFILE chmod 666 $TODOFILE if [ -f $LOCKFILE ]; then rm $LOCKFILE fi exit } if [[ $# -lt 1 || $# -gt 2 ]]; then echo "Usage: $0 [INSTANCE] [DATABASE]" cleanup fi if [[ $# -eq 1 ]]; then typeset -l DBNAME=$1 typeset -u DBUPPER=$1 else if [[ $# -eq 2 ]]; then if [[ $2 == "all" ]]; then typeset -l DBNAME="all" else typeset -l DBNAME=$2 fi typeset -u DBUPPER=$2 fi fi typeset -u INSTUPPER=$1 typeset -l INSTLOWER=$1 typeset -i PROBLEMS=0 typeset -i DB2ACTIVE=0 typeset -i DBAVAIL=0 typeset -i NUMDB=0 typeset -i DBTEST=1 while [ -f $LOCKFILE ]; do echo "oatest.lck lock file exists - waiting 15 seconds..." sleep 15 done touch $LOCKFILE if [[ ! -f $WORKFILE ]]; then touch $WORKFILE fi chmod 666 $WORKFILE echo "" > $TODOFILE chmod 754 $TODOFILE if [[ DB2ACTIVE -eq 1 && DBAVAIL -eq 1 ]]; then sudo -u $INSTLOWER sh -c ". /home/prods/db2/$INSTUPPER/.profile \ >/dev/null 2>&1;echo \"connect to $DBNAME;\" > $DDLFILE; echo \"select \ tbsp_auto_resize_enabled,tbsp_name from table(snap_get_tbsp('',-1)) as t \ where tbsp_type=0;\" >> $DDLFILE; db2 -tf $DDLFILE" > $WORKFILE cat $WORKFILE|grep -v select|grep -v ${INSTUPPER}|grep -v ${DBUPPER} \ |egrep '0|1'|while read STATE TABSPACE; do if [[ $STATE -eq 1 ]]; then echo "OK - Autoresize enabled for $TABSPACE" else echo "ERROR - Autoresize disabled for $TABSPACE" PROBLEMS=$PROBLEMS+1 fi done else echo "ERROR - Cannot check tablespace autoresizing as db2 is inactive" fi ++++++ Debug mode :: + [[ DB2ACTIVE -eq 1 ]] + [[ DBAVAIL -eq 1 ]] + sudo -u uom15c sh -c . /home/prods/db2/UOM15C/.profile >/dev/null 2>&1;echo "connect to mdmdb;" > /tmp/oatest.ddl; echo "select tbsp_auto_resize_enabled,tbsp_name from table(snap_get_tbsp('',-1)) as t where tbsp_type=0;" >> /tmp/oatest.ddl; db2 -tf /tmp/oatest.ddl + 1> /tmp/oatest.out + cat /tmp/oatest.out + read STATE TABSPACE + grep -v select + grep -v UOM15C + grep -v MDMDB + egrep 0|1 oatest: Database: 0403-009 The specified number is not valid for this command.
RenukaKC (33 rep)
Sep 13, 2015, 07:36 AM • Last activity: Oct 11, 2016, 01:35 AM
1 votes
2 answers
1673 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 the `su - user -c` command, the call to db2 fails. The odd thing however, is that using `su - user` a...
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. The odd thing however, is that using su - user and then running the db2 command works fine (outside of the script). This only happens after I have run the script once and during the script running process (though there's nothing I can see that would cause it to somehow change anything, sadly I can't share the exact code, though I could share an example/recreation of it if it would help), which merely contains a few basic loops, and a bunch of su - user -c commands calling IBM mq commands. For example this fails: su - user -c "db2 connect to database USER user USING pass; db2 'CREATE TABLE LETABLE (LEFIELD VARCHAR (16))'" Error: DB21016E The Command Line Processor encountered a system error while sending the command to the backend process. DB21018E A system error occurred. The command line processor could not continue processing. However this works fine: su - user db2 connect to database USER user USING pass db2 'CREATE TABLE LETABLE (LEFIELD VARCHAR (16))' I've tried outputting the env command in both cases, to see if there's somehow something different, but they match as would be expected. I've also tried adjusting the order the different users run in, but that doesn't seem to help either. I am truly confused and any help would be greatly appreciated. I am using a ksh shell.
CheckovZA (21 rep)
Mar 20, 2015, 11:21 AM • Last activity: Apr 27, 2016, 06:16 PM
0 votes
2 answers
404 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 installation packages contains this program and other dependencies that are needed for embedded SQ...
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 installation packages contains this program and other dependencies that are needed for embedded SQL program compilation?
Chandu (113 rep)
Dec 4, 2015, 10:47 AM • Last activity: Dec 5, 2015, 03:44 PM
1 votes
3 answers
4309 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 schemas in their databases (created by IBM Design studio). I want to clean up these schemas and I'm ass...
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 studio). I want to clean up these schemas and I'm assuming a bash script is the best way. What I'd like to do is query the database to get the schema names and store them in some kind of collection; then iterate through the collection executing a drop command for each name. I'm OK on the DB2 commands (I think) but I'm not clear on how to get the results back in a script. This will retrieve the offending schema names: db2 "SELECT schemaname FROM syscat.schemata WHERE schemaname like 'IWSCHEMA%'" This will remove the schema where the name has been assigned to the variable $SCHEMA_TO_DROP: db2 "CALL SYSPROC.ADMIN_DROP_SCHEMA('$SCHEMA_TO_DROP', NULL, 'ST', 'ErrorTable')" All I need to do now is link the 2 together but not sure where to start?
TeamWild (111 rep)
Jun 10, 2015, 10:52 AM • Last activity: Jun 11, 2015, 09:23 AM
2 votes
1 answers
4703 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 input to SP is prefixed to the output line from the SP and dumped to a log file.) while read line do db2...
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 SP and dumped to a log file.) while read line do db2 -x "call stored_procedure_XYZ($line)" |sed "s/^/$line/" >>log_file.txt done<$infile I am trying to make the whole thing run faster by taking out the sed and disk write from inside the loop. Is it advisable to store all the output in a variable, and later modify and write it to the disk? What would be the length the shell variable can hold? (bash, aix 6.1)
dbza (155 rep)
Dec 10, 2014, 08:05 PM • Last activity: Apr 13, 2015, 11:28 PM
1 votes
1 answers
3274 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][1] server-side framework. A server-side-javascript will be making a simple query to an IBM db2 9.5 database located on a windows server (within t...
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 database located on a windows server (within the same LAN as the Ubuntu machine). I got node.js installed on Ubuntu 14.04 using this command: sudo apt-get install nodejs nodejs-legacy npm Then, unnecessarily, I added ODBC support with this command: sudo apt-get install git unixodbc unixodbc-dev ; git clone git://github.com/wankdanker/node-odbc.git ; cd node-odbc ; node-gyp configure build ; npm install odbc After this, I discovered there was a npm for getting IBM DB2 accessible from node.js A prerequisite, though, is that I must first download and install the IBM DB2 driver onto Ubuntu. From the IBM website , I downloaded a file named: v9.5fp10_linuxx64_dsdriver.tar.gz I found these instructions for installing the IBM DB2 driver. The instructions state: > On Linux and UNIX operating systems, IBM Data Server Driver Package is > installed by running the **installDSDriver ** command. However, the v9.5fp10_linuxx64_dsdriver.tar.gz file-archive doesn't contain any command called **installDSDriver** and Ubuntu doesn't natively know this command. Where and how can I execute this **installDSDriver** command?
Lonnie Best (5415 rep)
Jul 12, 2014, 08:19 PM • Last activity: Mar 26, 2015, 02:28 PM
1 votes
1 answers
1466 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 SQL1024N A database connection does not exist. SQLSTATE=08003 SQL1024N A database connection does n...
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. SQLSTATE=08003 SQL1024N A database connection does not exist. SQLSTATE=08003 This has nothing to do with my work. I just want to know how does that happen. Can you help me?
dahui (11 rep)
Dec 5, 2014, 03:45 AM • Last activity: Dec 18, 2014, 03:33 PM
Showing page 1 of 18 total questions