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

836 questions
35
votes
3 answers

Why is the default page size for databases so small?

In PostgreSQL and SQL Server, the default page size is 8 KB. In MySQL, 16 KB. In IBM DB2, Oracle, and H2 it is only 4 KB. Why are these page sizes so small? Is there a historical or memory usage reason?
Mate Michelisz
  • 477
  • 4
  • 6
18
votes
1 answer

Term for a one-row table?

Is there a specific term to describe a relation with a cardinality of one? I'm thinking particularly of RDBMS "special" one-row tables, for example, DUAL (Oracle), SYSIBM.SYSDUMMY1 (DB2, Derby) and RDB$DATABASE (Interbase, Firebird).
pilcrow
  • 360
  • 1
  • 6
18
votes
2 answers

Why doesn't DELETE + REORG free diskspace (DB2)?

In DB2 I have a table containing large binary data. Now i purged the whole table and ran runstats, reorg, runstats, but the amount of disk space taken does not change. What could be wrong here? The table resides in its own tablespace which I created…
10
votes
1 answer

How do I grant all privileges to local db2admin with DB2 9.7 on Windows?

I have as my developer station a laptop with OS Windows XP Professional Edition, Service Pack 3. I have downloaded and installed IBM DB2 UDB 9.7 fix pack 4, of the Express-C edition. I have a local Windows account called db2admin that I am using as…
Chris Aldrich
  • 4,916
  • 5
  • 34
  • 55
10
votes
4 answers

How can you tell if a table in DB2 has a Primary Key?

We are using a tool that requires specific tables in our DB2 database to have a Primary Key defined. Is there a way using a select statement on the DB to see if a given table has one? Thanks.
Ben
  • 203
  • 1
  • 2
  • 6
10
votes
3 answers

How to get the next value of sequence?

Could somebody tell what is wrong with obvious query below: db2 => select next value for schema_name.sequence_name; As a result I'm getting: SQL0104N An unexpected token "END-OF-STATEMENT" was found following "schema_name.sequence_name". …
adrift
  • 375
  • 2
  • 4
  • 8
9
votes
2 answers

Does DB2 order data by the primary key

I've recently had a discussion with a colleague who was pushing to remove order by clauses from a production query because the order by column was the same as the primary key. After a lengthy discussion in which I tried to explain that he can't…
Reaces
  • 2,681
  • 4
  • 27
  • 38
9
votes
2 answers

How to find out what caused the database(DB2) in a locking state

I know how to check the DB is in a lock state or not, but my question is how to find out which query caused the lock on table /db. IS there any log file getting created if something unexpected happens to the database?
Govind Kailas
  • 367
  • 2
  • 5
  • 11
9
votes
3 answers

How to grant all privileges on all tables in a schema to a user in IBM DB2?

At first place, I want to export database from IBM DB2 AIX into IBM DB2 windows. Unfortunately, I can't use BACKUP and RESTORE command because of difference OS issue. So I have to resort to db2move command. I had exported myschema schema and all of…
null
  • 371
  • 4
  • 6
  • 12
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,916
  • 5
  • 34
  • 55
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
7
votes
2 answers

Is DB2 more reliable and stable compared to PostgreSQL or MySQL?

Always i was using MySQL or PostgreSQL for my projects such as Web/Desktop apps. I had data loss few times and thanks to old backup i was always up and running. But for a recent project for Airport, i have to use something which never ever can lose…
YumYumYum
  • 205
  • 1
  • 3
  • 7
7
votes
6 answers

Emulate REGEXP like behaviour in DB2 SQL

I posted the same on stackoverflow (please, let me know if I have to delete one). I'm working on a DB2 database and as far as I can see regexp is not supported (without additional libraries). So I cannot implement something similar to what is…
tmow
  • 173
  • 1
  • 1
  • 6
1
2 3
55 56