Translations of this page:

I have an error about CTX DDL during the installation

Sometimes (depending on your Portal installation), the user SYSTEM does not have the privileges to grant execute on the CTXSYS objects. There is 2 ways to resolve this small issue.

  • Connect as CTXSYS user, and execute the following statment.

Grant statment

    -- If forum_app is the forum schema
    GRANT execute ON ctx_ddl TO forum_app;
 

  • If you don't know the ctxsys password, you can do the following instructions after being logged as a DBA user or execute the script_ctx.sql script.

Script

 
      -- ================
      -- CTXSYS Script
      -- Version v0.0.1
      -- ================
      -- USAGE:
      -- ======
      -- Login to SQL*PLUS as SYSTEM user and then execute this SQL script as follows:
      -- @<path_to the file>\script_ctx.sql
      -- for example:
      -- @C:\forum\script_ctx.sql
      -- 
      -- Updates :
      -- =========
      -- 14/10/2005 by helyos@gmail.com : Creation.
 
      clear buffer;
      SET sqlprompt ''
      SET serveroutput ON
      SET arraysize 1
      SET trims ON
      SET linesize 240
      SET pagesize 0
      SET sqlprefix off
      SET verify off
      SET feedback off
      SET heading off
      SET timing off
      SET define ON
      SELECT '------------------------------------' FROM dual;
      SELECT '-- Initialization parameters' FROM dual;
      SELECT '------------------------------------' FROM dual;
      accept 1 char prompt '-- Enter the DBA login : '
      accept 2 char prompt '-- Enter the DBA password : '
      accept 3 char prompt '-- Enter DB TNS connect string : '
      accept 4 char prompt '-- Enter the forum owner : '
      SET echo off
      SET termout off
      spool savepass.sql
      DECLARE
      v_password dba_users.password%TYPE;
      v_status dba_users.account_status%TYPE;
      BEGIN
      -- We retrieve the old password
      SELECT password, account_status
      INTO v_password, v_status
      FROM dba_users
      WHERE username = 'CTXSYS';
      -- We change the password and we unlock the account
      dbms_output.put_line('ALTER USER ctxsys IDENTIFIED BY oracle1 ACCOUNT UNLOCK;');
      -- We connect as ctxsys
      dbms_output.put_line('CONNECT ctxsys/oracle1@&3');
      -- We do the grant statment
      dbms_output.put_line('GRANT execute ON ctx_ddl TO &4;');
      -- We connect as DBA
      dbms_output.put_line('CONNECT &1/&2@&3');
      -- We change the new password to the old version
      IF instr(v_status, 'LOCK') = 0 THEN
      dbms_output.put_line('ALTER USER ctxsys IDENTIFIED BY VALUES ''' ||
      v_password || ''';');
      ELSE
      dbms_output.put_line('ALTER USER ctxsys IDENTIFIED BY VALUES ''' ||
      v_password || ''' account LOCK ;');
      END IF;
      -- We recompile all the forum objects
      FOR rec IN (SELECT object_name
      FROM dba_objects
      WHERE owner = 'FORUM_APP'
      AND object_type = 'PACKAGE'
      ORDER BY object_id) LOOP
      dbms_output.put_line('ALTER PACKAGE &4..' || rec.object_name ||' COMPILE DEBUG BODY ;');
      END LOOP;
      dbms_output.put_line('EXIT;');
      END;
      /
      spool off;
      @savepass.sql

 
forum/faq/ctx_errors.txt · Last modified: 2009/08/11 11:43 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported