The IBM DB2 Enterprise Server Edition is a relational model database server developed by IBM. It primarily runs on Unix (namely AIX), Linux, IBM i (formerly OS/400), z/OS and Windows servers.

learn more… | top users | synonyms

1
vote
0answers
18 views

who are the group people in db2 and who are the users db2luw

I am new to DB2, I want to learn basics in db2luw. Like Who will create group, and under this group who are the users, and what group people do, and what users will do Thanks in advance Raghava
1
vote
1answer
27 views

Db2 high availability Instance configuration db2haicu fails

Hi I Configured db2 HADR between two servers and the servers are running in HADR Primary and Standby are syncing up I tried to configure the instance configuration utility db2haicu on both the ...
1
vote
1answer
8 views

System parameter in catalog tcpip node

What is the purpose of the "system" parameter when cataloging tcpip nodes? >>-CATALOG--+-------+--+-TCPIP NODE--+--nodename----------------> '-ADMIN-' +-TCPIP4 NODE-+ ...
0
votes
1answer
23 views

configure client ibm_db2 for php

I am installing a RHEL server with nginx and php that can connect to a db2 database, download and install the "IBM Data Server Client" package, also install the pecl library through: pecl install ...
1
vote
1answer
14 views

The query result changes in remote and local database

The below table is created in local database and remote databases. CREATE TABLE EMPLOYEE1 ( EMP_ID INTEGER, EMP_NAME VARCHAR(10), EMP_DEPT VARCHAR(10) ); Insert the below rows in tables created in ...
1
vote
1answer
23 views

Removing apostrophe in result set

create view ENTRP_SERVS.V_IRS_BULK as Select Atr.Ssn_Tx ,Names.First_Na ,Names.Middle_Na ,Names.Last_Na ,Reff.Ref_Cd_Desc_Tx Suffix_Na ,MBR.PRSN_MBRSH_ID, T_PRSN_MBRSH_TAX.FILTER_TYPE_CD From ...
-1
votes
3answers
55 views

Retrieve recently inserted 5 rows [closed]

