DB2

IBM DB2 is a family of relational database server products developed by IBM that have been extended to support object-relational features and non-relational structures like JSON and XML. There are three main products in the DB2 family: DB2 for Linux, UNIX and Windows (informally known as DB2 LUW), DB2 for z/OS (mainframe), and DB2 for i (formerly OS/400), plus a version for IBM's Virtual Storage Extended (VSE) operating system.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi Team,

According to my work, I have to run 7000+ sql statements in DB2 .I have the java code of the same.But by default DB2 java can only run 1338 dynamic statements at one time.
So what I was doing that Split the input data (7000 + ) into mulitiple txt files and run program more than 7 times .Each time I have to change the input path file.

Now  instead of running program 7+ times and manually changing input path everytime,I m trying to dynamically read all the input files from that folder.
Here I am attaching a part of my program only..only the method to read input file.
Below is the code for single input file case. Assume I have files named as a.txt,b.txt,c.txt.....etc.
Text file contains data in the below format:-
----------------------
abc-465747        
dfr-756372
---------------------
Existing code which executes fine  for single input file

declared input file path
static String fileName="C:\\Users\\john\\Desktop\\policies.txt";

Open in new window


main method.
 public static void main(String[] args)
        
    {
    Pre pd = new Pre();
   
      
    pd.read_Policy_list_file(fileNames);

//other methods as a part of my work
}

Open in new window


read+policy method
public void read_Policy_list_file (String fileName)
		{
			try
			{
				BufferedReader br = new BufferedReader(new FileReader(fileName));
				try {
				    StringBuilder sb = new StringBuilder();
				    String line = br.readLine();

				    while (line != null) 
				    {
				    
				

Open in new window

0
Cloud Class® Course: MCSA MCSE Windows Server 2012
LVL 12
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

hi,

Anyone know how many effort /steps to migrate from Oracle 10g to DB2?

We have Oracle platform composite of :

1) Oracle application server.
2) Oracle OLAP server
3) Oracle BI server
4) Oracle BI answer.
5) Oracle database server.

Our code is build upon on java, ActiveX and VBA.
0
hi,

what kind of DB2 Geographic Replication solution we can have?
0
Hello,

I am attempting to add two date paramaters to an existing query using a "between" clause like this:

AND TIMES.ADMINISTERED_TIME between '2017-01-01' and '2018-01-01'

Open in new window


The problem is that this part seems to get ignored (doesn't change the results of the query) when added.  

I do not receive any errors and I have tried various ways of referencing the ADMINISTERED_TIME field with not avail.

The following query (for testing) works as expected:

SELECT * FROM  ORDER_MED_ADMIN_TIMES WHERE ADMINISTERED_TIME BETWEEN '2017-01-01' AND '2018-01-01'

Open in new window


Here is the entire query where the date between clause has no effect:

SELECT
DISTINCT 
ORD.CLIENTID ||' '|| TRIM(CLTLST)||', '||TRIM(CLTFST) AS CLIENT
, Case when varchar_format (stopdatetime, 'YYYY-MM-DD HH24:MI') >= varchar_format (I.CHANGESTAMP, 'YYYY-MM-DD HH24:MI') then 'discharged' else ORD.STATUS end as STATUS
,UPPER(BRAND_NAME) AS TEST
,TRIM(BRAND_NAME)||' ('||TRIM(GENERIC_NAME)||') '||TRIM(STRENGTH) AS MEDICATION
,TRIM(SIG_ACTION)||' '|| TRIM(SIG_DOSE)||' '|| TRIM(SIG_DOSE_UNIT)||' '|| TRIM(SIG_ROUTE)||' '|| TRIM(SIG_DOSE_TIMING)||' '|| TRIM(SIG_DOSE_OTHER)||' '|| TRIM(SIG_DOSE_OTHER) AS SIG
, DATE(SCHEDULEDSTARTDT) AS START_DATE
, DATE(SCHEDULEDENDDT) AS END_DATE
, DATE(I.DISCHARGEDATE) as INPATIENT_DISCHARGE
,TRIM(INSTRUCTIONS) AS INSTRUCTION
,TRIM(STAFF.SMMLNM) ||', '|| TRIM(STAFF.SMMFNM) AS ORDERING_STAFF
,TRIM(STAFF2.SMMLNM) ||', '|| TRIM(STAFF2.SMMFNM) AS 

Open in new window

0
hi,

I am comparing major DB concurrent connection limit, what is the max concurrent connection MariaDB and DB2 can accept ?
0
hi,

I am now worrying about the programming support of DB2 database programming language, you know MySQL's programming language is so bad and the error message return from MySQL always misleading, is the error message return by DB2 meaningful and DB2 DBA easy to debug it ?

what is the name of the DB2 DB programming language btw ?
0
hi,

Did you all experienced any kind of DB2 file corruption on unix/linux OS?
0
hi,

any one has any report on the Least vulnerability database report, which one give the Least vulnerability ?
0
hi,

What cloud solution, DB2 can run well on ? RDS from amazon ?

has to offer good support.
0
hi,

after move to cloud, what clouded Db2 debug solution offer.

have to be help to dig out deep level query problem. e.g, which part of query has problem/slow the whole thing down.
0
Free Tool: Path Explorer
LVL 12
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

hi,

how to montioring to DB2 over the cloud.
0
hi,

how DB2 work with MongoDB ?
0
hi,

What is the support and feature on Data scientist and big data DB2 offer ?
0
hi,

What kind of Proactive monitoring tools DB2 offer? can monitor DB2 programming language anti pattern e.g.

e.g. can also monitoring down to which part of query has problem?
0
hi,

What is the Debug and development tools DB2 offer for complete and robus DB2 developement SDLC.

this has to be down to query level.
0
hi,


What Business intelligence and report solution DB2 offer ?
0
hi,

What OLTP and OLAP solution DB2 offer ?
0
hi,

what ETL solution DB2 offer ? is it scaleable ?
0
hi,

Usually what DB2 complete audit option/feature it offer? e.g. make it pass the PCI-DSS.
0
Free Tool: Port Scanner
LVL 12
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

hi,

Does DB2 support Materialized View ?

URL on how to it please.
0
Hi,

Does DB2 support Graphical data/data modelling ?
0
hi,

What programming capability DB2 offer to developer ?
0
hi,

DB2 should has Query parallel processing process, right ? what edition has this feature ?
0
Hi,

HADR enable secondary DB2 server/DR server to be readable ? how many DR server readable allowed ?
0
HI,

Any offical support way to move from Oracle to DB2, any SW focus on one-click migration is good.
0

DB2

IBM DB2 is a family of relational database server products developed by IBM that have been extended to support object-relational features and non-relational structures like JSON and XML. There are three main products in the DB2 family: DB2 for Linux, UNIX and Windows (informally known as DB2 LUW), DB2 for z/OS (mainframe), and DB2 for i (formerly OS/400), plus a version for IBM's Virtual Storage Extended (VSE) operating system.

Top Experts In
DB2
<
Monthly
>