Questions tagged [db2-luw]

For questions about IBM Db2 for Linux, UNIX, and Windows. Please also add the generic [db2] tag.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

How to insert Large file upto size of 1 GB in BLOB in IBM DB2 using sql Insert query

I was trying to insert blob data of size 100 MB but it fails with error SQL3148W A row from the input file was not inserted into the table. SQLCODE "-302" was returned. SQL0302N The ...
0 votes
0 answers
26 views

Db2 Security Bulletins points to v11.5.8 fixpack that don't yet exists, is it?

I have found three security bulletins IT40893, IT40781, IT41338 that all as solution recommends: "Upgrade to DB2 Version 11.5.8 or higher", but I can't find Db2 fixpack v11.5.8 on official ...
  • 99
0 votes
1 answer
12 views

Db2 - load LOB data returns error SQL3025N A parameter specifying a filename or path is not valid

I would like to learn how to load LOB data from files. I have a table with two columns: ID INTEGER DATA CLOB I can normaly export data with: export to c:\data\data.txt of del lobs to c:\data\ ...
  • 99
0 votes
1 answer
40 views

Db2 CLI trace produces no output

On Db2 v11.5.7.0 I would like to enable CLI trace and perform some tests. From official IBM documentation, CLI tracing can be done in two ways: a) dynamic b) with db2clini A. DYNAMIC According to CLI ...
  • 99
0 votes
1 answer
45 views

DBeaver error returned connecting to Db2 database using SSL/TLS with hostname validation error

I have configured SSL/TLS on Db2/Linux v11.5.7.0. In DBeaver 22.1.5 (Java GUI program to access database) in Driver properties I have configured parameter: sslConnection to true and DBeaver ...
  • 99
0 votes
1 answer
13 views

How to create certificate request with "not after" parameter for Db2 SSL/TLS?

I have configured Db2 v11.5.7.0 on Linux/x64 to use SSL/TLS protocol and Db2 client can successfully connect to Db2 server using SSL/TLS. Now I would like to test certificate renewal. I need to create ...
  • 99
0 votes
0 answers
16 views

Db2audit not logging application users

We have recently setup db2audit for windows. We have enabled database audit for successful and failed logins. We can see only logins related to instance user. We didn't see logs related to application ...
0 votes
1 answer
314 views

How to connecto DBeaver with Db2 using SSL self-signed certificate?

On Db2 v11.5.7.0 Linux/x86 server I have configured SSL using self-signed certificate following official IBM documentation https://www.ibm.com/docs/en/db2/11.5?topic=transit-tls-configuration-db2 I ...
  • 99
0 votes
1 answer
38 views

How to switch session user using trusted context in db2cmd?

I would like to connect to Db2 database with user "appuser1" and then switching session user to "user1". In Db2 v11.5.7 on Linux I connected to server using SSH. I connected to ...
  • 99
0 votes
1 answer
44 views

DB2: Working with concurrent DDL operations

We are working on a data warehouse using IBM DB2 and we wanted to load data by partition exchange. That means we prepare a temporary table with the data we want to load into the target table and then ...
1 vote
1 answer
157 views

PolyBase :: How to setup EXTERNAL DATA SOURCE through ODBC?

Microsoft states that: [...You can also use the generic ODBC connector to connect to additional providers using third-party ODBC drivers.] The reality is much far away form that. I've been trying to ...
0 votes
2 answers
44 views

Alternate options for REORG...LONGLOBDATA for space management

What are the alternate options and their pros/cons?
0 votes
0 answers
33 views

What does OPEN means in LAST_REQUEST_TYPE in DB2?

In Db2 v11.5.7 on Linux I would like to monitor what is last request made by application. I assume one of application does not closes transaction properly. To simplify the data I collected, I have the ...
  • 99
0 votes
1 answer
50 views

How to become root or part of the sudoers group inside a DB2 Docker container?

I've created a DB2 container following this guide. I now want to restore a sample database like Books Database or GSDB Sample Database. I copied the 2 folders containing the databases within the ...
2 votes
0 answers
157 views

Lined Server - Cannot create an instance of OLE DB provider "IBMDADB2.DB2COPY2" for linked server "MYDB2"

I would like to create Linked Server from SQL Server 2016 on Windows to Db2 v11.5.7 on Linux/x86. I created linked Server using Microsoft OLE DB Provider for DB2 and it works fine. Now I would like to ...
  • 99
0 votes
1 answer
87 views

admin_move_table, tables stuck in CLEANUP

I'm looking into converting a number of log tables to range partitioning, main purpose is to reduce the size of the database by detaching and archiving historical data. Process looks like: CALL ...
0 votes
1 answer
59 views

