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.
2
votes
2answers
49 views
How to backup IBM DB2 Database online?
I tried to backup the IBM DB2 (LUW) Database using this command:
./db2 backup database DBEMP to /home/user1/db2bkup
But I got this message:
SQL1035N The database is currently in use. ...
2
votes
2answers
31 views
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. ...
1
vote
1answer
67 views
IBM DB2 Database name not found but I can connect using IBM Data Studio. What happened?
In IBM Data Studio, I can create a connection to a remote IBM DB2 LUW database named DBEMP and browse the schema and data.
Here is the steps to create the database connection:
From IBM Data Studio, ...
1
vote
1answer
31 views
DB2 critical alert “database partition availability”
I have a existing DB2 database that I'm just getting started with and I have connected IBM Data Studio (web) to it and it says that it has the alert "Database Partition Availability" but it doesn't ...
2
votes
1answer
110 views
DB2 Server Table Space Locked
At work we keep receiving the following DataException seemingly at random when one of our processes tries to write/access a table for one of our clients:
com.ibm.db.DataException: A database manager ...
1
vote
1answer
60 views
SQL Index order and performance based on cardinality and data
I've been working quite a bit on a query that's not operating very efficiently on a DB2 database. The thing will return up to 30k rows or so and take up to 10 seconds. I've been working on getting ...
0
votes
1answer
209 views
“connectivity libraries needed are not found” error in IBM Data Studio
UPDATE
I am getting the following error when I try to create a new database in IBM Data Studio v3.1.1.0.
The connectivity libraries that are needed for local or remote non-JDBC operations were not ...
1
vote
1answer
26 views
Get all the database in db2 through web
I would like to get all the databases available on a db2 instance from a C# application.
The CLP command to be used is LIST DB DIRECTORY.
How can I fire this command from C#? Is there another select ...
1
vote
1answer
31 views
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 ...
1
vote
2answers
183 views
Adding User access to DB2
I have installed DB2 10.1 in a Red hat box. During the installation I was asked to create several users (db2inst1, db2fenc1 etc). I have been using db2inst1 to perform all operations with DB2 and it ...
2
votes
2answers
58 views
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 ...
1
vote
3answers
50 views
Transfer data from DB2 to Oracle
I want to transfer data from an old DB2 system to a new Oracle database.
How should I go about doing this?
1
vote
0answers
33 views
Application using DB2 not launching due to Win 8
My application uses DB2. It is working fine in Win 7, but not launching in Win 8.
Giving error
System.Configuration.ConfigurationErrorsException:
Failed to find or load the registered .Net ...
1
vote
1answer
159 views
How to drop a DB2 instance when the instance owner was removed
This is a real sticky situation. I was handed over a machine (running an AIX 7.1), and my first task was to re-install DB2 server on it. But someone before me had conveniently removed an instance ...
1
vote
0answers
22 views
DB2 Load Failure due to timestampformat
I'm trying to load a file into DB2 database table using DB2 Load. I'm able to load the file, using the following statement from the unix prompt.
db2 +p -x load from BOM_Sales_20130326.txt of DEL ...
1
vote
1answer
88 views
Immediate refresh materialized views (MQT) with OUTER JOIN under DB2
DB2 accepts a materialized view based on an "OUTER JOIN" query, as long it doesn't refresh automatically (REFRESH IMMEDIATE).
I cannot find a simple solution to get round this problem. Perhaps with ...
1
vote
2answers
19 views
DB2 db2fm proccess
Server is been up for 365 days, however i got some weird repeated procceses.
Are these normal?
ps -fea | grep db2fm
db2inst1 643284 229516 29 May 25 - 212564:06 ...
3
votes
2answers
248 views
DB2 to require password each time
I am using db2inst1 to connect to a database in DB2 which I have installed on my machine. Therefore, db2inst1 user does not require username/password authentication (borrows them from the OS). I would ...
2
votes
2answers
33 views
SQL3550W: … target column has been defined as GENERATED ALWAYS
I am trying to export + import data from a table in a db2 database to another.
But while running the export command I am getting the following error.
SQL3550W The field value in row "26" and column ...
2
votes
1answer
31 views
How can I automate copying DB2 table data between remote Servers?
I have two IBM DB2 servers at separate remote locations.
I need to copy data from several tables on one database on the first server to another database in the second server.
Previously I've used ...
4
votes
2answers
99 views
List DB2 backups
Is there a way to list the DB2 backups? All I can find is db2 list history backup all for <dbname> but I think you need to check through all of those to see if they've since been deleted. This ...
1
vote
2answers
44 views
Partition Fact Table
In one of my fact table which has close to 25 million records in it and now when a cognos team try to run the report on top of that it takes lot of time, So i am thinking of partitioning the table we ...
0
votes
1answer
32 views
DB2 PureScale on Linux
Searching for DB2 PureScale supported hardware, I can see that for Linux distributions only, some System X and IBM BladeCenter BladeCenter HS22 are listed.
If I try to install PuseScale on a Fujitsu ...
1
vote
1answer
18 views
db2 tables altered, reorg
When I alter a table in DB, I need to reorg it:
Call Sysproc.admin_cmd ('reorg Table myTable');
if I had done many modifications, how can I know which tables need a reorg?
1
vote
1answer
23 views
Determine if existing Trigger acts on field DB2
I am eventually going to be writing a trigger on a field named "user2". Currently most of the values in this field are blank, but there are some seemingly random rows with values of '00' for the ...
3
votes
1answer
64 views
Dutch characters in DB2 problem
Ok, first of all, I have really limited knowledge about databases.
Problem that I have is next: I inserted few rows with data that contains Dutch characters, such as names of different countries. ...
1
vote
1answer
70 views
Sending a mail using DB2's Proceude UTL_MAIL
I'm trying to send mail from DB2 using the procedure UTL_MAIL.
I'm using the DB2 Express Edition 10.1.
First I was getting the error of SMTP Server.
After using the below command,
update admin cfg ...
2
votes
2answers
78 views
DB2 UPDATE TRIGGER
I am trying to create a trigger in a DB2 database that runs on the update of a column in one table, and then fills in another table with certain values.
For example, there is a power unit table with ...
1
vote
2answers
605 views
set integrity not enforced in DB2
I am a bit confused with the SET INTEGRITY concept in DB2, why we can OFF the set integrity check to put the table in PENDING state ? does that mean that we can neglect the constraint definitions on ...
6
votes
6answers
2k views
On DB2, who updated a record and what did the record look like before the update?
(SQL Server 2008 R2 Standard, database under full recovery)
I have a table with fields id, firstname, lastname. A statement is executed:
insert into dbo.sometable (id, firstname, lastname) values ...
1
vote
1answer
159 views
db INDEX on ORDER BY FIELD in very simple query does not help - still slow response?
I have very simple query which returns 200K records very slow (20 seconds).
SELECT * FROM TABLE ORDER BY ID DESC
If I do just
SELECT * FROM TABLE
it returns quick result.
I created INDEX on ...
5
votes
1answer
404 views
Stored Procedures Best Practices: Fenced or Unfenced?
I believe I understand the reasons behind fenced and unfenced stored procedures.
Fenced run "outside" of the database (in our case DB2) so as to prevent possible corruption of the database engine ...
1
vote
2answers
95 views
How do I add a database in IBM DB2
I'm supposed to migrate a MySQL database into IBM DB2, but I thought I'd take baby steps first before I do something like that. So for now, I'd just like to add a database.
I'll admit that I have no ...
2
votes
3answers
510 views
How do i subtract a number of days from a prepared statement parameter in db2?
I have a C# application using OLEDB to connect to a DB2 database. Basically, I want to do this:
SELECT CALC.WEEK, COUNT(CALC.ID) AS TRANSACTIONS ,
SUM(CALC.SUBTOTAL) AS REVENUE
FROM (
...
2
votes
2answers
567 views
CREATE INDEX for long columns
I am looking for alternative to create index on long column:
create table line
(
field_key integer not null,
value varchar(4000),
...
);
create index key_value_idx on line ...
1
vote
1answer
116 views
Is storing archive logs on local disk and backups on vendor storage possible?
I am using DB2 9.7.
My LOGARCHMETH1 is set to VENDOR library. Example:
LOGARCHMETH1=VENDOR:/usr/openv/netbackup/bin/nbdb2.sl64
Is it possible to call the following backup command:
db2 backup ...
1
vote
1answer
221 views
DB2 Online Restore but Without Roll Forward?
I read a lot of documentations for db2 restore but I could not find how to perform online restore from the last database backup but without roll forwarding of logs?
I will appreciate command ...
1
vote
1answer
49 views
Online backups with VENDOR library: what should be set for ACTIVE LOG PATH?
My customer is using Veritas NetBackup so we use its library file in the LOGARCHMETH1 parameter for the VENDOR option. That is for archive logging path.
What path should be set for ACTIVE LOG PATH ...
1
vote
1answer
83 views
DB2 online restore - “SQL1035N The database is currently in use.”
I am trying to do ONLINE RESTORE ROLLFORWARDING TO END OF LOGS AND COMPLETE. When I run this command I am getting error SQL1035N The database is currently in use. It does not allow any connections to ...
1
vote
1answer
126 views
Database comparison tool for IBM db2 like OPatch?
I am looking for a database comparison tool for IBM DB2. I was wondering if there is a utility for IBM DB2 similar to OPatch in Oracle's db 11g?
1
vote
1answer
53 views
DB2 DBM paramter NUMDB has value 8. Should I change it to 1 because I have only one database?
Hello I am using IBM Maximo application which is using DB2 database and I have created only one database. I heard that when paramtere NUMDB has value 8 it will divide all values in DB CONFIGURATION ...
1
vote
1answer
63 views
DB2 9.7 - Find rows inserted by a specific trigger
We are auditing a table TRANSACTIONS that inserts a row in HISTORY_TRANSACTIONS when specific columns are changed. These inserts happen through a number of triggers defined on TRANSACTIONS table. Is ...
1
vote
1answer
166 views
db2 express c mac osx
I'm experiencing some troubles with the execution of DB2 express c on Mac OSX 10.6 Snow Leopard.
I have installed the db system, creating two users, db2 and db2-user. The latter is the instance ...
2
votes
1answer
132 views
How to create Buffer Pool in Database dedicated only for ONE BIG table?
I have table TICKET with 400K records in database (DB2).
I wish to create one huge buffer pool which will be dedicated only to this one big table for faster response. What are the steps to do it?
...
0
votes
2answers
169 views
Migrate DB2 UDB (Iseries) to SQL Server
I'm looking for a tools that allows migration of DB2/UDB databases to SQL Server.
It's quite easy migrate schema and data using linked server or import export with SISS.
But what about stored ...
3
votes
2answers
124 views
DB2 error - SQL Statement too long or complex
Getting this error in a DB2 production system:
ERROR [HY000] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0101 - SQL statement too long or complex.
The statement has a large number of OR ...
2
votes
1answer
379 views
copy schema across different physical databases in db2
Is there any way to programatically copy across schema (i.e. tables,functions,views) etc from one database over to another one. Assuming both are running same versions of DB2.
I found a few utilities ...
2
votes
1answer
292 views
Does DB2 have equivalents for Oracle's UTL_ENCODE and UTL_RAW modules?
I'm looking for something similar to:
utl_smtp.command(conn, utl_encode.base64_encode(utl_raw.cast_to_raw(<username>)));
I couldn't find any reference among the DB2's system-defined modules ...
0
votes
1answer
231 views
Preloading a Java library in DB2, similar to ORACLE's loadjava
Edit to add details to clarify, based on Chris' comment:
A Java stored procedure depends on external libraries. Locally it compiles successfully, since they are added to the classpath. But when ...
3
votes
1answer
196 views
Slow SQL Server query using a DB2 linked server in virtual environment
I have a problem with a slow query which uses a linked server. Let me list out my environment first and I'll get to the issue:
Virtual Windows 2003 R2 server (fresh deployments on XenServer 6.1 ...