Все вопросы: [db2]

231 вопросов

похожие теги: db2-connectdb2-zosdb2-luwdb2-400
0
голосов
1ответов
1528 просмотров

DB2 9.7 cannot enable PL/SQL syntax

After I installed DB2 9.7 Express, I tried to enabled DB2 to support PL/SQL by following command: DB2SET DB2_COMPATIBILITY_VECTOR=ORA then I got result as below: DBI1301E Invalid value. Explanation: The value specified for the registry variable is invalid. User response: Refer to the DB2...

5
голосов
2ответов
16067 просмотров

Add a column to a DB2/400 table with a specific ordinal position

Is there an SQL command on the AS400/iSeries/System-i/whatever to add a column to a table in a specific ordinal position, or moving an existing column to a different position?

3
голосов
3ответов
24673 просмотров

DB2 automatic trim tailing whitespace

This is data in TB_USER table USER_USERID -------------- A111 A9999 ADMIN AHO AHO2 AHO3 AHO4 ...and schema of TB_USER table is COLUMN_NAME DATA_TYPE DATA_LENGTH -------------------- --------...

1
голосов
3ответов
623 просмотров

Where/How do I handle different connection types using Repository Pattern with ADO.Net?

I am new to the repository pattern but am creating a repository to connect to two different database types that have the same data structure. Where and how should I handle the connection? Here are my requirements/constraints/project description I will be connecting to SQL Server 2005 and DB2 (...

9
голосов
4ответов
43328 просмотров

Db2 connection problem with java

I am having problem with DB2. I just installed the db2 as a db2admin and with a password. When i try to connect to database it is success full and while running any simple select query it give me following error:- DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.LOGIN, DRIVER=3.57....

0
голосов
2ответов
6156 просмотров

What does SQLCODE: -516 signify

I am able to retrieve data from the same database table but am not able to isert The error which i get is DB2 SQL error: SQLCODE: -516, SQLSTATE: 26501, SQLERRMC: null

1
голосов
1ответов
474 просмотров

EJB3/DB2 Transactions not rolling back

I have a situation where I have a tree of Entities, and a Session Bean. The Session Bean simply persists or merges the entities, and the method in question is marked as @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW). Now in the case that a child entity fails to be persisted/merged...

3
голосов
2ответов
1988 просмотров

Mapping a table called "group" in Hibernate for DB2 and HSQLDB

I have a table called group, that I am trying to map using hibernate for DB2 and HSQLDB. Table name group is a reserved word and it must be quoted in HSQLDB. However DB2 does not like quoted table name. So this mapping works in HSQLDB but not in DB2: @Entity @Table(name="`group`") public class ...

0
голосов
4ответов
163 просмотров

Database and table of arbitrary percentages?

This question is kind of complicated and I do not even know how to Google for it in the first place. I am even having loads of difficulty phrasing my question coherently but here goes! Hi guys, I need some help with some SQL. I am making a database (DB2 Express-C) backend for a company's corpora...

4
голосов
1ответов
2967 просмотров

How do I figure out if a column size is in bytes or characters from the column metadata?

I am working on some software that has to create dummy entries in various databases (Oracle, DB2, SQLServer) temporarily. Every column in the the row is filled with random data. The code uses java.sql.DataBaseMetaData class in java to get the COLUMN_SIZE attribute to figure out how large of a r...

0
голосов
1ответов
185 просмотров

Oracle Migration Workbench

Does anybody know anything about using Migration Workbench to migrate db2 database to oracle 10G? I am getting a strange SQL1402N error when I try to get source capture.

2
голосов
7ответов
9129 просмотров

Free alternative of TOAD for DB2

I am currently using Toad for DB2 to work on my DB2 database. I just wanted to know is there any free alternative to Toad for DB2, Note: Similar question is posted earlier, but it was for TOAD [ oracle ], none of the solution specified is for DB2 obviously.

0
голосов
2ответов
3252 просмотров

Is it possible in DB2 or in any Database to detect if the table is locked or not?

Is it possible in DB2 to detect if the table is locked or not. Actually whenever we use Select statement and if that table is locked [ may be because of on going execution of insertion or deletion ] , then we have to wait till the table is unlocked. In our application sometimes it goes to even ...

4
голосов
3ответов
9894 просмотров

Is a commit needed on a select query in DB2?

I have a vendor reporting product executing queries to pull report data, no inserts, no updates just reading data. We have double our heap size 3 times and are now at 1024 4k pages, The app will run fine for a week then we will begin to see DB2 SQL error: SQLCODE: -954, SQLSTATE: 57011 indicati...

2
голосов
2ответов
2516 просмотров

pagination on jsp with DB2 as backend

I am retrieving thousands of rows from the database, but I want to display only about 200 on one jsp. I am using pagination by creating links to the next rows. Currently using DB2, the only thing I can do is a FETCH FIRST 200 rows. So by the time I get to the 5th page, I am doing a FETCH FIRST 1...

0
голосов
1ответов
1702 просмотров