DB2 on Docker :: IBM Data Studio prompts error when creating new database

I've followed this simple guide and I was able to install DB2 on Docker. I now would like to import a sample database to play with. So I open IBM Data Studio, I right click on the instance > New ...
0 votes
1 answer
91 views

How to permanetly turn of transaction logging for specific table in Db2?

In our company we are merging two systems together. Data are required to be moved from Microsoft SQL Server 2016 source database into Db2 v11.5 target database. In production environment this is going ...
  • 99
0 votes
1 answer
42 views

How to get into single user mode in Db2?

Microsoft SQL Server ALTER DATABASE baza SET SINGLE_USER WITH ROLLBACK IMMEDIATE Above command does: Forces all of the users from database. Restricts access to database to all users: except one and ...
  • 99
1 vote
1 answer
339 views

How make Db2 database transaction log full fully robust?

Db2 v11.5.7.0 on Linux and for some reason few times per year database hits the transaction log full error. My current solution was to increase logsecond, logprimary or logfilsiz and now I hit to ...
  • 99
0 votes
2 answers
34 views

Column data masking security problem

In Db2 v11.5.7 on Linux I have simple table: create table admin.patient_data ( patientid int not null primary key, patient_name varchar(10), illness varchar(15), doctor_name varchar(10) ); insert ...
  • 99
0 votes
0 answers
27 views

CSV Resultset for IN clause

I am working on writing a SQL query to get data from 2 tables with inner join and need some help. Here is the scenario. I have 2 tables say A and B. table A Name Value 1 Red 2 Green 3 Blue 4 ...
  • 1
0 votes
2 answers
156 views

db2 - how to get list of all of the Db2 instances on computer

I have several Linux servers and on them may be one or more Db2 instances. Db2 instances can be from different Db2 versions. For security audit I need to write some simple bash script to check for ...
  • 99
0 votes
1 answer
72 views

db2 - What is purpose of db2ln and its file system symbolic links?

On Linux/x86-64 I have Db2 v11.1 installed. When I tried to install Db2 v11.5 alongside existing Db2 installation I got error "DBI1004W /usr/lib/libdb2.so detected". I checked and I see ...
  • 99
0 votes
0 answers
299 views

How do I configure DB2 on Windows with SSL so that I can connect via ODBC?

DB2 11.5 running on Windows Server 2016 Standard SQL Server 14.0.3430.2 I'm able to set up ODBC with some DB2 databases, but when the DB2 database is secured with an SSL certificate, which they call ...
0 votes
1 answer
115 views

db2 - Downgrade of upgraded instance and database?

So far I have always "upgraded" database using clean install (new Linux install etc) inside virtual machine. But now I have requirement to upgrade Db2/Linux from Db2 v11.1 to Db2 v11.5 ...
  • 99
0 votes
1 answer
325 views

Can NOT establish connection from db2 client to db2 server v11.5

I installed Db2 v11.5.7.0 on Linux/x86_64 inside my virtual PC using VirtualBox on Windows 10. I created database with name TEST1 I connected to database using Unix socket: db2 connect to TEST1 and ...
  • 99
0 votes
1 answer
147 views

db2 applying licensing file produces two licenses

I installed Db2 from fixpack v11.5.7.0 using db2_install command. I have downloaded "IBM Db2 Advanced Edition - VPC Option V11.5.6 - Activation (CC9WHML)" file from IBM Passport Advantage. I ...
  • 99
0 votes
1 answer
65 views

IBM DB2 database backup speed

I have a IBM DB2 database on LUW that is around 5TB. Currently the backup of 5TB takes around 24 hours. I am thinking of creating a mountpoint called /dbbackup and that mount point is a LVM powered by ...
0 votes
2 answers
126 views

How to get IP addresses of applications that have consumed most CPU in last 10 minutes in Db2/Linux?

Db2 v11.1 on Linux I would like to get top 5 SQL statements that consumed the most CPU in last 10 minutes and there corresponding IP addresses. I queried "package cache" table function and I ...
  • 99
0 votes
1 answer
393 views

docker exec --user db2inst1, unable to find user db2inst1: no matching entries in passwd file

