Questions tagged [db2]

DB2 is a family of database servers developed by IBM. Supported platforms for DB2 servers are z/OS (formerly OS/390), Linux, UNIX, and Windows (referred to collectively as DB2 for LUW), and IBM i (formerly OS/400 or i5/OS). Originally designed as a relational engine, IBM has expanded DB2's capabilities on some platforms to include native XML support and an RDF-compliant graph store. When posting DB2 questions, please specify the platform and version.

DB2 is a family of database servers developed by IBM. The supported platforms for DB2 servers are z/OS (formerly OS/390), Linux, UNIX, and Windows (referred to collectively as DB2 for LUW), and IBM i (formerly OS/400 or i5/OS). Originally designed as a relational engine, IBM has expanded DB2's capabilities on some platforms to include native XML database features and an RDF-compliant graph store. On the IBM i platform, DB2 for i is tightly integrated into the operating system in a variety of ways, including a unique file system layer that allows database tables to be treated as structured files and vice versa.

DB2 for LUW has different editions: Express-C, Express Edition, Workgroup Server Edition, Enterprise Server Edition and Advanced Enterprise Server Edition. Each of these editions has different engine capabilities and different limits on the amount of RAM and the number of CPU cores that DB2 can use. DB2 for LUW offers a smooth upgrade path for databases that were created in a lower edition of the product (e.g., going from Workgroup Server Edition to Enterprise Server Edition).

DB2 Express-C is a no-cost DB2 engine that runs on Linux and Windows and is authorized for production use and redistribution. As part of the DB2 10.5 release in June 2013, IBM extended the system resource limits for DB2 Express-C to allow the database engine to use up to 16GB RAM and two CPU cores and set a maximum size of 15 terabytes per database.

In October 2009, IBM introduced DB2 pureScale, a database cluster solution for AIX on System p, suitable for online transaction processing (OLTP) workloads. Linux x86_64 support for DB2 pureScale on IBM System x hardware was added in August 2010. IBM based the design of DB2 pureScale on the Parallel Sysplex implementation of DB2 data sharing on z/OS. DB2 pureScale provides a fault-tolerant, clustered database engine that uses low-latency RDMA messaging and GPFS shared storage to present the appearance of a single, monolithic database to the application layer.

To handle large data volumes and complex queries that are common to online analytical processing (OLAP), DB2 for LUW provides a shared-nothing clustering implementation known as the database partitioning feature (DPF), which uses hash key partitioning to evenly distribute a single copy of the database across multiple servers. Incoming queries are automatically multiplexed to access multiple partitions in parallel. DPF was introduced in 1994, as was at times rebranded as DB2 Parallel Edition, DB2 Extended Enterprise Edition, or InfoSphere Warehouse.

The 10.5 version includes the BLU acceleration that consists in storing the data in columnar format. It allows us to store data in rows or columns, and that improves analytics performance.

Free DB2 Books

12687 questions
19
votes
4 answers

What does a timestamp in T-Sql mean in C#?

I'm trying to develop a model object to hold a Sql Server row, and I understand perfectly how to do this except for the T-Sql/SqlServer timestamp. The table is defined as: CREATE TABLE activity ( activity_id int , ip_address varchar(39) , user_id…
Cyberherbalist
  • 12,061
  • 17
  • 83
  • 121
19
votes
5 answers

SQL query of multi-member file on AS400

On AS400 in interactive SQL in a 5250 session, select * from myfile returns rows from one member only when myfile has more than one member. How can I get rows from a specific member? Important: in the end I'd like to do this over JDBC with jt400 so…
tmtest
  • 1,541
  • 3
  • 15
  • 14
19
votes
2 answers

How can I set the current schema for DB2 using Hibernate/JDBC?

I used to use currentSchema=MYSCHEMA; in my JDBC URL connection, but the version of DB2 we're using no longer supports that, showing the error 'The "currentSchema" property is not allowed on the target server'. I've tried using…
Brian Deterling
  • 13,556
  • 4
  • 55
  • 59
