db2

Which is the Best database for Rails application?

My doubt is the following: I will start to developing a Rails application that will accesss a lot of RSS feeds or crawl sites for data (most news). It will be something like Google News but with a different approach, so I'll store a lot of news (or news summaries), classify them in different categories and use ranking and recommending t...

How does DB2 Express compare to Sql Server Express?

I have only just found out about DB2 Express. I had a quick look and was unable to find a load of information about it but would be interested in hearing how people have found it compared to SQL Server Express (particularly 2008) in terms of Ease of deployment Ease of use and development tools Limitations such as size or CPU limits...

Execute DB2 iSeries Stored Procedure from a SQL 2005 Linked Server

I am trying to execute a stored procedured from a linked database in MS SQL 2005. The linked database is a db2 database on a iseries server. I am using the iSeries IBMDASQL service provider. I am able to query the stored procedure without problems using a simple vbscript and ado. When I try to execute the same stored procedure in que...

Does DB2 have an "insert or update" statement?

From my code (Java) I want to ensure that a row exists in the database (DB2) after my code is executed. My code now does a select and if no result is returned it does an insert. I really don't like this code since it exposes me to concurrency issuses when running in a multi-threaded environment. What I would like to do is to put this l...

SQL query of multi-member file on AS400

On AS400 in interactive SQL in a 5250 session, select * from myfile returns rows from one member only when myfile has more than one member. How can I get rows from a specific member? Important: in the end I'd like to do this over JDBC with jt400 so really I want a solution that'll work there. Thanks. ...

How can I copy a record, changing only the id?

My table has a large number of columns. I have a command to copy some data - think of it as cloning a product - but as the columns may change in the future, I would like to only select everything from the table and only change the value of one column without having to refer to the rest. Eg instead of: INSERT INTO MYTABLE ( SELECT NEW_I...

How to check a procedure/view/table exists or not before dropping it in db2 9.1?

How do we write below pseudo code in db2, If (Proc exists) Drop Proc Create Proc Else Create Proc One solution I found, after googling is to ignore the return codes. Do we have a more elegant way to do this? Thanks Update: With the help of the answer below we wrote a proc as below to drop the procedures CREATE PROCEDURE SV...

DB2 - what is NF (New Functionality) mode?

I have some questions about customers about NF mode for DB2. Google had very little information about it. I've been able to infer the following but I don't completely trust it... NF and CM (compatibility mode) are settings on DB2 v8 on mainframe. DB2 v8 on z/OS in CM is designed to allow DB2 v8 to be used as a drop in replacement for...

Retrieve return value from DB2 stored procedure

I have a block of code that is repeated within a DB2 stored procedure. I would like to separate this out into a new procedure that I can call with parameters and have it return a value. How do I create a procedure to return a value and how do I call this procedure from inside my original procedure? ...

Hibernate Locking DB2 File

We're using Hibernate in our Spring web app to do reads, as well as DML with a DB2 database. This problem only occurs during an update. If we blow away the lock on the DB2 side, it appears that any updates are not syncing with the database (even though I do session.flush() and session.clear() after an update is performed). This really...

WSF and ADO with DB2 , recordset.MoveNext not supported error in vbscript

I am trying to loop on a recordset returned from db2 using a .wsf file and vbscript . the vbscript libfile(lib.vbs) is as follows '*************** Const ADOCon="Provider=IBMDADB2.1;Password=*****;User ID=*****;Data Source=yourdatasourc;" '************************ 'ADO environment is Initialised here '************************* F...

IBM.Data.DB2

Can I develop a windows application using .NET framework and IBM.Data.DB2 provider to access a DB2 database running on OS/390? Thanks in advance. ...

asynchronous select db2

Does db2 support asynchronous SQL operations? I.e. if I execute a select stmt on a table which has 20M rows and I expect back 5M rows. When I run this query via JDBC, I want the control to be returned immediately while the db is executing the query and populating the ResultSet asynchronously in the backend thread. I know some dbs like S...

IBM.Data.DB2

Hi, I made a small desktop app in .net c# using IBM.Data.DB2 provider connecting to IMB DB2 on z/OS. When i deployed this app on a machine i faced issues for runtime for IBM DB Connect then i found that i had to install the DB2 Run-Time Client Lite and i did so. Now when i run the application an error is coming "ERROR[42968][IBM] SQL800...

DTS DB2 Connection Problem

Hi all, I want to copy an Oracle Database to a DB2 one using DTS in SQL Server 2000. When I set up both connections using their respective driver, I can read both databases, and link the copy operations between them. But when I want to run the DTS package, an error shows up saying "Driver not capable." Here's the log, thanks in advan...

Is there a way to enable / disable constraints in db2 v7?

Hello people, I have to copy tables from an Oracle database to a db2 v7 one, and in order to do this (avoiding millions of drops and creates) I'd like to know if db2 has a feature like Oracle to enable / disable constraints temporarily without dropping them. Thanks in advance, Mauro. ...

How to export a DB2 database without a DB2 server

I have a db2 database file, but do not have a db2 server. I would like to export this data into something else (e.g. SQL, but it doesn't really matter what), without having to setup a full db2 server (I started looking into this, but it seems very involved). Ideally the tool would run on (Debian) Linux, but Windows/OS X is fine if nece...

How do I write a query that outputs the row number as a column?

How do I write a query that outputs the row number as a column? This is DB2 SQL on an iSeries. eg if I have table Beatles: John Paul George Ringo and I want to write a statement, without writing a procedure or view if possible, that gives me 1 John 2 Paul 3 George 4 Ringo ...

DB2 Error while retrieving rows from C++ based application

I have a legacy C code that selects a row using multiple add_field method calls part of DB2 C API. I really do not know how this method is implemented. But by looking at the code, I can see that all columns are bound to their variable counterparts using this method. Sample call looks like this: add_field("acct_num", SQL_VARCHAR, account...

Exception while running number of queries concurrently on DB2

We are testing an application specific Design where we need to show progressive counts after firing many queries simultaneously. When we are firing a single query, we are successfully able to get Results Asynchronously. But, when we are firing 3-4 queries simultaneously, after a significant amount of time & after getting some records f...