Forum Stats

  • 3,767,979 Users
  • 2,252,735 Discussions
  • 7,874,399 Comments

Discussions

SQLcl and dollar sign on DB objects

User_RQVRB
User_RQVRB Member Posts: 1 Green Ribbon

Hi all


Trying to use SQLcl here and it hangs on doing a 

lb genschema -split

Upon CTRL+C it shows "illegal group reference."


It seems it doesn't like our packages or triggers with the dollar sign '$', as if I try to do a simple describe :


SQL> DESCRIBE AG$SOMETHING_SOMETHING


It outputs:


"Illegal group reference."


This works fine for other objects with simpler names, without the dollar sign.


So this is related to regex it seems. 


Is there any way around this, or it simply is impossible to work with dollar sings in db objects with SQLcl?


Thanks for your time and attention!

Comments

  • user9540031
    user9540031 Member Posts: 129 Silver Badge

    Hello,

    Which release of SQLcl are you using? You might want to try the latest (https://download.oracle.com/otn_software/java/sqldeveloper/sqlcl-latest.zip) if that's not what you have.

    Very basic test using the latest version:

    SCOTT @ upgr > show version
    Oracle SQLDeveloper Command-Line (SQLcl) version: 21.3.2.0 build: 21.3.2.287.1503
    
    SCOTT @ upgr > create or replace package some$package as
      2      procedure some$proc ( p_some$arg in number );
      3  end some$package;
      4* /
    
    Package SOME$PACKAGE compiled
    
    SCOTT @ upgr > desc some$package
    Illegal group reference
    PROCEDURE SOME$PROCSCOTT @ upgr > 
    

    So yes, "$" characters in package names seem to hurt, at least as far as DESCRIBE is concerned; INFO seems to work on the other hand, so you might use that as a workaround/replacement.

    SCOTT @ upgr > info some$package
    Package
    
    /* Package SCOTT.SOME$PACKAGE */
    /*  PROCEDURE  SCOTT.SOME$PACKAGE.SOME$PROC  */
        SCOTT.SOME$PACKAGE.SOME$PROC(   P_SOME$ARG   =>  p_IN_param0  /*   NUMBER   */);
    

    FWIW the lb genschema command just worked—of course this is just an elementary test, not anything like trying it on a real-life, real-size code base.

    My two cents...

    Regards,