Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Can you restrict keywords in Custom SQL Queries?

    Posted Fri June 14, 2024 12:26 PM
    Edited by brenda grossnickle Fri June 14, 2024 05:27 PM

    We allow cognos users to write and execute custom (user defined) sql queries. But, we would like to scan the custom queries and restrict the query from executing it contains certain key words. Is that possible? If not, how do we limit custom sql?



    ------------------------------
    brenda grossnickle
    BI Programmer Analyst
    FIS
    ------------------------------



  • 2.  RE: Can you restrict keywords in Custom SQL Queries?

    Posted Mon June 24, 2024 12:08 PM

    Anyone have any thoughts on how this could be accomplished? I realize that it would be custom development. We have already looked into Deny permissions for writing and executing User Defined SQL but they do not accomplish what we want. We want to allow User Defined SQL to execute unless it contains certain key words. 



    ------------------------------
    brenda grossnickle
    BI Programmer Analyst
    FIS
    ------------------------------



  • 3.  RE: Can you restrict keywords in Custom SQL Queries?

    Posted Tue June 25, 2024 02:58 AM

    Hi Brenda,

    I tend to say that this is impossible with Cognos customizing features and there's also no way in tweaking local files on the server that I'm aware of. The only thing that comes in my mind is to create SQL rewrite rules on the database server itself for the user that is used for the DB connection in Cognos. BUT: this must then be a second user independent from the regular user for database connections. If tit would be the same user then Cognos would be denied those keywords too.

    Don't know if that is of any help....



    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ Gebr. Müller Apparatebau GmbH & Co. KG
    Ingelfingen
    ------------------------------



  • 4.  RE: Can you restrict keywords in Custom SQL Queries?

    Posted Wed June 26, 2024 11:23 AM

    @Robert Dostal - thanks for replying. it is looking like there is not a way to restrict user defined sql from using certain text. shame, i can think of several use cases for this. 



    ------------------------------
    brenda grossnickle
    BI Programmer Analyst
    FIS
    ------------------------------