From: T.Paulus on
Hi folks,

I just installed a fresh OpenSolaris with the latest image available
(uname -a returns $ SunOS host01 5.11 snv_111b i86pc i386 i86pc
Solaris)

After installing OpenSolaris I set up also IBM DB2 Express C V9.7. The
installation process was successful and I tried to login as db2inst1
to create my first database.

$ db2 create database SAMPLE

This command returns an error. The error is:

SQL0101N The statement is too long or too complex. SQLSTATE=54001

I didn't any special configuration or setup modifications. Everything
runs straight forward. Do you have any idea what is the reason for
this error?

Cheers,
paul
From: Helmut Tessarek on
Hi Paul,

> SQL0101N The statement is too long or too complex. SQLSTATE=54001

Can you please post the last entries from db2diag.log (can be found in
sqllib/db2dump)?
Or zip the file and attach it to your next post.


--
Helmut K. C. Tessarek
DB2 Performance and Development

/*
Thou shalt not follow the NULL pointer for chaos and madness
await thee at its end.
*/
From: Lennart Jonsson on
On 2010-06-23 01:11, T.Paulus wrote:
> Hi folks,
>
> I just installed a fresh OpenSolaris with the latest image available
> (uname -a returns $ SunOS host01 5.11 snv_111b i86pc i386 i86pc
> Solaris)
>
> After installing OpenSolaris I set up also IBM DB2 Express C V9.7. The
> installation process was successful and I tried to login as db2inst1
> to create my first database.
>
> $ db2 create database SAMPLE
>
> This command returns an error. The error is:
>
> SQL0101N The statement is too long or too complex. SQLSTATE=54001
>
> I didn't any special configuration or setup modifications. Everything
> runs straight forward. Do you have any idea what is the reason for
> this error?
>

You can ask db2 for more details regarding an error message via:

[db2inst1@... ~/bin] db2 "? SQL0101N"


SQL0101N The statement is too long or too complex.

Explanation:

The statement could not be processed because it exceeds a system limit
for either length or complexity, or because too many constraints or
triggers are involved.

If the statement is one that creates or modifies a packed description,
the new packed description may be too large for its corresponding column
in the system catalogs.

Federated system users should also check to see if the statement:
* Exceeds either a federated server system limit or a data source
system limit for length or complexity.
* Violates some other data source specific limit.

The statement cannot be processed.

Note: Where character data conversions are performed for applications
and databases running under different codepages, the result of the
conversion is exceeding the length limit.

User response:

Either:
* Break the statement up into shorter or less complex SQL statements.
* Increase the size of the statement heap (stmtheap) in the database
configuration file.
* Reduce the number of check or referential constraints involved in the
statement or reduce the number of indexes on foreign keys.
* Reduce the number of triggers involved in the statement.
* Federated system users: determine which data source is failing the
statement (see the Troubleshooting Guide for procedures to follow to
identify the failing data source) and determine the cause of the
rejection. If the rejection is coming from the federated server,
increase the size of the statement heap (stmtheap) in the database
configuration file.

sqlcode: -101

sqlstate: 54001



/Lennart
From: T. Paulus on
On 23 Jun., 01:40, Helmut Tessarek <tessa...(a)evermeet.cx> wrote:
> Hi Paul,
>
> > SQL0101N  The statement is too long or too complex.  SQLSTATE=54001
>
> Can you please post the last entries from db2diag.log (can be found in
> sqllib/db2dump)?
> Or zip the file and attach it to your next post.
>
> --
> Helmut K. C. Tessarek
> DB2 Performance and Development
>
> /*
>    Thou shalt not follow the NULL pointer for chaos and madness
>    await thee at its end.
> */

Hi Helmut,

Here you can find the logfile:
http://www.file-upload.net/download-2620563/db2diag.log.html
It is cleaned and contains only the records from the beginning of the
CREATE DATABASE statement.

It seems like there are a couple of errors :/

Thanks for your help,
--paul
From: T. Paulus on
On 23 Jun., 06:07, Lennart Jonsson <erik.lennart.jons...(a)gmail.com>
wrote:
> On 2010-06-23 01:11, T.Paulus wrote:
>
>
>
> > Hi folks,
>
> > I just installed a fresh OpenSolaris with the latest image available
> > (uname -a returns $ SunOS host01 5.11 snv_111b i86pc i386 i86pc
> > Solaris)
>
> > After installing OpenSolaris I set up also IBM DB2 Express C V9.7. The
> > installation process was successful and I tried to login as db2inst1
> > to create my first database.
>
> > $ db2 create database SAMPLE
>
> > This command returns an error. The error is:
>
> > SQL0101N  The statement is too long or too complex.  SQLSTATE=54001
>
> > I didn't any special configuration or setup modifications. Everything
> > runs straight forward. Do you have any idea what is the reason for
> > this error?
>
> You can ask db2 for more details regarding an error message via:
>
> [db2inst1@... ~/bin] db2 "? SQL0101N"
>
> SQL0101N  The statement is too long or too complex.
>
> Explanation:
>
> The statement could not be processed because it exceeds a system limit
> for either length or complexity, or because too many constraints or
> triggers are involved.
>
> If the statement is one that creates or modifies a packed description,
> the new packed description may be too large for its corresponding column
> in the system catalogs.
>
> Federated system users should also check to see if the statement:
> *  Exceeds either a federated server system limit or a data source
>    system limit for length or complexity.
> *  Violates some other data source specific limit.
>
> The statement cannot be processed.
>
> Note: Where character data conversions are performed for applications
>       and databases running under different codepages, the result of the
>       conversion is exceeding the length limit.
>
> User response:
>
> Either:
> *  Break the statement up into shorter or less complex SQL statements.
> *  Increase the size of the statement heap (stmtheap) in the database
>    configuration file.
> *  Reduce the number of check or referential constraints involved in the
>    statement or reduce the number of indexes on foreign keys.
> *  Reduce the number of triggers involved in the statement.
> *  Federated system users: determine which data source is failing the
>    statement (see the Troubleshooting Guide for procedures to follow to
>    identify the failing data source) and determine the cause of the
>    rejection. If the rejection is coming from the federated server,
>    increase the size of the statement heap (stmtheap) in the database
>    configuration file.
>
>  sqlcode: -101
>
>  sqlstate: 54001
>
> /Lennart

Thanks for your answer Lennart,

I already know how to get the error message and the error description
of a sqlcode # and a sqlstate #. I also found what this error means,
but imho it is not possible to write a CREATE DATABASE statement less
complex ;)

Cheers,
--paul