ORA-30511: invalid DDL operation in system triggers

Hi,
I am calling a procedure in a Trigger.
In that Procedure EXECUTE IMMEDIATE is used to CREATE a table.
But when The Trigger is firing its giving Error as :ORA-30511: invalid DDL operation in system triggers
Kindly any help will be needful for me

user598986 wrote:
Hi,
I am calling a procedure in a Trigger.
In that Procedure EXECUTE IMMEDIATE is used to CREATE a table.
But when The Trigger is firing its giving Error as :ORA-30511: invalid DDL operation in system triggers[I thought I already explained it|http://forums.oracle.com/forums/message.jspa?messageID=3379456#3379683]. And again, granting privileges dynamically in a logon trigger is a very bad design. If you want to stick to it, you could schedule a job in trigger, as Timur suggested, however keep in mind, job runs asynchronously, so trigger will have to wait for the job to finish. Otherwise there might be a gap where session would not have privs granted yet.
SY.

Similar Messages

  • ORA-29283 invalid file operation

    NLSRTL      10.2.0.5.0     Production
    Oracle Database 10g Enterprise Edition      10.2.0.5.0     64bi
    PL/SQL      10.2.0.5.0     Production
    TNS for IBM/AIX RISC System/6000:      10.2.0.5.0     Productio
    I am trying to get the content of a trace file generated for me.
    Because I don't have privileges to log on the server and copy the trace file for me directly with some os user, I am doing the following:
    1. I alter my session trace identifier to easier identify the trace file
    ALTER SESSION SET TRACEFILE_IDENTIFIER = 'Func01';2. I invoke DBMS_MONITOR
    3. I run the procedure I want to monitor.
    4. I disable the monitoring by calling DBMS_MONITOR
    5. At this point I run the following query to identify my trace file:
    select u_dump.value || '/' || instance.value || '_ora_' || v$process.spid || nvl2(v$process.traceid, '_' || v$process.traceid, null ) || '.trc'"Trace File"
    from V$PARAMETER u_dump
    cross join V$PARAMETER instance
    cross join V$PROCESS
    join V$SESSION on v$process.addr = V$SESSION.paddr
    where 1=1
       and u_dump.name = 'user_dump_dest'
       and instance.name = 'instance_name'
       and V$SESSION.audsid=sys_context('userenv','sessionid');It gives me: /ORACLE/MYDB/trace/MYDB_ora_3616822_Func01.trc
    I have created directory in advanced on the path where the traces are stored:
    CREATE OR REPLACE DIRECTORY trace_dir AS '/ORACLE/MYDB/trace/';
    SELECT * FROM dba_directories WHERE directory_name = 'TRACE_DIR';
    Output:
    OWNER DIRECTORY_NAME DIRECTORY_PATH
    SYS     TRACE_DIR      /ORACLE/MYDB/trace/I don't have rights to grant read, write on TRACE_DIR to my user, as I am not logged with SYS.
    I created a table to store in it the lines from the trace file:
    CREATE TABLE tmp_traces_tab
      callnum NUMBER,
      line NUMBER,
      fileline CLOB
    );Then I run the following PL/SQL block to retrieve the content of the trace and store it in the table T:
    DECLARE
      l_file            UTL_FILE.file_type;
      l_location     VARCHAR2 (100) := 'TRACE_DIR';
      l_filename    VARCHAR2 (255) := 'MYDB_ora_3616822_Func01.trc';
      l_text           VARCHAR2 (32767);
      l_line           NUMBER := 1;
      l_call           NUMBER := 1;
    BEGIN
      -- Open file.
      l_file := UTL_FILE.fopen (l_location, l_filename, 'r', 32767);
      -- Read and output first line.
      UTL_FILE.get_line (l_file, l_text, 32767);
      INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
      l_line := l_line + 1;
      BEGIN
        LOOP
          UTL_FILE.get_line (l_file, l_text, 32767);
           INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
           l_line := l_line + 1;
        END LOOP;
      EXCEPTION
        WHEN NO_DATA_FOUND THEN
          NULL;
      END;
      INSERT INTO tmp_traces_tab (callnum, line, fileline) VALUES (l_call, l_line, l_text);
      l_line := l_line + 1;
      UTL_FILE.fclose (l_file);
    END;
    /And when I run the code I get the error: ORA-29283 invalid file operation.
    Is it possible to a role my user to be able to get the content of the trace files in the directory TRACE_DIR without having explicit READ , WRITE privileges on it?
    My user currently has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U1     OPR_ROLE_LOSS_SNAPSHOT_READER     YES     YES
    U1     RESOURCE     NO     YES
    U1     CONNECT     NO     YES
    U1     DBA     NO     YES
    U1     OPR_ROLE_SUPPORT_USER     YES     YESI know that on another db with different user I hit no errors when doing completely the same (of course the program unit I monitor is different).
    That other user with which I have NO issues has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U2    DBA    NO    YES
    U2    EXEC_SYS_PACKAGES_ROLE    NO    YES
    U2    EXECUTE_CATALOG_ROLE    NO    YES
    U2    CONNECT    NO    YES

    Verdi wrote:
    NLSRTL      10.2.0.5.0     Production
    Oracle Database 10g Enterprise Edition      10.2.0.5.0     64bi
    PL/SQL      10.2.0.5.0     Production
    TNS for IBM/AIX RISC System/6000:      10.2.0.5.0     Productio
    And when I run the code I get the error: ORA-29283 invalid file operation.
    Is it possible to a role my user to be able to get the content of the trace files in the directory TRACE_DIR without having explicit READ , WRITE privileges on it?
    My user currently has these roles:
    select * from dba_role_privs where grantee = USER;
    Output:
    U1     OPR_ROLE_LOSS_SNAPSHOT_READER     YES     YES
    U1     RESOURCE     NO     YES
    U1     CONNECT     NO     YES
    U1     DBA     NO     YES
    U1     OPR_ROLE_SUPPORT_USER     YES     YESI know that on another db with different user I hit no errors when doing completely the same (of course the program unit I monitor is different).
    Thanks for posting version alongwith other details.
    TO my knowledge, No you cannot.
    Privileges acquired via a Role are not valid in PL/SQL. You need to have explicit privileges.

  • Error: ORA-00920: invalid relational operator (WWV-16016)

    Hi,
    When I try to query in the form, I'm getting the following error
    An unexpected error occurred: ORA-00920: invalid relational operator (WWV-16016).
    The form has a field of type varchar2 with lov attached to it. This error is happening only if I enter characters more than 40 or select a value which has more than 40 characters from the lov.
    Anbody had this problem?..Is there a solution for this?..Help would be appreciated.
    Thanks
    PJ

    I figured out the problem and it seems like if the value has any 'IN' or 'BETWEEN' and try to query this error is happening and it's not because of character length. I think Portal assumes that relational operator is entered and tries to query based on those words. Is it a bug in the Portal?..
    Thanks
    PJ

  • Case with where clause - ORA-00920: Invalid relational operator

    Hi All, when I try to run the query below, I get the following error...
    ORA-00920: invalid relational operator
    00920. 00000 -  "invalid relational operator"
    *Cause:   
    *Action:
    Error at Line: 16 Column: 5
    Does anyone know what's wrong with my query? thanks in advance.
    SELECT concat (year,period)
    FROM DD_ACTUALS_FACT
    WHERE CASE Period
    WHEN 'JAN' THEN '01'
    WHEN 'FEB' THEN '02'
    WHEN 'MAR' THEN '03'
    WHEN 'APR' THEN '04'
    WHEN 'MAY' THEN '05'
    WHEN 'JUN' THEN '06'
    WHEN 'JUL' THEN '07'
    WHEN 'AUG' THEN '08'
    WHEN 'SEP' THEN '09'
    WHEN 'OCT' THEN '10'
    WHEN 'NOV' THEN '11'
    WHEN 'DEC' THEN '12'
    END as "MonthNo"
    ORDER BY CONCAT (year,"MonthNo") DESC

    The problem is the as "MonthNo" - you can't give an "AS" alias to an expression in a where clause.
    You have not actually given any condition, just a set of translations from period into a number.
    You also haven't said what you're trying to do.
    Perhaps you want:
    SELECT concat (year,period)
    FROM DD_ACTUALS_FACT
    WHERE something
    ORDER BY CONCAT (year, CASE Period
    WHEN 'JAN' THEN '01'
    WHEN 'FEB' THEN '02'
    WHEN 'MAR' THEN '03'
    WHEN 'APR' THEN '04'
    WHEN 'MAY' THEN '05'
    WHEN 'JUN' THEN '06'
    WHEN 'JUL' THEN '07'
    WHEN 'AUG' THEN '08'
    WHEN 'SEP' THEN '09'
    WHEN 'OCT' THEN '10'
    WHEN 'NOV' THEN '11'
    WHEN 'DEC' THEN '12'
    END  ) DESC

  • Requesting help-On a report Getting ora-00920 invalid relational operator.

    Hi everyone,
    I am having a report region with the following query:
    select CASE
    WHEN ISITRECENTADDENDUM(meckey_fk,code)
    THEN
    '<a href="javascript:popUp2('''
                   || 'f?p=&APP_ID.:61:&SESSION.::NO::P61_MECKEY_FK:'
                   || &P60_MECKEY.
                   || ''', 700, 700);">'
    || '<img src="#IMAGE_PREFIX#gobut.gif">'
    || '</a>'
    ELSE NULL
    END EditAddendum,
    '<a href="javascript:popURL('''
                   ||'&REPORTS_URL.keynewmec&P_1=&P60_MECNUM.'
                   || ''', 700, 700);">'
    || '<img src="#WORKSPACE_IMAGES#printer.jpg">'
    || '</a>'
    PrintMEC,
    "CODE",
    "MECKEY_FK",
    "ADDENDUM",
    "WHO_CREATED",
    "WHEN_CREATED"
    from "C_ADDENDUMS"
    where "MECKEY_FK" = v('P60_MECKEY')
    And my function returning boolean is as follows:
    create or replace FUNCTION "ISITRECENTADDENDUM"
    (meckeyi in number,
    codei in varchar2)
    return Boolean
    is
    x varchar2(1);
    begin
    select max(code) into x from c_addendums where meckey_fk = meckeyi;
    if x = codei then
    return true;
    else
    return false;
    end if;
    exception
    when others then
    return FALSE;
    end;
    But I am getting ORA-00920 invalid relational operator. Can anyone please help me out? I am not knowing where the error is. When I run the function by itself I am getting "False" returned as expected. Appreciate any advice on this.
    Rgds,
    Suma.

    Suma,
    It looks like what you are trying to do is display a link for the record with the highest value in the Code column, and nothing for the other records.
    If that is the case, you can eliminate the function and just use a SQL query like this:
    (not tested)
    select CASE
              WHEN code = Max(code) over (partition by meckey_fk)
                 THEN
                   '<a href="#">'
                   || ' '
                   || '< img class="TargetAlertIcon" src="chrome://targetalert/content/skin/internal.png"></a>'
              ELSE NULL
           END EditAddendum,
           '<a href="#">'
           || ' '
           || '< img class="TargetAlertIcon" src="chrome://targetalert/content/skin/internal.png"></a>' PrintMEC,
           "CODE", "MECKEY_FK", "ADDENDUM", "WHO_CREATED", "WHEN_CREATED"
      from "C_ADDENDUMS"
    where "MECKEY_FK" = :P60_MECKEYIs that what you're trying to do?
    Doug

  • Strange errors ORA-00604 ORA-30511 ORA-06512

    Hello, any clues about what could casuse this error? It is Oracle 11.2.0.1
    SQL> drop user config cascade;
    drop user config cascade
    ERROR en linea 1:
    ORA-00604: se ha producido un error a nivel 1 de SQL recursivo
    ORA-30511: operacion DDL no valida en los disparadores del sistema
    ORA-06512: en linea 993
    ORA-30511: operacion DDL no valida en los disparadores del sistemaIf I try to drop a table I get the same error. Never seen that before... Any clues?

    DBA-ES wrote:
    Hello, any clues about what could casuse this error? It is Oracle 11.2.0.1
    SQL> drop user config cascade;
    drop user config cascade
    ERROR en linea 1:
    ORA-00604: se ha producido un error a nivel 1 de SQL recursivo
    ORA-30511: operacion DDL no valida en los disparadores del sistema
    ORA-06512: en linea 993
    ORA-30511: operacion DDL no valida en los disparadores del sistemaIf I try to drop a table I get the same error. Never seen that before... Any clues?
    30511, 00000, "invalid DDL operation in system triggers"
    // *Cause:  An attempt was made to perform an invalid DDL operation
    //          in a system trigger. Most DDL operations currently are not
    //          supported in system triggers. The only currently supported DDL
    //          operations are table operations and ALTER?COMPILE operations.
    // *Action: Remove invalid DDL operations in system triggers.

  • Using regexp_instr in a where clause - invalid relational operator

    Whey I try to run this query in TOAD I get an ORA-00920: invalid relational operator error. It's part of a 10g stored procedure. When I highlight it and run it it prompts me for the missing values and then the error pops up. The AND in line 4 is highlighted.
    select CRIME_CLASSIFICATION_ID, crime_type, nvl(count(CRIME_CLASSIFICATION_ID),0) as CRIMECNT
    From vaps.vw_offenses
        where  regexp_instr(valoc,to_char(location_id))
            AND ( fromdate is null or
             offense_date between to_date(fromdate, 'mm/dd/yyyy')  AND to_date(todate,'mm/dd/yyyy')
    group by crime_classification_id, crime_type

    Hi,
    Review what REGEXP_INSTR does: it returns a NUMBER.
    Your WHERE clause couldn't make any sense if you used any other kind of NUMBER expression in that place, e.g. a NUMBER literal such as 12:
    select CRIME_CLASSIFICATION_ID, crime_type, nvl(count(CRIME_CLASSIFICATION_ID),0) as CRIMECNT
    From vaps.vw_offenses
        where  12     -- This is obviously wrong
            AND ( fromdate is null or
             offense_date between to_date(fromdate, 'mm/dd/yyyy')  AND to_date(todate,'mm/dd/yyyy')
    group by crime_classification_id, crime_type
    It's not going to work any better with a function (like REGEXP_INSTR) that returns a NUMBER.
    How can you fix it?  That depends on what you want to do.  Why are you calling REGEXP_INSTR?  What is that condition checking?
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Invalid relational operator

    Hi,
    if I :
    create table t (a number, b number, c number);
    and then run the following query:
    delete from t where a='1' and (b, c) in (
    select b, c from t
    where a='1'
    group by b, c
    having count(*) > 1);
    -- nothing to see here
    I get the following error:
    ORA-00920: invalid relational operator
    If I remove the "-- nothing to see here" comment, the query runs fine.
    If I remove the quotes around the 1s it also runs fine, with or without the trailing comment.
    I had a look through the forum and couldn't see this listed anywhere, though I presume others have come across similar problems?
    I presume there is a simpler test case; I tried to reduce it a bit, but most of what is there seems to be needed to reproduce the error.
    Note that it doesn't have to be a comment following the query; any text at all will cause the same error.
    regards,
    William

    Having just played around a bit, if you change the subquery to just return a single column, say "b" rather than "b" and "c":
    delete from t where a='1' and b in (
    select b from t
    where a='1'
    group by b
    having count(*) > 1);
    -- nothing to see here
    Then I get error "ORA-00911: invalid character" instead.
    If I run the buffer as a script (F5) I get:
    SQL ERROR:ORA-00911: invalid character
    delete from t where a='1' and b in (
    select b from t
    where a='1'
    group by b
    having count(*) > 1);
    -- nothing to see here
    ORA-00911: invalid character
    In case that helps you locate it at all.
    Note: if I move the "group by" clause onto the where line then it runs correctly.
    regards,
    William
    Message was edited by:
    user454290

  • REVOKE/GRANT statement in system triggers

    Hi,
    I am creating DDL trigger and want to use DCL statement in trigger body. I wrote the below trigger bu it is giving error that invalid DDL operation s in trigger.
    Could anyone suggest that how we can use the below DCL statement in trigger body.
    CREATE OR REPLACE TRIGGER trg_after_ddl
    AFTER DDL ON SCHEMA
    BEGIN
    IF ( ora_login_user = 'X' ) THEN
         IF (ora_database_name = 'XYZ.WORLD') THEN               
              EXECUTE IMMEDIATE 'REVOKE CREATE TABLE FROM X';
              EXECUTE IMMEDIATE 'REVOKE CREATE SEQUENCE FROM X';          
         END IF;
    END IF;      
    END;
    Thanks.
    Alok

    Hi Forstmann,
    You are correct that's why I am getting this error.
    Could you suggest any other way to achieve this. My requirement is that provide create rights when user tries to create some object and after creation of object revoke the same.
    Regards,
    Alok

  • ORA-01010 Invaild OCI operation accessing 7.3.4.5 dbs using jdbc (ojdbc14.j

    We are migrating our database monitoring application from one host to another. First host used an earlier version (8.9) of sitescope and the new host is v 9.5.x. On the new host, most monitors are working correctly, but our monitors for Oracle 7.3.4.5 database are not working correctly. Connection attempts to those databases return the error ORA-01010 : Invalid OCI Operation.
    The timestamp on ojdbc14.jar is March 30 2007. It is my suspiciion that this driver is too new to access the 7.3.4.5 databases, while older versions of the driver worked. Unfortunately, the applicatoin administrator can not downgrade the jdbc driver because sitecope needs to connect to a new database which was not working before the driver was upgraded.
    Sitescope documenation mentions "You should only have one Oracle client installed on the SiteScope machine. If there is more that one client installed, SiteScope may report an error and be unable to connect to the database" (http://sitescope.tellurian.net/SiteScope/docs/oracleMon.htm).
    Is there any workaroudn for the Invalid OCI operation error when connecting to ORacle 7 database using new JDBC drivers?

    Is there any workaroudn for the Invalid OCI operation error when connecting to ORacle 7 database using new JDBC drivers?V10 Oracle software is not compatible with V7 Oracle DB.
    Oracle V9.1 software could interoperate with both V7 & V10+
    Good Luck!

  • Internal SYS_OP_ATG function generates "ORA-00904: : invalid identifier"

    After gathering system statistics a MERGE statement within a PLSQL block now always raises "ORA-00904: : invalid identifier". Investigation points to internal SQL executed by the CBO using the SYS_OP_ATG function to be the culprit. What is this function and why does it raise "ORA-00904: : invalid identifier"? As a temporary solution deleting system statistics has made the problem disappear. My concern is that it will reappear.
    Merge statement is within a procedure within a package. Nothing had been re-compiled. System statistics were gathered then the following statement errors every time. There is an exception handler around it which raises the "ORA-00904: : invalid identifier". Delete system stats and it all works fine again:
    MERGE INTO lp_data lp
    USING (
    SELECT
    f.ubimsg_id ubimsg_id,
    f.endpoint_id endpoint_id,
    f.msg_created_date msg_created_date,
    t.end_time end_time,
    DECODE(t.units_used,255,0, t.units_used) units_used,
    DECODE(t.units_used,255,'N', 'Y') reading_received
    FROM TABLE (CAST (tab_lp_values AS load_profiles)) t,
    (SELECT ubirec.ubimsg_id ubimsg_id ,ubirec.endpoint_id endpoint_id, ubirec.msg_created_date msg_created_date FROM dual) f
    ) lp_rec
    on (lp.endpoint_id = lp_rec.endpoint_id
    and lp.end_time = lp_rec.end_time)
    when matched then
    update set lp.entry_date = lp_rec.msg_created_date,
    lp.ubimsg_id = lp_rec.ubimsg_id,
    lp.units_used = lp_rec.units_used / 10,
    lp.reading_received = lp_rec.reading_received
    when not matched then
    insert (lp.endpoint_id,
    lp.end_time,
    lp.entry_date,
    lp.ubimsg_id,
    lp.units_used,
    lp.reading_received)
    values (lp_rec.endpoint_id,
    lp_rec.end_time,
    lp_rec.msg_created_date,
    lp_rec.ubimsg_id,
    lp_rec.units_used / 10,
    lp_rec.reading_received );
    The line FROM TABLE (CAST (tab_lp_values AS load_profiles)) t casts a plsql object collection. An SQL trace showed the following SQL which must be internal SQL generated for the MERGE statement.
    SELECT distinct TBL$OR$IDX$PART$NUM("LP_DATA", 0, 1, 0, "END_TIME") FROM
    (SELECT "LP_REC"."END_TIME" "END_TIME" FROM (SELECT :B1 "UBIMSG_ID",:B2 "ENDPOINT_ID",:B3 "MSG_CREATED_DATE",
    SYS_OP_ATG(VALUE(KOKBF$),1,2,2) "END_TIME",
    DECODE(SYS_OP_ATG(VALUE(KOKBF$),2,3,2),255,0,SYS_OP_ATG(VALUE(KOKBF$),2,3,2)) "UNITS_USED",
    DECODE(SYS_OP_ATG(VALUE(KOKBF$),2,3,2),255,'N','Y') "READING_RECEIVED"
    FROM TABLE(CAST(:B4 AS "LOAD_PROFILES") ) "KOKBF$","SYS"."DUAL" "DUAL") "LP_REC") ORDER BY 1
    Without system statistics the trace did not have this statement in it, and the explain plan for the MERGE differed.
    Oracle 11.1.0.7.0 Windows 32-BIT.
    select * from v$version;
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE 11.1.0.7.0 Production
    TNS for 32-bit Windows: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    SQL> show parameter compatible
    compatible string 11.1.0.0.0
    Any help to explain / resolve this issue would be much appreciated.

    Duplicate thread: CBO on 11G generates ORA-00904 with SYS_OP_ATG

  • Getting ORA-00903:invalid table name with both system and table owner

    Hi All,
    Oracle version 9.2
    I'm trying to retrieve some information from a few tables and import them to Excel. I haven't got much idea about ORACLE, but I'm not able to do anything.
    I open SQL PLus, and use CONNECT SYSTEM/[email protected] AS SYSDBA
    The console shows connected.
    I use select table_name,owner from dba_tables where owner='USER1';
    I can see the tables I want to access in the output.
    I do select * from USER1.TABLE1 and also tried with select * from TABLE1, both return ORA-00903:invalid table
    I also tried to connect with "CONNECT USER1/[email protected]" also shows connected, but then same error ORA-00903:invalid table
    Could anyone guide me so I can find out whats going on wrong??
    Thanks.. Best regards!

    Great! this worked! At least now I know I can read the data.
    Now I would like to get the data from this table into Excel 2007, but I can't install Office in the ORACLE server, so I have setup my client computer (Windows 2003 server with Excel 2007).
    I installed the ORACLE ODBC driver, and put the TNSName.ora file into the network admin folder.
    I successfully create the ODBC connector, and try connection is successfull. However, when I try to get the data, Excel send an error saying that it cannot list the tables!
    Anyway, any simple solution will do. If there is an easy way of making ORACLE create for example a CSV file with all the data from the table it will be good as well. What would be the easiest way?

  • ORA-01017: invalid username/password; logon denied quality system refresh from production

    Dear All;
    I am in the post activities of SAP system refresh.
    I restored the system using brtools successfully as you can see below:
    then I went with the rest of the steps based on sap recomendations, and reached to SAP sql queries:
    CREATE USER "OPS$<DOMAIN>\<SID>ADM" DEFAULT TABLESPACE SYSTEM TEMPORARY TABLESPACE PSAPTEMP IDENTIFIED EXTERNALLY;
    CREATE USER "OPS$<DOMAIN>\SAPSERVICE<SID>" DEFAULT TABLESPACE SYSTEM TEMPORARY TABLESPACE PSAPTEMP IDENTIFIED EXTERNALLY;
    GRANT CONNECT, RESOURCE, SAPDBA TO "OPS$<DOMAIN>\<SID>ADM";
    GRANT CONNECT, RESOURCE, SAPDBA TO "OPS$<DOMAIN>\SAPSERVICE<SID>";
    CREATE TABLE "OPS$<DOMAIN>\<SID>ADM".SAPUSER (USERID VARCHAR2(256), PASSWD VARCHAR2(256));
    INSERT INTO "OPS$<DOMAIN>\<SID>ADM".SAPUSER VALUES ('SAPSR3', '<Password>');
    CREATE SYNONYM "OPS$<DOMAIN>\SAPSERVICE<SID>".SAPUSER FOR "OPS$<DOMAIN>\<SID>ADM".SAPUSER;
    CONNECT /
    GRANT SELECT, UPDATE ON "OPS$<DOMAIN>\<SID>ADM".SAPUSER TO "OPS$<DOMAIN>\SAPSERVICE<SID>";
    CONNECT /as sysdba
    GRANT CONNECT, RESOURCE TO "OPS$<DOMAIN>\SAPSERVICE<SID>";
    GRANT CONNECT, RESOURCE TO "OPS$<DOMAIN>\<SID>ADM";
    I checked if all users are on opened state using select USERNAME,ACCOUNT_STATUS from dba_users;
    The database is running file, and it is opened, but when I run R3trans -d it gives me RC 12 and i get this error:
    *** ERROR => CONNECT failed with sql error '1017'
    set_ocica() -> SQL error code 1017
    -->oci_get_errmsg (con=0, rc=1017)
    OCIErrorGet -> SQL error code: 1017
    ORA-01017: invalid username/password; logon denied
    DbSlConnect(con=0) -> orc=0, 99=DBSL_ERR_DB
    ***LOG BY2=>sql error 1017   performing CON
    ***LOG BY0=>ORA-01017: invalid username/password; logon denied
    I used brconnect -u / -f chpass -o PSAPSR3 -p sap so i can reset the password, but still I am getting the same invalid username or password error.
    I checked the listener status, and it is running.
    Kindly let me know how I can fix my error
    Best Regards
    ~Amal Aloun

    Dear Gaurav;
    I am running SAP Kernel 720 64bit unicode PL300
    The content of my trans log file is the following:
    4 ETW000 r3trans version 6.23 (release 720 - 15.05.12 - 20:12:03).
    4 ETW000 unicode enabled version
    4 ETW000 ===============================================
    4 ETW000
    4 ETW000 date&time   : 05.08.2014 - 17:50:30
    4 ETW000 control file: <no ctrlfile>
    4 ETW000 R3trans was called as follows: r3trans -d
    4 ETW000  trace at level 2 opened for a given file pointer
    4 ETW000  [     dev trc,00000]  Tue Aug 05 17:50:30 2014                                                 149  0.000149
    4 ETW000  [     dev trc,00000]  db_con_init called                                                        27  0.000176
    4 ETW000  [     dev trc,00000]  set_use_ext_con_info(): rsdb/ssfs_connect not set => ssfs not used        41  0.000217
    4 ETW000  [     dev trc,00000]  determine_block_commit: no con_hdl found as blocked for con_name = R/3
    4 ETW000                                                                                                  28  0.000245
    4 ETW000  [     dev trc,00000]  create_con (con_name=R/3)                                                 14  0.000259
    4 ETW000  [     dev trc,00000]  Loading DB library 'dboraslib.dll' ...                                    44  0.000303
    4 ETW000  [     dev trc,00000]  DlLoadLib success: LoadLibrary("dboraslib.dll"), hdl 0, addr 000007FEF1650000
    4 ETW000                                                                                                 947  0.001250
    4 ETW000  [     dev trc,00000]      using "E:\usr\sap\TST\SYS\exe\uc\NTAMD64\dboraslib.dll"               18  0.001268
    4 ETW000  [     dev trc,00000]  Library 'dboraslib.dll' loaded                                            19  0.001287
    4 ETW000  [     dev trc,00000]  function DbSlExpFuns loaded from library dboraslib.dll                    23  0.001310
    4 ETW000  [     dev trc,00000]  Version of 'dboraslib.dll' is "720.00", patchlevel (0.215)               242  0.001552
    4 ETW000  [     dev trc,00000]  function dsql_db_init loaded from library dboraslib.dll                   26  0.001578
    4 ETW000  [     dev trc,00000]  function dbdd_exp_funs loaded from library dboraslib.dll                  34  0.001612
    4 ETW000  [     dev trc,00000]  New connection 0 created                                                 237  0.001849
    4 ETW000  [     dev trc,00000]  0: name = R/3, con_id = -000000001, state = DISCONNECTED, tx = NO , bc = NO , hc = NO , perm = YES, reco = NO , frco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO , prog = 
    4 ETW000                                                                                                  56  0.001905
    4 ETW000  [     dev trc,00000]  db_con_connect (con_name=R/3)                                             20  0.001925
    4 ETW000  [     dev trc,00000]  determine_block_commit: no con_hdl found as blocked for con_name = R/3
    4 ETW000                                                                                                  25  0.001950
    4 ETW000  [     dev trc,00000]  find_con_by_name found the following connection:                          16  0.001966
    4 ETW000  [     dev trc,00000]  0: name = R/3, con_id = 000000000, state = DISCONNECTED, tx = NO , bc = NO , hc = NO , perm = YES, reco = NO , frco = NO , timeout = 000, con_max = 255, con_opt = 255, occ = NO , prog = 
    4 ETW000                                                                                                  36  0.002002
    4 ETW000  [     dev trc,00000]  -->DbSlConnect(vers=-1, type=0, env='[default env]', userid='[default usr]')
    4 ETW000                                                                                                  53  0.002055
    4 ETW000  [     dev trc,00000]  DIR_CLIENT_ORAHOME is not set as profile nor env. parameter.             574  0.002629
    4 ETW000                        Assuming using instant client with unspecified location.
    4 ETW000  [     dev trc,00000]  Register application info.                                                97  0.002726
    4 ETW000  [     dev trc,00000]  Oracle client version: 10.2.0.4.0, (dbsl 720 220612, UNICODE[2])       10033  0.012759
    4 ETW000  [     dev trc,00000]  Detailed Oracle client (patch) info not available.                        30  0.012789
    4 ETW000  [     dev trc,00000]    Default connection: tnsname ='TST'                                      73  0.012862
    4 ETW000  [     dev trc,00000]  -->oci_initialize(con=0, char='UTF16', nchar='AL16UTF16', nls=-1),uc_ln=2
    4 ETW000                                                                                                  50  0.012912
    4 ETW000  [     dev trc,00000]  OCIEnvCreate(mode=16384=OCI_UTF16) returned 0 (for default NLS handle)
    4 ETW000                                                                                                1828  0.014740
    4 ETW000  [     dev trc,00000]     OCIHandleAlloc(OCI_HTYPE_ERROR, con=0, ErrHp=027944B0)                 58  0.014798
    4 ETW000  [     dev trc,00000]     OCIHandleAlloc(OCI_HTYPE_ERROR, con=0, ErrBt=02796088)                 36  0.014834
    4 ETW000  [     dev trc,00000]  NLS env. settings: lang=41004D00450052004900430041004E00                 167  0.015001
    4 ETW000  [     dev trc,00000]                     terr=41004D0045005200490043004100                      29  0.015030
    4 ETW000  [     dev trc,00000]                     char=55005400460031003600                              22  0.015052
    4 ETW000  [     dev trc,00000]  Client NLS setting (by OCINlsGetInfo(con=0)): 'AMERICAN_AMERICA.UTF16'
    4 ETW000                                                                                                  43  0.015095
    4 ETW000  [     dev trc,00000]  charset='UTF16', ncharset='AL16UTF16', UNI_ASC=FALSE                      19  0.015114
    4 ETW000  [     dev trc,00000]  Logon as OPS$-user to get SAPSR3's password                               28  0.015142
    4 ETW000  [     dev trc,00000]  Connecting as /@TST on connection 0 (nls 0) ... (dbsl 720 220612, UNICODE[2])
    4 ETW000                                                                                                  61  0.015203
    4 ETW000  [     dev trc,00000]     OCIHandleAlloc(OCI_HTYPE_SVCCTX, con=0, svchp=02795F48)               370  0.015573
    4 ETW000  [     dev trc,00000]  Allocating server context handle                                          31  0.015604
    4 ETW000  [     dev trc,00000]  Attaching to database server TST (con=0, svchp=02795F48, srvhp=0279EFF8)
    4 ETW000                                                                                                  74  0.015678
    4 ETW000  [     dev trc,00000]  Assigning server context 0279EFF8 to service context 02795F48          30008  0.045686
    4 ETW000  [     dev trc,00000]     OCIHandleAlloc(OCI_HTYPE_SESSION, con=0, usrhp=027ABBE0)               86  0.045772
    4 ETW000  [     dev trc,00000]  Starting user session: OCISessionBegin(con=0, usr='/', svc=02795F48, srv=0279EFF8, usr=027ABBE0)
    4 ETW000                                                                                                  40  0.045812
    4 ETW000  [     dev trc,00000]     OCISessionBegin(OCI_DEFAULT) failed with -1=OCI_ERROR               28164  0.073976
    4 ETW000  [     dev trc,00000]     OCISessionBegin(OCI_DEFAULT) failed with SQL error 1017:               95  0.074071
    4 ETW000  [     dev trc,00000]     ORA-01017: invalid username/password; logon denied                                                                       
    4 ETW000                                                                                                  39  0.074110
    4 ETW000  [    dbsloci.,00000]  *** ERROR => CONNECT failed with sql error '1017'                         38  0.074148
    4 ETW000  [     dev trc,00000]     set_ocica() -> SQL error code 1017                                     19  0.074167
    4 ETW000  [     dev trc,00000]  -->oci_get_errmsg (con=0, rc=1017)                                        20  0.074187
    4 ETW000  [     dev trc,00000]     OCIErrorGet -> SQL error code: 1017                                    57  0.074244
    4 ETW000  [     dev trc,00000]     ORA-01017: invalid username/password; logon denied                                                                       
    4 ETW000                                                                                                  39  0.074283
    4 ETW000  [     dev trc,00000]  Info: 99=DBSL_ERR_DB, oerr=1017, try to connect with default password.
    4 ETW000                                                                                                  38  0.074321
    4 ETW000  [     dev trc,00000]  Connecting as SAPSR3/<pwd>@TST on connection 0 (nls 0) ... (dbsl 720 220612, UNICODE[2])
    4 ETW000                                                                                                  30  0.074351
    4 ETW000  [     dev trc,00000]  Assigning username to user session: con=0, usrhp= 027ABBE0                23  0.074374
    4 ETW000  [     dev trc,00000]  Assigning password to user session: con=0, usrhp=027ABBE0                 36  0.074410
    4 ETW000  [     dev trc,00000]  Starting user session: OCISessionBegin(con=0, usr='SAPSR3', svc=02795F48, srv=0279EFF8, usr=027ABBE0)
    4 ETW000                                                                                                 133  0.074543
    4 ETW000  [     dev trc,00000]  Tue Aug 05 17:50:40 2014                                             9992977  10.067520
    4 ETW000  [     dev trc,00000]     OCISessionBegin(OCI_DEFAULT) failed with -1=OCI_ERROR                  33  10.067553
    4 ETW000  [     dev trc,00000]     OCISessionBegin(OCI_DEFAULT) failed with SQL error 1017:               85  10.067638
    4 ETW000  [     dev trc,00000]     ORA-01017: invalid username/password; logon denied                                                                       
    4 ETW000                                                                                                  37  10.067675
    4 ETW000  [    dbsloci.,00000]  *** ERROR => CONNECT failed with sql error '1017'                         29  10.067704
    4 ETW000  [     dev trc,00000]     set_ocica() -> SQL error code 1017                                     19  10.067723
    4 ETW000  [     dev trc,00000]  -->oci_get_errmsg (con=0, rc=1017)                                        18  10.067741
    4 ETW000  [     dev trc,00000]     OCIErrorGet -> SQL error code: 1017                                    55  10.067796
    4 ETW000  [     dev trc,00000]     ORA-01017: invalid username/password; logon denied                                                                       
    4 ETW000                                                                                                  52  10.067848
    4 ETW000  [     dev trc,00000]     DbSlConnect(con=0) -> orc=0, 99=DBSL_ERR_DB                            22  10.067870
    4 ETW000  [    dblink  ,00000]  ***LOG BY2=>sql error 1017   performing CON                               58  10.067928
    4 ETW000  [    dblink  ,00000]  ***LOG BY0=>ORA-01017: invalid username/password; logon denied            22  10.067950
    2EETW169 no connect possible: "DBMS = ORACLE                           --- dbs_ora_tnsname = 'TST'"
    Best Regards
    ~Amal Aloun

  • System copy : ORA-01017: invalid username/password; logon denied

    Hello SAPiens,
    I have to perform a system copy of Bank analyzer 6, NW7.1, ABAP stack only on AIX 5.3, MCOD oracle 10.2.0.4 DB. I'm arriving to the sapinst parameters screen asking for the securestore key. The key is accepted, then it asks for the JAVA components DVD. An issue occurs after this step (JVM is uncompressed then tries to access the DB). Here is th UTL_load_usage :
    cat UTL_load_usages.log
    <!--LOGHEADER[START]/-->
    <!--HELP[Manual modification of the header may cause parsing problem!]/-->
    <!--LOGGINGVERSION[1.5.7.1006]/-->
    <!--NAME[UTL_load_usages.log]/-->
    <!--PATTERN[UTL_load_usages.log]/-->
    <!--FORMATTER[com.sap.tc.logging.TraceFormatter(%24d %7s: %m)]/-->
    <!--ENCODING[UTF8]/-->
    <!--LOGHEADER[END]/-->
    Aug 20, 2010 5:51:50 PM  Info   : Successfully parsed!
    Aug 20, 2010 5:51:50 PM  Info   : Executing command Export...
    Aug 20, 2010 5:51:50 PM  Info   : Establishing DB connection...
    Aug 20, 2010 5:51:53 PM  Path   : Exception : The DataBase is down or the connection parameters are wrong: -sid=BA3 -dsn=jdbc/pool/BA3 -ssprops=/usr/sap/BA3/SYS/global/security/data/SecStore.properties -ssk=/usr/sap/BA3/SYS/global/security/data/SecStore.key -keyphrase=null
    java.lang.Exception
            at com.sap.exception.BaseExceptionInfo.traceAutomatically(BaseExceptionInfo.java:1230)
            at com.sap.exception.BaseExceptionInfo.<init>(BaseExceptionInfo.java:457)
            at com.sap.exception.BaseException.<init>(BaseException.java:303)
            at com.sap.sl.ut.infoprovider.exceptions.UTInfoException.<init>(UTInfoException.java:99)
            at com.sap.sl.ut.manager.persistence.db.DataBaseInfoFactory.connect(DataBaseInfoFactory.java:373)
            at com.sap.sl.ut.manager.persistence.db.DataBaseInfoFactory.constructSystemInfo(DataBaseInfoFactory.java:776)
            at com.sap.sl.ut.manager.command.Export.executeExportKDB(Export.java:57)
            at com.sap.sl.ut.manager.command.Export.execute(Export.java:81)
            at com.sap.sl.ut.manager.command.Command.exec(Command.java:88)
            at com.sap.sl.ut.manager.UtlMain.exec(UtlMain.java:59)
            at com.sap.sl.ut.manager.UtlMain.main(UtlMain.java:55)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:161)
    Caused by: java.sql.SQLException: ORA-01017: invalid username/password; logon denied
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:283)
            at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:278)
            at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:790)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:362)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:420)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
            at com.sap.sql.connect.factory.DriverPooledConnectionFactory.createVendorConnection(DriverPooledConnectionFactory.java:50)
            at com.sap.sql.connect.factory.DriverPooledConnectionFactory.getPooledConnection(DriverPooledConnectionFactory.java:37)
            at com.sap.sql.connect.datasource.DBDataSourceImpl.createPooledConnection(DBDataSourceImpl.java:677)
            at com.sap.sql.connect.datasource.DBDataSourceImpl.newPooledConnection(DBDataSourceImpl.java:626)
            at com.sap.sql.connect.datasource.DBDataSourceImpl.getConnection(DBDataSourceImpl.java:105)
            at com.sap.sql.connect.OpenSQLDataSourceImpl.getConnection(OpenSQLDataSourceImpl.java:202)
            at com.sap.sl.ut.manager.persistence.db.DBConnection.connectViaSecureStore(DBConnection.java:159)
            at com.sap.sl.ut.manager.persistence.db.DBConnection.connect(DBConnection.java:171)
            at com.sap.sl.ut.manager.persistence.db.DataBaseInfoFactory.connect(DataBaseInfoFactory.java:371)
            at com.sap.sl.ut.manager.persistence.db.DataBaseInfoFactory.constructSystemInfo(DataBaseInfoFactory.java:776)
            at com.sap.sl.ut.manager.command.Export.executeExportKDB(Export.java:57)
            at com.sap.sl.ut.manager.command.Export.execute(Export.java:81)
            at com.sap.sl.ut.manager.command.Command.exec(Command.java:88)
            at com.sap.sl.ut.manager.UtlMain.exec(UtlMain.java:59)
            at com.sap.sl.ut.manager.UtlMain.main(UtlMain.java:55)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at com.sap.engine.offline.OfflineToolStart.main(OfflineToolStart.java:161)
    Aug 20, 2010 5:51:53 PM  Info   : Severe (database) error. Return code: 64
    I guess sapinst retreives the connection data from the securestore, but fails using it...
    The DB is up and running. I checked Oracle users, none of them are locked.
    Can anyone kindly advice or provide a search path for shooting this issue ?
    Thank you already,
    Eric

    Hello Kiran,
    Thank you for your advice.
    the password is correct :
    #/sapmnt/BA3/global/sltools> ./checkKeyPhrase.sh -f /sapmnt/BA3/global/security/data/SecStore.properties
       INFO: Loading tool launcher...
       INFO: [OS: AIX] [VM vendor: SAP AG] [VM version: 5.1.015] [VM type: SAP Java 64-Bit Server VM]
       INFO: Main class to start: "com.sap.inst.checkKeyPhrase.CheckKeyPhrase"
       INFO: Loading 27 JAR files: [./sharedlib/checkKeyPhrase.jar, ./sharedlib/jdbc.jar, ./sharedlib/jload.jar, ./sharedlib/jload_core.jar, ./sharedlib/jperflib.jar, ./sharedlib/jsizecheck.jar, ./sharedlib/sap.com~sl.ut.infoprovider_lib.jar, ./sharedlib/sap.com~sl.ut.manager.offline.jar, ./sharedlib/sap.com~tc~antlr.jar, ./sharedlib/sap.com~tc~bl~iqlib~impl.jar, ./sharedlib/sap.com~tc~bl~jdsr~jdsr.jar, ./sharedlib/sap.com~tc~bl~offline_launcher~impl.jar, ./sharedlib/sap.com~tc~bl~opensql~implStandalone.jar, ./sharedlib/sap.com~tc~bl~sl~utility.jar, ./sharedlib/sap.com~tc~dd~db~dictionarydatabase~implDictionaryDatabase.jar, ./sharedlib/sap.com~tc~exception.jar, ./sharedlib/sap.com~tc~je~configtool.jar, ./sharedlib/sap.com~tc~je~offlineconfiguration~impl.jar, ./sharedlib/sap.com~tc~logging~java~impl.jar, ./sharedlib/sap.com~tc~sapxmltoolkit~sapxmltoolkit.jar, ./sharedlib/sap.com~tc~sdt~cvl~impl.jar, ./sharedlib/sap.com~tc~sec~secstorefs~java~core.jar, ./../security/lib/tools/iaik_jce.jar, ./../security/lib/tools/iaik_jsse.jar, ./../security/lib/tools/iaik_smime.jar, ./../security/lib/tools/iaik_ssl.jar, ./../security/lib/tools/w3c_http.jar]
       INFO: Start
    Key phrase::::::::::::
    The key phrase is correct.
    I guess sapinst is retrieving the DB  password from the securestore, tries to connect but gives back the incorrect password error message. But how can that DB password be incorrect if the system is up and running?
    What is the DB user name sapinst retreives from the securestore ?
    Kind regards,
    Eric

  • Solutions for ORA-20054: Invalid Operation

    Hello,
    We are running Apex 3.2 / Oracle 11g on 4 separate environments.
    We have been running an apex app to load data from csv files into tables for over 3 years.
    In our development environment, we are suddenly receiving ORA-20054: Invalid Operation when we run the app.
    In our Testing/QA environment, the app runs and loads files successfully.
    Are there settings that have changed to raise this error in the one environment?
    If so, what should be checked?
    Thank you.

    Hi Jari,
    This is the "when" clause in the exception handler of the proc:
    WHEN UTL_FILE.invalid_operation
    Then
    (-20054, 'Invalid Operation');
    Sorry, but I am not sure what you mean by "real error database gives"
    Thanks

Maybe you are looking for