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
2
votes
1 answer

DB2 Automatic Initialization and Updating for TIMESTAMP

I would like to append two timestamp columns to an existing table. CREATED_TSTMP would be populated with the current timestamp when a record is inserted and LAST_UPD_TSTMP would be updated automatically when a record in the table gets updated. I…
soulfly1983
  • 177
  • 1
  • 8
2
votes
2 answers

to_date with AS400

I am writing to you because I can't use the operator to_date on an AS400 database. With Oracle database, I use: datefield >= to_date('01/01/2014','DD/MM/YYYY') But with AS400, I get an error: Incompatible operator Is there another function I may…
Olivierm67
  • 81
  • 1
  • 1
  • 8
2
votes
2 answers

Checking availability of DB2 database via db2cli

I try to check the availability of a DB2 Instance via the db2cli-utility, as follows db2cli execsql -user USER -passwd PASSWD -connstring DATABASE:HOST:PORT (with actual values for the uppercased text). I would expect this to connect to HOST:PORT,…
keppla
  • 1,753
  • 2
  • 15
  • 29
2
votes
1 answer

find data size of xml type column in db2

I have a table which has a column of data type xml. I want to find the size of data inserted by user in that column. DB2 shows the length of that column is 0. How can i find the size of data that is present in column of type xml in a table in DB2…
romil gaurav
  • 1,121
  • 11
  • 23
  • 43
2
votes
2 answers

SQL command to search records and remove entire group if x is located

SQL DB2 This is what I have to start with SELECT DISTINCT Last_Name, First_Name, State FROM AddressTable; I am trying to modify the query to look through AddressTable and if State = IL then everyone with the same Last_Name should be…
2
votes
1 answer

what does IBM DB2 z/os JDBC emulateParameterMetaDataForZCalls do?

When i use IBM data Studio to connect to our db2 v8 z/os database the JDBC connection url generated is this. jdbc:db2://host:port/LOCATION:retrieveMessagesFromServerOnGetMessage=true;emulateParameterMetaDataForZCalls=1; contains this parameter…
Hector
  • 4,016
  • 21
  • 112
  • 211
2
votes
2 answers

db2 sql scripts and newlines

Just getting started with db2. Quick question about giving it SQL commands from a file. If I run: db2 -f mySQLcommands and all my commands are one line sql commands they execute with no problems. if I put newlines in the middle of my sql…
Chris H
  • 6,433
  • 5
  • 33
  • 51
2
votes
3 answers

DB2 data import into hadoop

I want to import the data from DB2 databese to the hadoop(HDFS,Hive).One way is to do it by sqoop, can we do the same with some other way?Pls share the other approach of doing this..thanks
2
votes
2 answers

How do we develop an application on the mainframe to access DB2/LUW without DB2/z?

We have developed an application which runs on the mainframe (z/OS), and it uses CAF, the Call Attach Facility, to talk to DB2/z for storing its data. Those customers which already have DB2/z (and hence have to pay for it regardless) are not…
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
2
votes
1 answer

DB2 Query Error SQL0204N Even With The Schema Defined

I'm using pyodbc to access DB2 10.1.0 I have a login account named foobar and a schema with the same name. I have a table named users under the schema. When I'm logged in as foobar, I can run the following query successfully from the command…
Jesuisme
  • 1,805
  • 1
  • 31
  • 41
2
votes
2 answers

DB2 UTF-8 Data Storage - Extraneous Byte Values

I am attempting to store Unicode characters in UTF8 format on a DB2 database. I have confirmed that the charset is 1208 and the that the database is specified to hold UTF8. I am, however, getting odd results when querying some unicode data. select…
Zoran Pavlovic
  • 1,166
  • 2
  • 23
  • 38
2
votes
1 answer

DB2 stored procedure w/ parameters

I'm having a hard time producing the correct results from my stored procedure. I'm using a db2 database and I have 3 input parameters division, department, project. My call statement looks like this. CALL schema.stored_procedure ('IT',…
Tone
  • 765
  • 10
  • 24
  • 51
2
votes
1 answer

WTRN0062E: An illegal attempt to use multiple resources that have only one-phase capability has occurred within a global transaction

In webspehere App Server(WAS)version 8,getting the below error with Non-XA datasource.I have changed to XA datasource to test but giving different error as connection timeout/not available.Below is the error for Non-XA Datasource: RegisteredRes E …
user3626234
  • 171
  • 1
  • 3
  • 13
2
votes
1 answer

IS DISTINCT FROM

I'm reading over a query that performs a left outer join on itself with several on clauses. One of the on clauses is like so: gl1.COLUMN1 IS NOT DISTINCT FROM gl2.COLUMN1 How is this different from saying on gl1.COLUMN1=gl2.COLUMN1
Serge
  • 608
  • 4
  • 12
  • 24
2
votes
2 answers

Simple query in DB2 for AS400

This is a very easy query (I think) but I stil can't do it. I have some data like this: A B C 1 1100 5 1 1100 5 1 500 1 2 1200 4 2 1200 4 2 600 1 3 …
Carlo
  • 25,602
  • 32
  • 128
  • 176
1 2 3
99
100