DB2 - LUW 8.2 Can you restore one tablespace from a full DB backup to a different server

In DB2 8.2 for LUW can you restore one tablespace to a 2nd server from a full database backup without having to restore the entire database? The database backup was taken when the system was up so log files are involved. I can provide further clarification if needed. Thanks, Dave

1
голосов
1ответов
2458 просмотров

Not able to query after Alter table in DB2

We have a table someone created in DB2. I have no idea how they created it. But when I edit the table, It edits just fine. But after edit I can not query the table at all THE COLUMN CANNOT BE ADDED TO THE TABLE BECAUSE THE TABLE HAS AN EDIT PROCEDURE. I looked ibm site and found this how to edi...

1
голосов
2ответов
1349 просмотров

UNION with different data types in db2 server

I have built a query which contains UNION ALL, but the two parts of it have not the same data type. I mean, i have to display one column but the format of the two columns, from where i get the data have differences. So, if i get an example : select a,b from c union all select d,b from e a an...

14
голосов
3ответов
8718 просмотров

How to make JDBC SQLExceptions for DB2 more descriptive?

How to make SQLExceptions thrown by DB2 JDBC driver more descriptive? Currently I am getting this kind of exceptions. It is cumbersome to work with these cryptic SQLCODE and SQLSTATE numeric values. Is there a way where to make the SQL exception to contain code description. Caused by: com.ibm.d...

1
голосов
6ответов
1405 просмотров

How does Firebird client/server compare to DB2 Express C

I was about to use Firebird for a project, when someone told that DB2 Express C is also free, and with plethora of tools, and is also mature. I read Firebird is also good for use as enterprise client/server database. Then how does it compare to DB2 Express C? Could the experienced ones shed so...

1
голосов
1ответов
4286 просмотров

DB2: accessing the column by column number

Can I select the columns by column number like for example select custome.0, customer.1 from customer table customer with id and name as columns?

0
голосов
1ответов
1717 просмотров

how to create static cursor in db2?

I am facing a problem while creating a static cursor in DB2. This is the statement i used in my SP. DECLARE CURNAME SENSITIVE STATIC SCROLL CURSOR FOR SELECT COL1, COL2 FROM SCH.TABLENA ORDER BY COL1; on compilation it says : DB2 Database Error: ERROR [42601] [IBM][...

1
голосов
1ответов
1754 просмотров

Hitting some limit under z/OS with DB2 Connect JDBC t4 driver

We have an application connecting to DB2 under z/OS and, after a while, there seems to be some resource limit being hit on the mainframe side. Since we're using BIRT, it seems the only control we have over the JDBC code is with stanzas in the URL itself. we don't have direct Java control over the...

0
голосов
1ответов
1048 просмотров

DB2 - Ranking data by timeframe

I am trying to write a report (DB2 9.5 on Solaris) to do the following: I have a set of data, let's say it's an order table. I want to run a report which will give me, for each month, the number of orders per customer, and their "rank" that month. The rank would be based on the number of orders....

0
голосов
3ответов
2746 просмотров

How to set DB2 ODBC driver locale?

I want to import data from a DB2 database into MS Access via ODBC. The connection is set up and working but decimal values get converted due to some locale issue (German Windows). 234.75 ends up as 23475 in the Access table. I had the same issue with Oracle but was able to fix it by setting the...

0
голосов
1ответов
5715 просмотров

DB2 Runtime Error

UPDATE S SET (S.a, S.b, S.c) = ( SELECT FS.a, FS.b, FS.c FROM (SELECT T.a, T.b, T.c, T.d, T.e, CASE WHEN IS.a IS NULL THEN 'N' ELSE 'Y' END ...

4
голосов
2ответов
14452 просмотров

DB2 SQL add rows based on other rows

I have a select statement that I want to use as the basis for adding more rows to a table. The new rows will have some columns modified and the original row will have to be altered also. This is a once off occurance and the DB can be taken offline if that helps. Any ideas? Thanks, Joe =======...

7
голосов
4ответов
22225 просмотров

Java JDBC: Reply.fill()

I get the following exception at times: com.ibm.db2.jcc.b.gm: [jcc][t4][2030][11211][3.50.152] A communication error occurred during operations on the connection's underlying socket, socket input stream, or socket output stream. Error location: Reply.fill(). Message: Connection reset. ER...

3
голосов
2ответов
6049 просмотров

TransactionScope won't work with DB2 provider

I've been trying to use TransactionScope with a DB2 database (using DB2 .Net provider v 9.0.0.2 and c# 2.0) which SHOULD be supported according to IBM. I have tried all the advice i could find on the IBM forums (such as here) to no avail. I have enabled XA transactions on my XP Sp2 machine, tri...

0
голосов
1ответов
1727 просмотров

Problems using REXX to access both Teradata output and DB2 output

I have a REXX job that needs to read from both Teradata (using BTEQ) and DB2. At present, I can get it to either read from Teradata or DB2, but not both. When I try to read from both, the Teradata one (which runs first) works fine but the DB2 read gives an error of RC(1) upon attempting to open t...