1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Error- pls-00201: identifier 'ctx_ddl' must be declared

Discussion in 'SQL PL/SQL' started by sania, Oct 23, 2018.

  1. sania

    sania Active Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    80
    Location:
    india
    Hi,

    I am trying to create a procedure as follows-

    CREATE PROCEDURE try_ctx IS
    BEGIN
    CTX_DDL.CREATE_POLICY ('test_policy', 'CTXSYS.AUTO_FILTER');
    END;

    I am unable to understand what does this error mean?what should I do to eliminate this error . Please help.

    Thank you,
     
  2. myankitx

    myankitx Newly Initiated

    Messages:
    6
    Likes Received:
    3
    Trophy Points:
    40
    Location:
    jaipur
    ctx_ddl , it could be variable or function so declare variable , before using it
     
  3. sania

    sania Active Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    80
    Location:
    india
    what data type does ctx_ddl take? I tried to declare as ctx_ddl varchar2; but is throwing error
     
  4. zargon

    zargon Community Moderator Forum Guru

    Messages:
    2,645
    Likes Received:
    370
    Trophy Points:
    1,430
    Location:
    Aurora, CO
    It is NOT a 'variable', it's a packaged procedure that may NOT be installed by default. Posting such 'advice' only leads to more confusion.

    CTS_DDL is a package used to manage context indexes in the XDB schema sometimes installed with Oracle. There is a script that needs to be run to create this package:

    $ORACLE_HOME/rdbms/admin/dbmsxdbt.sql

    By design the XDB database user gets privileges on this package when it is created. Other users can be granted privileges but it's designed to be used by the XDB account. ConText indexes are text indexes for text-based searches in the database, in this case the XDB schema.

    This basic information is found on the web and should have been researched BEFORE offering any assistance so that wrong advice would not have been given. Research BEFORE writing is best so that misinformation or incorrect 'advice' is not dispensed.
     
  5. sania

    sania Active Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    80
    Location:
    india
    Thank you :)