0

I am executing a select query. When number of tables is 10 or less then 10 query is executing fine.

select * from  SERVEIT.ibasemaster,
SERVEIT.ticket,
SERVEIT.PSEUDOTICKETDETAILS,
SERVEIT.ticketdetails,
SERVEIT.obligationtypemaster,
SERVEIT.STATUSMASTER;

but when number of tables increase more than 10 query is not executing and giving error code "DB2 SQL Error: SQLCODE=-968, SQLSTATE=57011, SQLERRMC=null, DRIVER=4.21.29". I have searched the issue and get to know this is a space size issue. I have increased the logproimary size to 8 and logsecond size to 16 but this is also not working.

2
  • SQLCODE -968, as explained in the manual, means that the database file system is full. As mentioned by others, your cross-join of more than 10 tables likely requires enormous amount of temporary space. Consider rewriting your query. Commented Jan 10, 2017 at 13:26
  • @mustaccio- You are right.Either I need to change the query or i need to make sure that there is hundreds of gb space in my disc Commented Jan 10, 2017 at 15:49

2 Answers 2

1

In the following query

select * from SERVEIT.ibasemaster,
              SERVEIT.ticket,
              SERVEIT.PSEUDOTICKETDETAILS,
              SERVEIT.ticketdetails,
              SERVEIT.obligationtypemaster,
              SERVEIT.STATUSMASTER;

you are doing are cross join between the six tables listed, because there is no ON clause, nor are there any joining criteria in the WHERE clause. My guess is that when you hit 10 tables the result set becomes so large that it can't fit into memory, or exceeds a memory limit imposed by DB2.

If you really intend to do a cross join, then your only option might be to somehow increase memory. But a nicer solution would be to add an ON clause and restrict the size of your join result set.

Sign up to request clarification or add additional context in comments.

3 Comments

Which memory size should i increase. I have already increased the size of logprimary and logsecond.
@manoj I'm not expert enough in DB2 to answer this, but you could start by figuring out how many records each of the 10 tables has. Do you really want a cross product here?
i have actually created a view of 44 tables with the columns i need, but if i'm not able to run 10 tables, how will i run a script with 44 TABLES, any idea about increasing transaction log?
0

Possible you have the same column in different tables of your select clause, you must have uniqu name for all column into your select

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.