I want to fetch recently inserted 5 rows from my table. I want to know the sql query for the same. My table is: table xyz ( id integer generated always as identity (start with 1 increment by 1), ...
1
vote
1answer
52 views

DB2 LOAD: Poor performance while loading table with large BLOBs

I need help regarding LOAD-command with BLOBs. I notice very poor performance while loading a table which contains large BLOBs. While tracing the OS, I only have about 15MB/sec I/O-speed. But in ...
2
votes
0answers
43 views

How to avoid hardcoding a database link name in a package body

I have a PL/SQL package that copies data from a remote DB2 database using a database link. To keep the package configuration-independent I wrapped the remote table in a view. But a single field in a ...
1
vote
1answer
21 views

Equivalent SQL Server's Backup COPY ONLY in DB2

In, DB2 when you have a recovery strategie, you have a Full backup, then some deltas or incrementals in between. They are creating based on the previous full (first delta, or any incre. ...
0
votes
1answer
18 views

Raster files into DB2

Team, We have been loading shapefiles into DB2 using db2se import utilities. I have been trying to find help to load Raster files and i wasnt able to find any help on this. it would be really ...
1
vote
1answer
51 views

Running queries directly on DB2 databases

Just have a general query, if it is really fine or safe to run long select queries on RDBMS production Databases specifically DB2? If NO, what are the major risks and issues in executing select ...
0
votes
1answer
45 views

SQL2542N - No match for a database image file was found based on the source database alias

I'm trying to restore a DB from a Linux system to a Windows. I'm working with DB2 9.7.7. I want to create a new DB with the restored DB. The DB file has this name: ...
1
vote
1answer
57 views

Create new Read Only user on DB2 on the whole database

I am an oracle/sql server DBA having limited knowledge in IBM DB2. We have DB2 9.7 fp4 running on AIX 6. I would like to create a new user and grant him READ only privilege on a particular database. ...
0
votes
1answer
67 views

DB2 Linked Server on SQL Server 2012 - Grant Access to Users

I have a linked server on SQL Server 2012 Instance to point to a DB2 database and I have Sys Admin access to that Instance. I am unable to test connection to that DB2OLEDB database as I get below ...
1
vote
0answers
72 views

SYSPROC.ADMIN_MOVE_TABLE procedure error

Iam using DB2 V9.7. The question is regarding SYSPROC.ADMIN_MOVE_TABLE. I tried to move a table between tablespaces, and its throwing an error. db2 "CALL SYSPROC.ADMIN_MOVE_TABLE ...
0
votes
0answers
11 views

SYSPROC.ADMIN_MOVE_TABLE procedure error [duplicate]

Iam using DB2 V9.7. The question is regarding SYSPROC.ADMIN_MOVE_TABLE. I tried to move a table between tablespaces, and its throwing an error. db2 "CALL SYSPROC.ADMIN_MOVE_TABLE ...
0
votes
1answer
25 views

Column not found in dbase file

When I try to import a shapefile using db2se, I specify the input columns to be loaded in the syntax as the COLUMN NAME db2se import_shape <dbname> -userId <username> -pw <password> ...
0
votes
0answers
30 views

MATERIALIZED QUERY TABLE on DB2 Z/os V10

I have return MQT on DB2 LUW and it is working fine and if the same is Executed on DB2 on Z/OS V10 . IT fail's with below error . Can some one help in on the problem. ERROR : "THE FULLSELECT ...
0
votes
1answer
70 views

create a stored procedure if it doesnt exist using a ddl in db2

My requirements are, I want to create a ddl script which will check if a stored procedure exists on DB, if yes then drop it and recreate it. What I tried is, IF EXISTS (select procname into ...
1
vote
1answer
33 views

Spatial Loader DB2 giving error while importing shape file

While I am trying to import a shapefile using db2se import_shape file utility, db2se import_shape <dbname> -userId <userid> -pw <password> -fileName ...
2
votes
0answers
40 views

DB2 Query Error SQL0204N Even With The Schema Defined

I'm using Python to access tables in 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 ...
1
vote
1answer
58 views

Merging a Select query into a view

I am using DB2. So, I have a view which is working fine. It is : Select Atr.Ssn_Tx ,Names.First_Na ,Names.Middle_Na ,Names.Last_Na ,Reff.Ref_Cd_Desc_Tx Suffix_Na ,MBR.PRSN_MBRSH_ID From ...
0
votes
0answers
33 views

Need to implement some logic in DB2

I need to implement the below logic in DB2. Please help how to do so as I am new to DB. LOGIC: 1.Find the last year using LastYear = Current Year - 2 years 2.Check if LastYear equals value in ...
2
votes
1answer
39 views

Adding a column to the view which shows the date in format YYYYMM

In the following view, I want to add a column (not alter the view) named say "ABC" which shows the date in format YYYYMM (no date, only year and month). How can I do that? I am using db2. create view ...
0
votes
1answer
30 views

About creating a View With additional coumns (that are not in the table)

I have this view with following definition. create view VIEW_IRS1 as Select MBR.PRSN_MBRSH_ID , Atr.Ssn_Tx , Names.First_Na , Names.Middle_Na , Names.Last_Na , Reff.Ref_Cd_Desc_Tx Suffix_Na ,'FALSE' ...
0
votes
1answer
378 views

DB2 SQL: How to select all days in a date range even if no data exists for some days

I am really really new to the whole programming world. I have found this previously. However I need rolling dates and into a SQL i am not aware what it is. Example of the SQL im using: Select ...
1
vote
1answer
39 views

Way to ensure just one connection to a DB2 database

Let's suppose a database with a bad security design, say everyone access to the database with a user with DBADM or SYSADM authority, and also, there could be only username for everyone (i.e. ...
1
vote
1answer
68 views

IBM DB2 9.7 and latest 10 version compatibility

At some point projects need to move from IBM DB/2 9.7 to some 10 version. Are there any significant compatibility issues that should be taken into account? We ofcourse use tables in schemas, but then ...
0
votes
1answer
27 views

Apply DB2 logs from production to DR

Is it possible to Apply DB2 9.5 logs files from Production site to DR site? Or do I have to do Backup/Restore and rollforward ...? I copied log files from production site to DR and issued the ...
2
votes
0answers
102 views

Adding group rights in db2 for a stored procedure

I have a list of user accounts on AIX server, where the db2 database resides in. The user accounts all belong to a specific group which I can confirm from aix shell. User accounts work in DB2. ...
1
vote
2answers
67 views

DB2 removing white spaces in field values

In a table I have a column called column_xml defined as CLOB(1000000). The fields in the column contain XML formatted information. My problem is that there are lots of white spaces in these fields ...
1
vote
2answers
81 views

Reasons for db2 foreign key error (-667) despite all rows appearing sane?

I have some csv formatted table dumps and loaded those into a new database with the tables defined by a DDL script from the source database (both acquired by somebody else so I cannot have a look at ...
1
vote
1answer
80 views

Remove single quotes from db2 column name

I have following query which i am trying to execute against db2 database server SELECT REPLACE('\'abc\'','\'','') FROM TN_DAY_PROCESS I am expecting the output like abc without single quotes from ...
1
vote
1answer
167 views

How do I compare two tables with the same column definitions in different schemas?

Any advice would be appreciated. I'm leading my projects initiative to upgrading our ETL software. This can result in data integrity differences. My testing plan is as follows: create an identical ...
1
vote
1answer
48 views

DB2 9.7, create or replace tablespace possible?

I am creating my tablespaces in the sql scripts that create the database schema. This causes a problem in continuous integration processes, where consecutive execution of the script is not possible ...
1
vote
1answer
52 views

Can we change DB config after db creation in DB2

Can we change below configuration of DB2 Database after DB is created. Database territory = US Database code page = 1208 ...
0
votes
1answer
30 views

SORT_SEQUENCE is wrong in as400 library indexes. Can this cause performance issues?

I have 4 AS400s running JDEdwards. Lately a performance issue occured as described here: AS400 Performace issue Although i am not an expert in AS400 , i tried to find out the cause. I think it came ...
1
vote
1answer
353 views

Run a Stored Procedure in DB2 (which has dynamic DDL) under the Definer rights

For our Datawarehouse applications, we want to perform ALTER TABLE ALTER CONSTRAINT <constname> NOT ENFORCED, before the load. Perform the load and then ALTER TABLE ALTER CONSTRAINT ...
0
votes
0answers
12 views

DB2 bidirectional replication of federated object?

Bidirectional replication of a federated object - is this possible on DB2? Example: replication of a table on the DB2 and another table on MySQL as federated object inside of DB2. Anyone ...
0
votes
0answers
37 views

DB2 manual asynchrounous real-time replication to NON-DB2 database

I have been given a Proof-of-Concept task to find out whether it is possible to set up manual (=no 3rd party tools allowed) asynchrounous real-time replication in DB2 that replicates all data changes ...
0
votes
0answers
28 views

MySQL manual asynchrounous real-time replication to NON-MySQL database

I have been given a Proof-of-Concept task to find out whether it is possible to set up manual (No 3rd party tools allowed) asynchronous real-time replication in MySQL that replicates all data changes ...
0
votes
0answers
194 views

Export to csv using db2 v10 for z/os

in db2-luw, I can create a csv using the export command. However, running the same command in z/os results in: SQL1325N The remote database environment does not support the command or one of ...
2
votes
1answer
58 views

DB2 SUM / INNER JOIN question

I have a query that is the following: SELECT CMSTKY AS Customer, CMNAME AS BusinessName, WKMDL# As Model WKSLD# AS Sales FROM GPCMP INNER JOIN GPCM1P ON GPCMP.CMSTKY = ...
0
votes
1answer
178 views

DB2 selects break after migrating from RHEL5, V9.7 to RHEL6, V10.5

I'm migrating a bunch of perl CGI scripts from an older RHEL5 installation to a RHEL6 server. On the old server, DB2 V9.7 was installed, the new server has V10.5. No databases on the servers ...
1
vote
1answer
18 views

How can I create DB2 objects with Linux SUDOer authority?

All, I am relatively new to Red hat linux and I have SUDOer authority but unable to create DB2 database or other objects. How can I accomplish this task? Please give examples. Also, is there any ...
1
vote
1answer
400 views

How to grant rights for a user in DB2 Express?

I have installed DB2 Express on a PC. My user is not an administrator user, however as far as i know, it is possible to grant a user rights, so he can create/delete/modify a database. I have ...
0
votes
0answers
195 views

db2 - after the reboot - database is restarting itself after some time (urgent help needed)

we had to reboot server because storage administrators had to extend storage for db2data. We have 9.7 FP 0 on Linux. After that when we started the DB database is restarting itself after some time. It ...
0
votes
1answer
51 views

DB2 - how to track IOPS statistics?

DB2 9.7. Is there some easy way in every moment go have statistics about IO operations per second? I am not interested for hit ration on Buffer Pool but really on IOPS? THANK YOU
0
votes
1answer
94 views

DB2 - How to estimate proper BUFFERPOOL size?

DB2 9.7. 8GB RAM on server. Currently BP has 500 MB (number of pages*pagesize) Database has issue with increased IOPS. So we think maybe BP should be increased. How to estimate needed size for BP? Is ...