COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: Lynn on 03 Dec 2012 12:43:43 PM

Title: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: Lynn on 03 Dec 2012 12:43:43 PM
Hi all,
My client has just upgraded the development environment to 10.2. There are a number of reports that have queries with hard coded SQL in them. Yes, we all know this is a bad idea and they are in the process of rectifying this, but it takes time.

In the meantime, they find that previously working reports containing SQL now fail with the error below. These are set to Native SQL Syntax and they run properly directly against the database. This is occurring for Oracle and for DB2 databases. Changing the syntax to pass through allows them to run, but I don't think this is really a solution to the problem. Native syntax should be supported. They are opening a trouble ticket but I wondered if anyone else who upgraded to 10.2 has run into this problem.

Thanks!

UDA-SQL-0107 A general exception has occurred during the operation "prepare".[IBM][CLI Driver][AS] SQL0104N An unexpected token "<END-OF-STATEMENT>" was found following "". Expected tokens may include: ") FETCH ORDER UNION EXCEPT".
Title: Re: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: CognosPaul on 03 Dec 2012 03:28:18 PM
That error is coming from the datasource. So Cognos is attempting to run the query in the db. Can you trace the query? The problem is dependent on how it's malformed.
Title: Re: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: Lynn on 03 Dec 2012 06:22:06 PM
Cognos support confirmed that this is a logged defect in 10.2.
Title: Re: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: CognosPaul on 04 Dec 2012 12:13:05 AM
Well, that's not fun. Did they give more details about what the defect is? A specific way the SQL is written, or is all hand-written SQL in 10.2 problematic?
Title: Re: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: norkos on 04 Dec 2012 08:45:32 AM
Native SQL is also problematic if you use Cognos 10.1.1 on IBM DB2. You have to uncheck the WITH clause option under edit governor menu item or you can use the native SQL only in limited local mode.

So the IBM guys solved an issue and created a new one   :o
Title: Re: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: Lynn on 04 Dec 2012 11:59:27 AM
I did not handle the trouble ticket phone call, but my understanding is that it was all hand-coded SQL affected rather than isolated to a specific syntax.

Apparently it was logged as a bug just the day before this particular ticket. They have opted to roll back the upgrade here until a fix is available.
Title: Re: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: RubenvdLinden on 05 Dec 2012 04:37:05 AM
Do you know anything about a hotfix, or do we have to wait for fixpack 1?
Title: Re: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: Lynn on 05 Dec 2012 07:54:37 AM
I have not heard anything yet but will post back when I do.
Title: Re: Cognos 10.2 Upgrade Issue - SQL based queries
Post by: MFGF on 07 Dec 2012 08:16:39 AM
Ouch! Not good!! I know IBM best practice discourages the use of hand-crafted native SQL queries, but I think they have shown a little too much fervor in this latest push to get you to comply :)

I hope it gets fixed soon, Lynn!!

MF.