Questions tagged [iseries]

IBM mid-range computers, previously called AS/400

58 questions
8
votes
2 answers

How can I enable distributed transactions for a linked server?

I have a SQL Server 2012 instance with a linked server pointing to a db2 database on an IBM Iseries system using the System i Access ODBC Driver. I'm trying to enable distributed transactions. I believe this provider does support them as per IBM…
6
votes
7 answers

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, 'John', 'Smith') After a few hours another…
Ano
  • 61
  • 1
  • 2
5
votes
1 answer

SQL Server OPENQUERY vs Regular Query against AS400

I log into a SQL Server database which has an AS400 server as a linked server. I've discovered that running queries against this AS400 server is MUCH faster if I run the select in an OPENQUERY... SELECT EMEQP# FROM _ WHERE EMALOC = '467' AND EMDLCD…
Theo
  • 153
  • 1
  • 5
5
votes
1 answer

Measure Performance for INSERT, UPDATE and DELETE commands on DB2

I have a DB2 database with a table for daily transactions, which is cleared to a history table at the end of the day, every day. I insert rows to this table via java-JDBC INSERT commands and they usually take less than a second to complete but…
4
votes
2 answers

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 statements in the WHERE clause, as in ...
Daniel Williams
  • 936
  • 4
  • 11
  • 19
4
votes
1 answer

How do I resolve this data source connection issue with Cognos?

We have (fairly recently) installed IBM's Cognos 10 as our business intelligence reporting tool. Most of the databases that we report over are DB2 9.7 LUW Enterprise Edition. We installed the DB2 Runtime-Time Client in order for Cognos to have…
Chris Aldrich
  • 4,916
  • 5
  • 34
  • 55
4
votes
2 answers

IBM i Access ODBC driver returning only first letter of column names

I'm new to DB2 and am connecting to a DB2 for i (V7R1) database using unixODBC and the IBM i Access ODBC driver for Linux. When I query the database, the results only include the first letter of the column names. For example, a typical query run…
Liv Carman
  • 83
  • 6
3
votes
1 answer

What is object Server?

As I was reading article I came across IBM's site about object Server. What actually is Object Server and what are it's uses? Can this be explained for a beginner?
kinkajou
  • 479
  • 2
  • 8
  • 21
3
votes
3 answers

UPDATE ... FROM ... syntax for iSeries for a MS SQL Server developer

When I wanted to update a table to the values from another table in SQL Server I would use following syntax: UPDATE t1 SET t1.a = t2.a FROM t1 INNER JOIN t2 ON t2.b = t1.b What would be iSeries 7 syntax for that?
ajeh
  • 911
  • 5
  • 14
  • 31
3
votes
2 answers

Why cannot I call a table function in iSeries DB2 that I just created?

Using iSeries Navigator 'Run an sql script' window I created a new table function. When I go to the Functions branch under the schema where it was created, I see the function among the other few. But when I call the function in the same Run an sql…
ajeh
  • 911
  • 5
  • 14
  • 31
3
votes
1 answer

I need the identical lines to merge

Previous question: Return row with values if nothing fits the conditions I almost got this working. The problem that I have is that this variant of query does not merge the line from the SELECT with the one in the UNION if they are the same: SELECT…
3
votes
5 answers

SQL Query with ODBC, Joins and Group Bys

I am having issues with the statement below. The main purpose of the query is to pull a list of customers into an Access db from ODBC (our customers are stored in DB2 on IBM i). The query is intended to look for a customer (OM01U1.OM01015) that…
KNG
  • 31
  • 1
  • 2
3
votes
1 answer

How do I perform XPath query on a XML column on DB2 for i?

I have an XML column in a table. I would like to retrieve only the first child element from the XML document in each row (i.e. the result of an XPath expression /root/someVal[1]) and return in my query its child elements as a columns in DB2 for IBM…
Justin Dearing
  • 2,717
  • 6
  • 36
  • 52
3
votes
1 answer

How to resolve foreign key references across different databases (iSeries and SQL Server)

I've got a system that has a DB2 iSeries database. We are rewriting a portion of the system and implementing it using SQL Server and Entity Framework. Originally, I was lead to believe that there wasn't much of a tie-in between the tables we are…
ChrisC
  • 131
  • 2
2
votes
1 answer

Error updating zoned field from SQL Server stored procedure linked server to iSeries

I'm trying to update a table on an iSeries (AS400) within a SQL Server stored procedure using linked server, but it is failing when trying to update a column defined as zoned. In my stored procedure the value is defined as integer, and on the…
1
2 3 4