19
votes
1 answer

DB2 SQL error: SQLCODE: -206, SQLSTATE: 42703

I am getting this JDBC exception. I googled it but the explanation was very abstract. DB2 SQL error: SQLCODE: -206, SQLSTATE: 42703 com.misys.liq.jsqlaccess.adapter.jdbcadapter.util.JDBCAdapterException: com.ibm.db2.jcc.a.SqlException: DB2 SQL…
praveen_mohan
  • 455
  • 2
  • 7
  • 15
19
votes
4 answers

SQL Developer "disconnected from the rest of the join graph"

I have the following SQL: select from pluspbillline left outer join workorder on workorder.siteid=pluspbillline.siteid and workorder.wonum = pluspbillline.refwo and workorder.orgid = pluspbillline.orgid left outer join…
ESP
  • 979
  • 2
  • 9
  • 21
19
votes
1 answer

Performance of Inner Join vs Cartesian product

Possible Duplicate: Explicit vs implicit SQL joins I want to know the difference in performance of select * from A,B,C where A.x = B.y and B.y = C.z and select * from A INNER JOIN B on A.x = B.y INNER JOIN C on B.y = C.z Basically i want to…
nishantv
  • 643
  • 4
  • 9
  • 27
19
votes
7 answers

DB2- How to check if varchar field value has integers

Is there an inbuilt DB2 function or any query to check if the character i have is a number? (I cannot use user defined functions)
Andy
  • 1,080
  • 5
  • 20
  • 35
18
votes
3 answers

Way to decrease column length in DB2

Is there a way to decrease the column length in DB2? Say I have a table temp with column col1 defined as VARCHAR(80). I want to reduce it to VARCHAR(60).
Vicky
  • 16,679
  • 54
  • 139
  • 232
18
votes
4 answers

Is there any opensource DB2 client?

I am using db2 version 7 , i need an windows application (similar to MSSQL) to do the database operations.
Jeyaganesh
  • 1,334
  • 5
  • 26
  • 48
18
votes
1 answer

How can I select * from table, but cast one of the columns to a different datatype?

I have a table with several columns. I want to do essentially: select * from myTable and CAST(COLUMN1 as INT) where STUFF and get all the columns as well as my first column casted as an int. Obviously this does not work. I know I can do the…
R4F6
  • 782
  • 1
  • 9
  • 26
18
votes
5 answers

DB2 vs PostgreSQL vs SQL Server

Has anyone used all three of these databases? What are your experiences with them? PostgreSQL looks pretty tempting for a project but I'm curious to learn more about it (We're a .NET Shop). I've also heard of quite a lot of people being…
danmine
  • 11,325
  • 17
  • 55
  • 75
18
votes
3 answers

iSeries DB2 - Is there any way to select the identity value from an insert statement?

I know we're rare, us poor folk that are using iSeries for DB2/AS400, but I'm hoping someone can answer this simple question. Is there any way to return the identity value from an insert statement without using two lines of SQL? I'm being forced…
AJ.
  • 16,368
  • 20
  • 95
  • 150
17
votes
5 answers

How can I treat a UNION query as a sub query

I have a set of tables that are logically one table split into pieces for performance reasons. I need to write a query that effectively joins all the tables together so I use a single where clause of the result. I have successfully used a UNION on…
Michael Rutherfurd
  • 13,815
  • 5
  • 29
  • 40
17
votes
11 answers

INNER JOIN in UPDATE sql for DB2

Is there a way to use joins in update statements for DB2? Google has really let me down on this one This is roughly what I'm trying to achieve (... except obviously working ....) update file1 inner join file2 …
Hamish
  • 171
  • 1
  • 1
  • 3
17
votes
1 answer

Spring Batch ResultSet got closed by other before all data being fetched

I am trying to setup the DB2 source as the persistence for the Batch meta data. I am getting this stacktrace: Caused by: org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [SELECT…
richie
  • 171
  • 4