Questions tagged [db2]

Db2 is a family of relational database management servers developed by IBM. It runs on multiple platforms, including Unix (namely AIX), Linux, IBM i (formerly OS/400), z/OS and Windows.

Db2 (formerly known as 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 (discontinued), Developer Edition, 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 shared storage 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.

Free Db2 Books

813 questions
9
votes
1 answer

query to find closest lesser date

I have a table with rates. each rate has an effective starting date. (the ending date of any rate is implied by the existence of a record with a newer effective starting date.) I also have a table with activities. Each activity occurs on a…
Hellion
  • 381
  • 1
  • 6
  • 12
8
votes
3 answers

DB2 will not INSERT into Created Temp Table that I created

I normally use SQL Server but for this project I'm having to learn DB2. If I can get the below code to work I'm set for the whole project. Below is a elementary example of what I cannot get to work. All I want to do is make a Created Global Temp…
user2381870
8
votes
1 answer

What exactly is binding in DB2?

I recently crossed over from being a Java developer to an actual DBA in our company. I am learning the ropes, so to speak, about being a DBA (which is actually somewhat of a new position for our company). I have seen several scripts where we run the…
Chris Aldrich
  • 4,906
  • 5
  • 33
  • 54
7
votes
3 answers

DB2 equivalent for MySQL's DROP .. IF EXISTS

Is there an equivalent in DB2 for MySQL's (or PostgreSQL's): DROP TABLE IF EXISTS sometable;
ivotron
  • 533
  • 3
  • 6
  • 11
6
votes
5 answers

Learning DB2 without a local install

I will be starting a new job in about 5 weeks, and want to spend some private time really getting to grips with as many of DB2s features as possible, as it is the DB used in the new company. Am I required to do a local home install of the DB so that…
Sokratees9
5
votes
1 answer

BLOB on DB2 v9 on z/OS

What are cons and pros of using BLOBs on DB2 v9 (or later) on z/OS? Clarification: are there some limits (like influence on reorg, HA)? We would like to store large amount of files: 10 millions in the period of up to 6 months. Most of the files…
ILX
  • 153
  • 1
  • 4
5
votes
2 answers

How to run DB Admin Tool (GUI) in IBM DB2 Express-C?

I had installed IBM DB2 Express-C in Windows but I can't find any shortcut to launch the Administration Tools (GUI). When installing, I had selected "Administration Tool" option (I had checked twice to make sure). This is the only shortcuts…
null
  • 371
  • 4
  • 6
  • 12
5
votes
1 answer

eliminate extra spaces in VARCHAR columns

In a table, I have an ID column defined as BIGINT(8) and one VOUCHER column that is VARCHAR(100). No matter the actual length of the value in that field, the SQL always returns a full length value, which can be cumbersome in CLI, specially when…
Marius Butuc
  • 273
  • 3
  • 13
4
votes
1 answer

DB2 Materialised Query Table performance problems

I'm comparing performance on a series of tables involved in insert/updates/deletes. These tables are about to become the source tables for a Materialised Query Table so I thought getting some statistics on the performance impact of the MQT would be…
sapatos
  • 161
  • 6
4
votes
1 answer

Can you control what tags are used in an XML column?

We allow our developers to use XML columns to store data. We want to provide standard names to XML tags. As a DBA, can we prevent the users from adding XML tags that are not predefined?
Rap
  • 41
  • 1
4
votes
2 answers

How do you set the pagesize, codeset and table space when creating a database in DB2?

I want to create a database in DB2. I found some information on this page I want to use only some options which are explained on the page: PAGESIZE CODESET TABLESPACE Then, I want to add/configure the buffer pools. How should the create SQL look…
Kayser
  • 141
  • 1
  • 4
4
votes
1 answer

Specifying the node to connect in db2

I have 2 nodes in my db2 catalog. How would I include the node on which I want to connect inside the db2 connect paramters? Node 1 entry: Node name = DB2HOST1 Comment = Directory entry type …
John Santos
4
votes
1 answer

What are the available options to backup DB2 Express-C?

I want to use DB2 Express-C edition with my application. I have never used DB2 but now want to use the Express Edition in a production environment to learn more about it. I want to know what are the various backup options available in the Express…
RPK
  • 1,425
  • 6
  • 20
  • 39
4
votes
1 answer

delete records in one table based on multiple column values in second table

I need to insert and delete records in table 1 based on the data in multiple columns in table 2. Example: Table1 and Table2 have identical columns: address, city, state, and zip. Table1 is the master table with millions and millions of records.…
Tom
  • 41
  • 1
  • 1
  • 2
3
votes
1 answer

DB2: database hangs while trying to execute simple select query on specific table

No errors or warnings, database just hangs while trying to execute simple select query on specific table. Other tables are accessible until I trying to query specific (faulty) table. This should not be related to large volume of data, table…
adrift
  • 365
  • 2
  • 4
  • 7
1
2 3
8 9