I'm playing around with docker and db2 but I'm getting into trouble when I try to execute commands as user db2inst1 into a running container. I start the container as (it is 1 line but I split it up ...
0 votes
0 answers
59 views

Using User defined types in DB2 and using the type in a function

I am migrating my database from ORACLE to DB2, While doing the migrations I have come across a situation related to User defined types. As I have been working with DB2 recently, I have been through ...
  • 1
0 votes
0 answers
39 views

why does external java function terminate recursive cte?

I made a peculiar observation regarding external functions written in java which I hope someone can shed a light on. I tried it with several functions, but I'll use one of them as an example here: ...
1 vote
0 answers
41 views

Critical event in PDLOGMSGS_LAST24HOURS

On Db2 v11.1 Enterprise on Linux I have checked "Critical Severity" problems using SQL: SELECT TIMESTAMP, MSG FROM SYSIBMADM.PDLOGMSGS_LAST24HOURS WHERE MSGSEVERITY = 'C' ORDER BY TIMESTAMP ...
  • 99
0 votes
1 answer
217 views

How return dynamic SQL value in procedure

I have a procedure that takes in parameters, and makes a dynamic statement based on those. The statement always returns a numeric value. How do I return that value, or pass it to the variable? For ...
  • 1,755
0 votes
0 answers
73 views

db2 How to get the application user from delete events

We use temporal tables to store the history of all changes to specific tables in the db. But we also need the user who made the changes. While on db2 side the user is the application, the application ...
  • 1,755
-1 votes
1 answer
182 views

How to assign minimal privileges for create view

In Db2 v11.1 on Linux we have a request to create a new user with access only to the "create view" privilege. What are minimal permissions I have to set in order for the user to be able ...
  • 99
0 votes
0 answers
15 views

azure cli - Metrics (hostname, CPU, sockets..) for server with DB2 instances

for license purposes I need a table / list with Metrics like hostname, OS, CPU, sockets, cores ..) for virtual or dedicated azure server with DB2 instances. I started with the cli az vm list -d ...
  • 1
0 votes
1 answer
247 views

Saving results from db2 FINAL TABLE

We have a scenario where we need to add multiple rows to different tables, get the generated primary key ID's, then create more inserts with FK's referring those previously generated ID's, etc. On SQL ...
  • 1,755
1 vote
1 answer
40 views

Meaning of "Total work" for build indexes during load

I don't think I ever reflected about it, but I'm currently loading a table from a cursor and list utilities show: Phase Number = 3 Description = BUILD Total Work ...
0 votes
1 answer
33 views

Downside of adding partitions for the future?

I'm considering moving some of our large log-table to range partitioning for ease of archiving them. They are rarely used for queries, other than support and related stuff. Say my oldest data is from ...
1 vote
1 answer
584 views

How to get SQL statement in Db2 database for application that is holding lock on table?

I am trying to get SQL statement that is holding the lock on table. Sample: Create table: create table admin.tab (id int not null primary key, col1 int); Insert data: insert into admin.tab values (1, ...
  • 99
1 vote
0 answers
58 views

Steps to relocate the primary hadr database to a new server?

Currently we have several databases with a HADR configuration where the primary databases are on a Linux Server "A", with the standby all on Linux Server "B". DB2 version is 9.7. ...
0 votes
0 answers
227 views

Copying a single database from DB2 10.5 to DB2 11.5

What is the easiest way to copy a single database (has no large objects) from DB2 10.5 Express-C instance to DB2 11.5 Community Edition instance? I tried this method but obviously db2 restore database ...
  • 111
1 vote
2 answers
164 views

DB2 Linux authentication fails

I have DB2 Express-C v10.5 instance configured to authenticate against LDAP. The LDAP sever is going to be shutdown and I should configure the same DB2 instance to use Linux authentication. I copied ...
  • 111
0 votes
1 answer
237 views

Creating a dynamic db2 reorg script with in-built delay for concurrency

So I'm new to db2, and some of the syntax and other execution restrictions give me trouble. My DB is using DB2 v11.1.2.2. I've created a reorg script which calls the REORGCHK_TB_STATS and ...
  • 1,755
0 votes
2 answers
289 views

Cross Database Queries using IBM Data Studio

I'm currently using IBM Data Studio 4.1 to run queries against DB2 LUW database(s). My understanding is that I can do cross database queries by prefixing the database(s) names. For example, database....
0 votes
0 answers
46 views

Checkopenport - DB2 / shell script sample

at DB2 startup we will check, whether the db2 port is in use. In the client DB2 setup we have only one instance / server. the port is always 50020 - for all servers. our idea - netstat -tunlp | grep &...
  • 1
0 votes
1 answer
1k views

Using same table in a UNION multiple times

I am given a query that is using the same table with same columns and filters multiple times and the only thing is changing is the Type which is given manually. I am thinking there must be a better ...
  • 103
1 vote
2 answers
31 views

What steps we need to perform from DB end in case of storage migration?

What are the impacts / steps from DB2 DB side before VMware SvMotion Storage migration ?
  • 11

1
2 3 4 5