Logon Trigger should not be invalidated

HI ,
I have a login trigger.When the objects being used by this are chaned (DDL) ,trigger is becoming invalid and its not allowing end users to login.
Though i ll make sure that Triggers will be disabled before any DDL to objects being used by this trigger ,I want to know is there any way to stop this invalidation.
Because we never know when these objects can be changed.I want to aviod Trigger to be invalidated and block users to login.
Is there any way to do this.
Thanks,
pramod

Maybe this will work.
Say your current trigger_body is this:
begin
  <lots of plsql and sql stuff here>
end;You could change that into:
begin
  execute immediate 'begin <lots of plsql and sql stuff here> end;';
end;That way:
1) there is not direct DEPENDENCY between <lots of plsql and sql stuff here> and your (new) trigger code. So the trigger object won't get invalidated anymore.
2) the trigger always submits an anonymous pl/sql block (via exec imm.), i.e. not a stored plsql object that has a STATUS. The plsql block would probably get an automatic recompile, I think.
Worth a try.
Toon
PS. you might want to use the new quoting mechanism (10G +) if your trigger body has a lot of single quotes now. So new trigger body:
begin
  execute immediate q'{begin <lots of plsql and sql stuff here> end;}';
end;

Similar Messages

  • Logon trigger setting nls_date_format over ridden by sql developer?

    Problem: Developers are inserting a Date record into a varchar field. I can't change this process right now. Non-Date info is stored here also. Would require a code change.
    To simplify this, I wanted to get all the developers to insert using the same 'nls_date_format'. I had hoped to be able to centralize this by having Oracle set it in the database. I tried this by setting the database nls_date_format and with a logon trigger.
    See test below. Seems to be over ridden.
    Test case is with SQL Developer. Noticed the same thing when developers use Websphere. I think we reduce the chance for errors, if I can handle this in the database. However, my nls_date_format settings are getting over ridden.
    1. s et database parameter nls_date_format to YYYY-MM-DD HH24:MI:SS , this gets over riden by SQL Developer/Websphere
    2. Created a trigger with an 'alter session', but this seems to get over ridden also.
    Please see test case below:
    Oracle 11.2.0.3
    test logging: SQLPLUS locally on the unix server, then log in using SQL Developer which is installed on my laptop.
    SQL Developer NLS_DATE_FORMAT : YYYY-MON-DD HH24:MI:SS , This is different for test purposes
    I have auditing turned turned on to db,extended with 'audit all by 'user' by access;' for test purposes to get more info.
    create table test (username varchar2(30),sid number,mytest varchar2(300),insert_date date);
    create or replace
    TRIGGER LOGINTRG
    AFTER LOGON ON DATABASE
    BEGIN
    insert into test select user,   sys_context('USERENV','SID') ,value,sysdate from v$parameter where name = 'nls_date_format';
    EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_DATE_FORMAT=''YYYY-MM-DD HH24:MI:SS''';
    insert into test select user,   sys_context('USERENV','SID') ,value,sysdate from v$parameter where name = 'nls_date_format';
    commit;
    END LOGINTRG;
    /Results/Questions
    1. When I select from 'test', I confirm that my NLS_DATE_FORMAT is the same both before and after the alter session.
    2. select value from v$parameter where name = 'nls_date_format'
    output: YYYY-MON-DD HH24:MI:SS (so sql developer is over riding this);
    3. select * from dba_audit_trail where username = 'MYUSER' order by timestamp desc;
    The SQLs from the logon trigger are not captured. how do I capture logon trigger sqls? Not a huge deal, just curious
    4. I do not see any alter sessions issued by my user. shouldn't audit all by access capture that? how could my session nls_date_format change without an alter session?
    Edited by: Guess2 on Apr 22, 2013 10:44 AM

    >
    Problem: Developers are inserting a Date record into a varchar field.
    >
    No - they aren't. That is physically impossible. The only thing that can be stored in a 'varchar field' is a string. Oracle considers ANYTHING stored in a character column to be a string.
    Date values are stored in DATE columns. Perhaps you meant that developers are converting DATE values to strings and then storing the string in a 'varchar field'?
    >
    I can't change this process right now. Non-Date info is stored here also.
    >
    WONDERFUL! Why use a column to stored just one type of data? That is extremely wasteful. Hopefully you store strings that represent numbers in that same column also? It makes the data model so much easier to understand if developers only need to learn one datatype.
    >
    Would require a code change.
    >
    The horror!
    You should never, ever, EVER use a code change to fix a problem if there is even the slightest possibility that you can change the ENTIRE DATABASE instead.
    I've got good news though. You are now on version Oracle 11.2.0.3 and Oracle, after months of protests by some of their largest clients, has finally dropped the exhorbitant license fees for using some of the more esoteric datatypes like DATE and NUMBER.
    You should suggest to your manager that they use some of the license fee money saved to hire developers that already know how to design proper data models and use those new-fangled datatypes.
    Trust me - once you've made it up that steep learning curve your code will have fewer of those pesky 'dirty data' issues to deal with.
    Sure - it means less job security for your current developers. But sometimes you just have to 'take one for the team'!

  • Logon Trigger setting NLS_SESSION_PARAMETERS not working

    Hello,
    I have a problem with a logon trigger setting session parameters:
    create or replace
    TRIGGER standard.after_logon_trg
    AFTER LOGON ON STANDARD.SCHEMA
    BEGIN
      DBMS_APPLICATION_INFO.set_module(USER, 'Initialized');
      EXECUTE IMMEDIATE ('ALTER SESSION SET current_schema=standard');
      EXECUTE IMMEDIATE ('ALTER SESSION SET NLS_DATE_LANGUAGE=''AMERICAN''');
      EXECUTE IMMEDIATE ('ALTER SESSION SET NLS_TERRITORY=''AMERICA''');
      EXECUTE IMMEDIATE ('ALTER SESSION SET NLS_TIMESTAMP_FORMAT=''HH24:mi:ss''');
      EXECUTE IMMEDIATE ('ALTER SESSION SET NLS_DATE_FORMAT=''YYYY-MM-DD''');
      EXECUTE IMMEDIATE ('ALTER SESSION SET NLS_COMP=LINGUISTIC');
      EXECUTE IMMEDIATE ('ALTER SESSION SET NLS_SORT=BINARY_CI');
      insert into standard.testcc (bezeichnung, datum) values ('logontrigger', SYSDATE);
    END;After I log in, the new row is added to the table, but the session parameters are completely untouched.
    select * from NLS_SESSION_PARAMETERS says:
    NLS_LANGUAGE     GERMAN
    NLS_TERRITORY     GERMANY
    NLS_CURRENCY     €
    NLS_ISO_CURRENCY     GERMANY
    NLS_NUMERIC_CHARACTERS     ,.
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD.MM.RR
    NLS_DATE_LANGUAGE     GERMAN
    NLS_SORT     GERMAN
    NLS_TIME_FORMAT     HH24:MI:SSXFF
    NLS_TIMESTAMP_FORMAT     DD.MM.RR HH24:MI:SSXFF
    NLS_TIME_TZ_FORMAT     HH24:MI:SSXFF TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD.MM.RR HH24:MI:SSXFF TZR
    NLS_DUAL_CURRENCY     €
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     BYTE
    NLS_NCHAR_CONV_EXCP     FALSEIf I execute the ALTER SESSION statements in the sql console (as user standard) they work perfectly, so this seems to be no permission issue.
    Whats wrong with the trigger?
    Thanks and regards
    Christian
    Edited by: 853536 on 20.04.2011 00:31
    OK, I've traced the entire database, and found out that my parameters are overwritten. So after my trigger has been executed, the NLS Session parameters are altered, for example:
    =====================
    PARSING IN CURSOR #4 len=386 dep=0 uid=40 oct=3 lid=40 tim=4721509708 hv=302297662 ad='ab275c28'
    select parameter,value from nls_session_parameters
    union all SELECT 'DB_TIMEZONE' name, DBTIMEZONE  value FROM DUAL
    union all SELECT 'SESSION_TIMEZONE' name, SESSIONTIMEZONE value FROM DUAL
    union all SELECT 'SESSION_TIMEZONE_OFFSET' name, TZ_OFFSET(SESSIONTIMEZONE) value from DUAL
    union all SELECT parameter, value FROM nls_database_parameters WHERE parameter='NLS_CHARACTERSET'
    END OF STMT
    PARSE #4:c=0,e=3962,p=0,cr=4,cu=0,mis=1,r=0,dep=0,og=1,tim=4721509705
    EXEC #4:c=0,e=21,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=4721509816
    FETCH #4:c=0,e=111,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,tim=4721509976
    FETCH #4:c=0,e=132,p=0,cr=0,cu=0,mis=0,r=10,dep=0,og=1,tim=4721510598
    FETCH #4:c=0,e=204,p=0,cr=3,cu=0,mis=0,r=1,dep=0,og=1,tim=4721511118
    STAT #4 id=1 cnt=21 pid=0 pos=1 obj=0 op='UNION-ALL  (cr=3 pr=0 pw=0 time=264 us)'
    STAT #4 id=2 cnt=17 pid=1 pos=1 obj=0 op='FIXED TABLE FULL X$NLS_PARAMETERS (cr=0 pr=0 pw=0 time=128 us)'
    STAT #4 id=3 cnt=1 pid=1 pos=2 obj=0 op='FAST DUAL  (cr=0 pr=0 pw=0 time=1 us)'
    STAT #4 id=4 cnt=1 pid=1 pos=3 obj=0 op='FAST DUAL  (cr=0 pr=0 pw=0 time=0 us)'
    STAT #4 id=5 cnt=1 pid=1 pos=4 obj=0 op='FAST DUAL  (cr=0 pr=0 pw=0 time=1 us)'
    STAT #4 id=6 cnt=1 pid=1 pos=5 obj=96 op='TABLE ACCESS FULL PROPS$ (cr=3 pr=0 pw=0 time=194 us)'
    =====================
    PARSING IN CURSOR #3 len=41 dep=0 uid=40 oct=42 lid=40 tim=4721512239 hv=2321140216 ad='ab275184'
    alter session set NLS_TERRITORY='GERMANY'
    END OF STMT
    PARSE #3:c=0,e=329,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=4721512236
    EXEC #3:c=0,e=48,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=4721512424
    =====================
    PARSING IN CURSOR #2 len=35 dep=0 uid=40 oct=42 lid=40 tim=4721513208 hv=2785092162 ad='ab274e88'
    alter session set NLS_SORT='GERMAN'
    END OF STMT
    PARSE #2:c=0,e=283,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=4721513205
    EXEC #2:c=0,e=20,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=4721513370
    =====================
    ...This explains why they are overwritten, but I still don't know why the session parameters are altered after my trigger at all. Any idea?
    Edited by: 853536 on 20.04.2011 01:24
    Problem solved: I was using Oracle SQL Developer to edit my trigger and to try it - and SQL Developer seems to ovewrite the NLS_Session parameters. Duh.
    Edited by: 853536 on 20.04.2011 02:04

    Yes, SQL Developer will usually override the settings. It should not do this if you go to Tools->Preferences->Database->NLS and check "Skip NLS Settings".
    But, any program using JDBC OCI will also override most of the settings. Therefore, you should not rely on the database to fix the NLS settings. It is applications' job to prepare the NLS environment correctly (if the standard initialization based on the O/S settings and/or NLS_LANG is not satisfactory).
    -- Sergiusz

  • Logon trigger not working over DB-Link?

    Hi all,
    I have a serious question about accessing tables over a database link.
    I have three schema:
    DATA@SOURCE
    INTERFACE@SOURCE
    WORK@TARGET
    Schema DATA has one table called T1
    The INTERFACE schema has select privileges on all tables from DATA. Furthermore schema INTERFACE has a logon trigger to change the "current schema" to DATA:
    CREATE OR REPLACE TRIGGER TRG_A_LOGIN_SET_SCHEMA AFTER LOGON
    ON INTERFACE.SCHEMA
    BEGIN
    execute immediate 'ALTER SESSION SET CURRENT_SCHEMA = DATA';
    END;
    The WORK schema has a database link to the INTERFACE schema called INT_DB_LINK.
    I am now logged into schema WORK on the TARGET database and I am executing following statement:
    select a from T1@INT_DB_LINK
    -> it's working
    Next I execute
    declare
      cursor c is 
      select a
        from T1@INT_DB_LINK
       where rownum<2;
    begin
      for r in c loop
        null;
      end loop;
    end;
    This is not working. Error message is ORA-000942: table or view does not exist.
    But why?
    Can anyone help me?
    Thanks in advance
    Py

    Hi all,
    after a long, very long search I found what caused this strange behaviour.
    The ORA- Error was not raised by the SQL-Execution-Engine but by the SQL-Parser/SQL-Validation.
    As the second statement is an anonymous SQL block the Oracle Parser checks all objects dependencies before execution.
    This means a connection is established from TARGET to SOURCE checking if table T1 is available. The strange thing is
    that on this connection the "ALTER SESSION" trigger is not fired. So the parser does not find object T1 in schema INTERFACE.
    If I create an empty table T1 in INTERFACE the anonymous block gets parsed/validated and the statement is executed. But this
    time the block does a normal "connect session" and the trigger is fired. This means the statements accesses the T1 table in
    schema DATA. (But T1 in INTERFACE has to be existent that parse/validation works)
    I don't know if this is a bug or a feature.
    To workaround this I have created private synonyms in schema INTERFACE pointing to the objects in DATA.
    Thanks for your help!
    Py
    regarding the other qestion:
    Yes, permissions are granted over a role.

  • Sql server 2012 Logon trigger not working for certain logins

    Hello. I created a login trigger to insert data for each login in a table, and it works for all logins except one that is format domain\login
    and the login ends with the dollar sign(actual name is domain\CTXDEVDCSI1$).
    I had been using varchar, but after reading other forum posts, I changed the varchar's to nvarchar's, but it still fails for that id.
    The errors written to the sql server error log were the usual "login failed due to trigger execution".
    I had granted insert on the rvvlogindata table in dsa to public, and only one id wasn't able to login after that.
    Any suggestions would be much appreciated!
    Here's the modified table ddl:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[rvvlogindata](
    [sessionId] [int] NULL,
    [LoginTime] [datetime] NULL,
    [HostName] [nvarchar](50) NULL,
    [ProgramName] [nvarchar](300) NULL,
    [LoginName] [nvarchar](50) NULL,
    [ClientHost] [nvarchar](50) NULL
    ) ON [PRIMARY]
    GO
    Here's the logon trigger code:
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    create trigger [LOGIN_IP_RESTRICTION] on all server for logon
    as
    Begin
    Declare @LogonTriggerData xml,
    @EventTime datetime,
    @LoginName nvarchar(50),
    @ClientHost nvarchar(50),
    @HostName nvarchar(50),
    @AppName nvarchar(300)
    Set @LogonTriggerData = eventdata()
    set @EventTime = @LogonTriggerData.value('(/EVENT_INSTANCE/PostTime)[1]', 'datetime')
    set @LoginName = @LogonTriggerData.value('(/EVENT_INSTANCE/LoginName)[1]', 'varchar(50)')
    set @ClientHost = @LogonTriggerData.value('(/EVENT_INSTANCE/ClientHost)[1]', 'varchar(50)')
    set @HostName = HOST_NAME()
    set @AppName = APP_NAME()
    insert into dsa.dbo.rvvlogindata
    sessionId,
    LoginTime,
    HostName,
    ProgramName,
    LoginName,
    ClientHost
    select @@spid,
    @EventTime,
    convert(nvarchar(50),@HostName),
    convert(nvarchar(300),@AppName),
    convert(nvarchar(50),@LoginName),
    convert(nvarchar(50),@ClientHost)
    END
    GO
    SET ANSI_NULLS OFF
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    ENABLE TRIGGER [LOGIN_IP_RESTRICTION] ON ALL SERVER
    GO

    Erland, I wanted to add more info to my reply earlier today.
    sp_who2 showed no blocking, activity monitor from my local PC SSMS showed no major waits or high i/o or cpu activity.
    I was wondering if you have any suggestions on how to find out what was the cause of the 5+ minute wait for SSMS on the remote desktop to respond and fully come up.
    I definitely can't put this in production with this hanging delay possibly occurring there.
    I was connecting as read_user when it hung.
    sp_who2 output at the time was:
    1     BACKGROUND                     sa   .   . NULL LOG WRITER       54631 0 04/10
    06:59:43                                              
     1     0   
    2     BACKGROUND                     sa   .   . NULL RECOVERY WRITER  8673 0 04/10 06:59:43                                              
     2     0   
    3     BACKGROUND                     sa   .   . NULL LAZY WRITER      300691 0 04/10
    06:59:43                                              
     3     0   
    4     BACKGROUND                     sa   .   . NULL RESOURCE MONITOR 1207010 0 04/10 06:59:43                                              
     4     0   
    5     BACKGROUND                     sa   .   . NULL XE TIMER         38828 0 04/10
    06:59:43                                              
     5     0   
    6     BACKGROUND                     sa   .   . NULL XE DISPATCHER    1404 0 04/10
    06:59:43                                              
     6     0   
    7     BACKGROUND                     sa   .   . master SIGNAL HANDLER   0 0 04/10 06:59:43                                              
     7     0   
    8     BACKGROUND                     sa   .   . NULL LOCK MONITOR     179978 0 04/10
    06:59:43                                              
     8     0   
    9     sleeping                       sa   .   . master TASK MANAGER     0 11 04/21
    08:37:04                                              
     9     0   
    10    sleeping                       sa   .   . master TASK MANAGER     0 0 04/10
    06:59:44                                              
     10    0   
    11    BACKGROUND                     sa   .   . master TRACE QUEUE TASK 546 0 04/10 06:59:44                                              
     11    0   
    12    BACKGROUND                     sa   .   . NULL SYSTEM_HEALTH_MO 4930 0 04/10 06:59:44                                              
     12    0   
    13    BACKGROUND                     sa   .   . NULL RECEIVE          422 0 04/10
    06:59:45                                              
     13    0   
    14    BACKGROUND                     sa   .   . master CHECKPOINT       79137 31811 04/10
    06:59:46                                              
     14    0   
    15    BACKGROUND                     sa   .   . master TASK MANAGER     1606 0 04/10
    06:59:46                                              
     15    0   
    16    BACKGROUND                     sa   .   . NULL UNKNOWN TOKEN    0 0 04/10 06:59:46                                              
     16    0   
    17    sleeping                       sa   .   . master TASK MANAGER     0 74 04/21
    08:37:04                                              
     17    0   
    18    sleeping                       sa   .   . master TASK MANAGER     0 0 04/21
    08:18:49                                              
     18    0   
    19    sleeping                       sa   .   . master TASK MANAGER     0 0 04/21
    08:30:29                                              
     19    0   
    20    sleeping                       sa   .   . master TASK MANAGER     0 1 04/21
    08:37:14                                              
     20    0   
    21    sleeping                       sa   .   . master TASK MANAGER     0 7 04/21
    08:30:59                                              
     21    0   
    22    sleeping                       sa   .   . master TASK MANAGER     16 4 04/21
    08:37:44                                              
     22    0   
    23    sleeping                       sa   .   . master TASK MANAGER     0 15 04/21
    08:39:24                                              
     23    0   
    25    BACKGROUND                     sa   .   . master BRKR EVENT HNDLR 0 95 04/10 06:59:48                                              
     25    0   
    30    BACKGROUND                     sa   .   . master BRKR TASK        0 0 04/10
    06:59:48                                              
     30    0   
    31    BACKGROUND                     sa   .   . master BRKR TASK        16926 0 04/10
    06:59:48                                              
     31    0   
    32    BACKGROUND                     sa   .   . master BRKR TASK        0 0 04/10
    06:59:48                                              
     32    0   
    34    BACKGROUND                     sa   .   . master BRKR TASK        10701 0 04/10
    06:59:48                                              
     34    0   
    51    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    03:16:56                                              
     51    0   
    52    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     52    0   
    53    sleeping                       NT AUTHORITY\SYSTEM SQLDEV2012      . msdb AWAITING COMMAND 0 0 04/10
    06:59:58 SQLAgent - Email Logger                        53    0   
    54    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:51 Citrix:Broker#1                                54    0   
    55    sleeping                       edit_user ASDEV1          . dsa AWAITING
    COMMAND 0 0 04/21 08:55:27 jTDS                                         
     55    0   
    56    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     56    0   
    57    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     57    0   
    58    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     58    0   
    59    sleeping                       NT AUTHORITY\SYSTEM SQLDEV2012      . msdb AWAITING COMMAND 124 242 04/10
    06:59:59 SQLAgent - Generic Refresher                   59    0   
    60    sleeping                       NT AUTHORITY\SYSTEM SQLDEV2012      . msdb AWAITING COMMAND 2790 1160 04/21
    08:55:00 SQLAgent - Job invocation engine               60    0   
    61    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     61    0   
    62    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     62    0   
    63    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     63    0   
    64    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     64    0   
    65    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     65    0   
    66    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    03:16:56                                              
     66    0   
    67    sleeping                       reports_adm REPORTSDEVSI2   . JBOSS_Cluster_CRServer2011 AWAITING COMMAND 0 0 04/21
    08:52:12 jTDS                                         
     67    0   
    68    sleeping                       edit_user DCMA10685       . dsa AWAITING COMMAND 0 0 04/21
    08:56:47 jTDS                                         
     68    0   
    69    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:49 Citrix:Configuration                           69    0   
    70    sleeping                       rvanveen DCMA8460        . master AWAITING COMMAND 1794 7120 04/21
    08:51:37 Microsoft SQL Server Management Studio         70    0   
    71    sleeping                       xsp_user XSPDEVSI2       . xspv5 AWAITING COMMAND 0 0 04/21
    08:58:52 .Net SqlClient Data Provider                   71    0   
    72    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:56:01 Citrix:Monitor                                 72    0   
    73    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:30 Citrix:Monitor                                 73    0   
    74    sleeping                       rvanveen DCMA8460        . master AWAITING COMMAND 16 2 04/21
    08:53:37 Microsoft SQL Server Management Studio - Query 74    0   
    75    sleeping                       rvanveen DCMA8460        . loginaudit AWAITING COMMAND 0 22 04/21
    08:50:29 Microsoft SQL Server Management Studio - Query 75    0   
    76    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    07:05:07                                              
     76    0   
    77    sleeping                       adm_jbossportal ASDEV1          . jbossportal AWAITING
    COMMAND 0 0 04/21 08:40:27 jTDS                                         
     77    0   
    78    sleeping                       rvanveen DCMA8460        . master AWAITING COMMAND 110 542 04/21
    08:46:17 Microsoft SQL Server Management Studio - Query 78    0   
    79    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    07:05:56                                              
     79    0   
    80    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:54 Citrix:MachineCreation                         80    0   
    81    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    08:08:29                                              
     81    0   
    82    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    07:02:13                                              
     82    0   
    83    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    07:02:15                                              
     83    0   
    84    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:44 Citrix:Monitor                                 84    0   
    85    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    07:11:05                                              
     85    0   
    86    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:53 Citrix:AdIdentity                              86    0   
    87    sleeping                       DAIWA_USA\admsql SQLDEV2012      . master AWAITING COMMAND 15 2 04/21
    08:56:20 Microsoft SQL Server Management Studio - Query 87    0   
    88    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:36 Citrix:SiteServices                            88    0   
    89    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:42 Citrix:Host                                    89    0   
    90    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:47 Citrix:ConfigurationLogging                    90    0   
    91    RUNNABLE                       rvanveen DCMA8460        . master SELECT INTO    
     15 51 04/21 08:58:46 Microsoft SQL Server Management Studio - Query 91    0   
    92    sleeping                       rvanveen DCMA8460        . master AWAITING COMMAND 63 30 04/21
    08:52:34 Microsoft SQL Server Management Studio - Query 92    0   
    94    sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:53 Citrix:DelegatedAdmin                          94    0   
    95    sleeping                       DAIWA_USA\admsql SQLDEV2012      . loginaudit AWAITING COMMAND 173 27 04/21
    08:56:10 Microsoft SQL Server Management Studio         95    0   
    96    sleeping                       xsp_user XSPDEVSI2       . xspv5 AWAITING COMMAND 0 0 04/21
    08:58:33 .Net SqlClient Data Provider                   96    0   
    97    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    08:10:07                                              
     97    0   
    98    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 31 38 04/21
    08:00:31                                              
     98    0   
    99    sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    08:10:12                                              
     99    0   
    100   sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 282 04/21
    08:10:14                                              
     100   0   
    101   sleeping                       DAIWA_USA\admsql SQLDEV2012      . master AWAITING COMMAND 0 8 04/21
    08:56:50 Microsoft SQL Server Management Studio         101   0   
    102   sleeping                       DAIWA_USA\admsql SQLDEV2012      . master AWAITING COMMAND 31 0 04/21
    08:54:57 Microsoft SQL Server Management Studio         102   0   
    103   sleeping                       read_user SQLDEV2012      . master AWAITING COMMAND 0 8 04/21
    08:57:09 Microsoft SQL Server Management Studio         103   0   
    104   sleeping                       read_user SQLDEV2012      . dsa AWAITING COMMAND 0 0 04/21
    08:57:09 Microsoft SQL Server Management Studio         104   0   
    105   sleeping                       rvanveen DCMA8460        . tempdb AWAITING COMMAND 8875 336 04/21
    08:58:54 Microsoft SQL Server Management Studio         105   0   
    106   sleeping                       read_user SQLDEV2012      . master AWAITING COMMAND 16 0 04/21
    08:57:39 Microsoft SQL Server Management Studio         106   0   
    107   sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:47 Citrix:EnvTest                                 107   0   
    108   sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 2200 8514 04/21
    08:00:31                                              
     108   0   
    109   sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    07:05:56                                              
     109   0   
    110   sleeping                       rvanveen DCMA8460        . master AWAITING COMMAND 0 0 04/21
    08:58:48 Microsoft SQL Server Management Studio         110   0   
    113   sleeping                       Citrix_adm CTXDEVSI1       . XenApp6 AWAITING COMMAND 284 777 04/21
    08:51:33 Citrix IMA                                     113   0   
    119   sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:42 Citrix:ConfigurationLoggingData                119   0   
    120   sleeping                       AMERICAS\CTXDEVDCSI1$ CTXDEVDCSI1     . CitrixXDFarm1 AWAITING COMMAND 0 0 04/21
    08:58:26 Citrix:Storefront                              120   0   
    125   sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/16
    13:55:16                                              
     125   0   
    126   sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 16 0 04/16
    11:25:30                                              
     126   0   
    131   sleeping                       echouliak DCMA10685       . master AWAITING COMMAND 139 8 04/14
    15:26:55 Microsoft SQL Server Management Studio         131   0   
    135   sleeping                       echouliak DCMA10685       . dsa AWAITING COMMAND 0 0 04/14
    15:24:52 Microsoft SQL Server Management Studio - Query 135   0   
    136   sleeping                       echouliak DCMA10685       . dsa AWAITING COMMAND 0 0 04/14
    15:00:17 Microsoft SQL Server Management Studio - Query 136   0   
    140   sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    07:05:56                                              
     140   0   
    145   sleeping                       edit_user INFADEVFS2      . dsa AWAITING COMMAND 0 0 04/21
    07:05:56                                              
     145   0   

  • Closing DBA session in AFTER LOGON trigger

    Hello *,
    this is my first question here and my first piece of code in oracle so please don't laugh ;-)
    I'm trying to create an AFTER LOGON trigger which disconnects a user if he/she tries to log in from an incorrect host.
    What should happen?
    User tries to connect.
    If he/she is permitted, a record is added to a table.
    If not, a record is added to another table and the user is disconnected using RAISE_APPLICATION_ERROR().
    After a number of issues I've got it working, except ... I have the feeling that RAISE_APPLICATION_ERROR() doesn't effect users with DBA privileges.
    Finally, I'm testing it with one ordinary user - DEF.
    The main idea is to disallow connections from user ABC which has DBA privileges.
    Tests using DEF are successful but when ABC tries to log in from an incorrect host, a record is added in pcbaudit_failed_logins but the user is not disconnected.
    The database is 9.2.0.8.0 and I'm prepared to post RDA report if it is required.
    Thank you for your help in advance - I hope I was kind enough :P
    Here's the code for the trigger:
    DROP TABLE pcbaudit_users;
    CREATE TABLE pcbaudit_users (username VARCHAR2(32) NOT NULL, host VARCHAR2(64) NOT NULL);
    CREATE INDEX idx_pcbaudit_users_username ON pcbaudit_users(username);
    CREATE INDEX idx_pcbaudit_users_host ON pcbaudit_users(host);
    DROP TABLE pcbaudit_logins;
    CREATE TABLE pcbaudit_logins (username VARCHAR2(32), ip_address VARCHAR2(15), host VARCHAR2(64), ts DATE);
    DROP TABLE pcbaudit_failed_logins;
    CREATE TABLE pcbaudit_failed_logins (username VARCHAR2(32), ip_address VARCHAR2(15), host VARCHAR2(64), ts DATE);
    CREATE OR REPLACE PUBLIC SYNONYM pcbaudit_users FOR sys.pcbaudit_users;
    CREATE OR REPLACE PUBLIC SYNONYM pcbaudit_logins FOR sys.pcbaudit_logins;
    CREATE OR REPLACE PUBLIC SYNONYM pcbaudit_failed_logins FOR sys.pcbaudit_failed_logins;
    GRANT SELECT ON sys.pcbaudit_users TO public;
    GRANT INSERT ON sys.pcbaudit_logins TO public;
    GRANT INSERT ON sys.pcbaudit_failed_logins TO public;
    INSERT INTO pcbaudit_users VALUES ('SYS', '%');
    INSERT INTO pcbaudit_users VALUES ('SYSTEM', '%');
    INSERT INTO pcbaudit_users VALUES ('ABC', '%');
    INSERT INTO pcbaudit_users VALUES ('DEF', '%');
    COMMIT;
    CREATE OR REPLACE
    TRIGGER logon_pcbaudit_trigger AFTER LOGON ON DATABASE
    DECLARE
         v_username     VARCHAR2(32); /* variable that will hold current username */
         v_host          VARCHAR2(4000); /* variable that will hold current host */
         v_allowed     NUMBER(1) := 0;
         PRAGMA          AUTONOMOUS_TRANSACTION;
    BEGIN
         SELECT     UPPER(USER), /* current user */
              UPPER(SYS_CONTEXT('USERENV', 'HOST')) /* current user host */
         INTO     v_username,
              v_host
         FROM     dual;
         /* debug */
    --     DBMS_OUTPUT.PUT_LINE(v_username || '@' || v_host);
         SELECT     1
         INTO     v_allowed
         FROM     pcbaudit_users
         WHERE     UPPER(username) = v_username
    AND (
                   UPPER(REPLACE(v_host, CHR(0), '')) LIKE UPPER(host) ESCAPE '!' /* fuck that shit! Something appends CHR(0) to its host... */
                   OR
                   v_host IS NULL /* fuck that shit! Some hosts are NULLs! */
    /* write log (user has logged in!) */
    INSERT
    INTO pcbaudit_logins
    (username, ip_address, host, ts)
    VALUES
    (v_username, SYS_CONTEXT('USERENV', 'IP_ADDRESS'), v_host, SYSDATE);
    COMMIT;
    EXCEPTION
         WHEN     NO_DATA_FOUND     THEN /* occurs when no matches were found; i.e. current username is not permitted to login from the current host */
              /* log the failed attempt */
              INSERT
              INTO     pcbaudit_failed_logins
              (username, ip_address, host, ts)
              VALUES
              (v_username, SYS_CONTEXT('USERENV', 'IP_ADDRESS'), v_host, SYSDATE);
    COMMIT;
              /* disconnect user */
              RAISE_APPLICATION_ERROR(-20001, v_username || '@' || v_host || ' is not allowed to connect.');
         WHEN     OTHERS THEN
              NULL; /* in this case, NULL is better than an error - if an error occurs, user will not be able to login. */
    END;

    Thank you for your reply!
    The situation is quite complicated.
    I am aware that a user with DBA privileges can drop the trigger, modify it, etc.
    There's an application on top of it and (i don't know why) it requires dba privileges. The point is, there are developers with access to the production database and my task is to stop them from logging in with this username.
    Since I'm creating a trigger, I've obviously have no other choice. I can't change the user's password because of number of reasons, I can't deny developers' IP addresses using sqlnet.ora because they need read-only access and so on.
    I realize that this is not the way that things are being done (development cycle), but I have no other choice.
    So, is there any other way?

  • Raise_application_error in after-logon-trigger

    Hi,
    I try to build a
    after logon on database trigger,
    this should execute some inserts into an audit-table, and if some conditions are not given, I want the user to be disconnected.
    In this forum I found this thread with a trigger similar to my needs:
    To prevent TOAD access
    But RAISE_APPLICATION_ERROR in this trigger does not cancel the session and so the user stays connected to oracle. Now I am searching for a disconnect-statement!
    Wolfram

    Wolfram,
    What we have here is
    - a post without a 4 digit database version. Most questions have a version specific answer. The behavior you describe does not apply to all versions, and might even apply to SYSDBA connected users only. Is everyone connecting as SYSDBA?
    - a post without a proper description of what the trigger does, and without a proper description of the business need. This is especially important as you seem to re-invent AUDIT CONNECT.
    - a post from someone who already thinks he knows the answer.
    Rest assured: there is no disconnect statement in PL/SQL
    You would really need to come up with more details
    - database version, 4 digits
    - the actual trigger code
    - what you are trying to accomplish in terms of business requirements
    - why you can't use AUDIT
    Sybrand Bakker
    Senior Oracle DBA

  • Logon Trigger - Question

    Hi,
    I'm a beginner on the Oracle technology and I'm trying add a step on my logon trigger that avoids that the same user connects twice to the database using PL/SQL Developer.
    Here what I'm doing:
    VUSER := UPPER(SYS_CONTEXT('USERENV', 'SESSION_USER'))
    VPROGRAM := UPPER(SYS_CONTEXT('USERENV', 'MODULE'))
    SELECT COUNT(*) INTO N_SESSION
    FROM V$SESSION
    WHERE USERNAME = UPPER(SYS_CONTEXT('USERENV', 'SESSION_USER'));
    IF VUSER NOT IN ('SYS','SYSTEM') AND N_SESSION >= 2 AND VPROGRAM LIKE 'PLSQLDEV%' THEN
              RAISE_APPLICATION_ERROR(-20003,
                        'Access to database ' ||
                             UPPER(SYS_CONTEXT('USERENV', 'DB_NAME')) ||
                        ' denied for this application');
    END IF;
    For some reason, it's not working.
    Do you guys know what I should do?
    Thanks

    The trigger works fine in principle:
    CREATE OR REPLACE TRIGGER after_logon_trg
    AFTER LOGON
    ON DATABASE
    DECLARE
         n_session INTEGER;
    BEGIN
         SELECT COUNT ( * )
           INTO n_session
           FROM v$session
          WHERE username = UPPER (SYS_CONTEXT (
                                                       'USERENV',
                                                       'SESSION_USER'
         IF UPPER (SYS_CONTEXT (
                              'USERENV',
                              'SESSION_USER'
                         )) NOT IN ('SYS', 'SYSTEM')
      AND n_session >= 2
      AND UPPER (SYS_CONTEXT (
                              'USERENV',
                              'MODULE'
                         )) LIKE
                   'SQL%'
         THEN
              raise_application_error (
                   -20003,
                        'Access to database '
                   || UPPER (SYS_CONTEXT (
                                        'USERENV',
                                        'DB_NAME'
                   || ' denied for this application'
         END IF;
    END after_logon_trg;
    Session 1:
    SQL> connect scott/tiger@oracle
    Connect durchgeführt.
    Session 2:
    C:\>sqlplus scott/tiger@oracle
    SQL*Plus: Release 11.1.0.7.0 - Production on Fr Aug 28 19:05:25 2009
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    ERROR:
    ORA-00604: Fehler auf rekursiver SQL-Ebene 1
    ORA-20003: Access to database ORACLE denied for this application
    ORA-06512: in Zeile 23But beware that for users with "ADMINISTER DATABASE TRIGGER" privilege the trigger will still allow the user to login !

  • Fast ESP matching engine "Not indexed / Invalid documents"

    I have done full indexing ,and could see content is feed but not indexed and  "Not indexed / Invalid documents" is not zero in Matching engine.Please let me know cause and resolution for the same.

    Could you run resetindex command i.e %FASTSEARCH%\bin\indexeradmin -a resetindex.
    Thank should trigger rebuild of indices.

  • Trigger logic not accepted

    Hi,
    I have created trigger but old value not inserted into temp table. Please suggest me that why when condition is not accepted.
    I have created a trigger with below code.
    create or replace
    TRIGGER TRIGGER1
    BEFORE INSERT OR UPDATE ON EMP2
    FOR EACH ROW
    WHEN (NEW.EMPNO<1000)
    BEGIN
    iF updating THEN
    INSERT INTO TEMP(EMPNO,ENAME)VALUES(:OLD.EMPNO,:NEW.ENAME);
    END IF;
    IF INSERTING THEN
    INSERT INTO TEMP(EMPNO,ENAME)VALUES(:OLD.EMPNO,:NEW.ENAME);
    END IF;
    commit;
    END;
    Temp Table output:
    222 Mark --This row i have inserted before create the trigger
    null     Venky                              
    null     Venkatt                                                       
    null     wwwww
    Regards,
    Venkat

    Venkat wrote:
    Hi,
    My Requirement is If any customer entered the value(example:empmo), we should not modify the existing value.
    If i used code provided by "Achyut". below compilation error occured."
    Error report:
    ORA-25000: invalid use of bind variable in trigger WHEN clause
    25000. 00000 - "invalid use of bind variable in trigger WHEN clause"
    *Cause: A bind variable was used in the when clause of a trigger.
    *Action: Remove the bind variable. To access the table columns use
    (new/old).column_name.
    Regards,
    VenkatYes, that's because what he posted is incorrect. You've been given code that does work. However
    My Requirement is If any customer entered the value(example:empmo), we should not modify the existing value.Is not a requirement. That's part of a requirement. Why do you need a trigger to copy data from one table to another? What does this do for you? What do you have to achieve?

  • Aftre logon trigger

    I have to write a script such that whenevre sys logins as sysdba,a script gets executed that should show the total,used and free space in all the datafiles.
    i have written a script that shows a used,free and total space in all the datafiles.
    I wrote a trigger like:
    create or replace trigger spaceinfo
    after logon on database
    begin
    if ora_login_user='SYS' then
    execute immediate '@\E:space.sql';
    end if;
    end;
    My question is As what user shall i execute this script?
    And would it solve the purpose?

    BTW if I remember correctly logon triggers are not fired for sys user.
    You don't. Always have done, probably always will as well. ON-LOGON triggers do fire for sys. What they don't do, is if they raise an exception, they can't prevent the logon for occuring for sys users (whereas for a regular user the exception would prevent the logon)
    SQL> conn / as sysdba
    Connected.
    SQL> create table logon_audit (
      2  username varchar2(30),
      3  logon_time  date
      4  )
      5  /
    Table created.
    SQL>
    SQL> select * from logon_audit;
    no rows selected
    SQL> select sysdate  from dual;
    SYSDATE
    03/12/2007 09:41:54
    1 row selected.
    SQL> create or replace trigger a_logon_trigger
      2  after logon on database
      3  declare
      4  begin
      5    insert into logon_audit values (user, sysdate);
      6  end;
      7  /
    Trigger created.
    SQL> conn / as sysdba
    Connected.
    SQL> select * from logon_audit;
    USERNAME                       LOGON_TIME
    SYS                            03/12/2007 09:42:07
    1 row selected.
    SQL>Although why the OP wants to run a script that displays datafile usage every time SYS logs on is beyond me. What if the front end isn't SQL*Plus? What if it's a connection Oracle makes behind the scenes connection or a RMAN job ...
    insert into sentence select 'lots of reasons' from reallybigtable;

  • Sale Order Excise Value should not be zero

    Dear Friends
    With the User Exit MV45AFZZ     Form:: Userexit_Save_Document_Prepare,
    we have written a condition that while saving the sale order, if the excise condition value JEX2 is zero, order could not be saved and this is working fine for normal process.
    But in some cases, we need to explode the BOM in sale order.  In this case, the above user exit is checking for components excise value which should not be the case. In fact, we tried to distinguish with item category for the above exit but the item category structures are not flowing in a particular area of user exit.
    My requirement is that for BOM exploded items, the above condition should not trigger for excise value in sale order.  It should trigger ONLY for Header Material.  How this should be achieved??
    thanks
    G. Lakshmipathi

    The problem is solved.
    Actually in the above user exit, we had looped thru' xvbap for the item category type NOT equal to 'Order Type'.
    Then, we read the xkomv table with two keys  JEX2 and POSNV ( referring to vbap-posnr) and checked if condition value is null, if so trigger the error message.
    In this way, though the xvbap is not dynamic in that form of userexit, the reading of xkomv helped to achieve
    our purpose of triggering the error for header materials.
    thanks
    G. Lakshmipathi

  • Insufficient privileges using execute immediate in after logon trigger

    I have an after logon trigger that executes a package/procedure in the schema it was created in.
    One of the procedures runs the following:
    EXECUTE IMMEDIATE 'AUDIT INSERT TABLE, UPDATE TABLE, DELETE TABLE, EXECUTE PROCEDURE BY ' || USER;
    The procedure is throwing an insufficient privileges error when executing this.
    However - the schema owner has audit any and audit system privileges and - the statement works fine independently.
    When I login as another user this issue arises. The package/procedure are created with definers rights... So - i'm not sure why this is happenening.
    Any help is appreciated.

    privileges acquired via ROLE do NOT apply within named PL/SQL procedures.
    SQL> SET ROLE NONE
    SQL> --issue AUDIT again now                                                                                                                                                                                                                                                               

  • Error in BIC MODULE BIC MODULE modules:  trigger file [not specified] conta

    Hello, i have a problem with the BIC Seeburger MD
    Scenario overview:
    IDoc Invoice02 => Message Mapping (Seeburger content) => FTP Seeburger Comm. Canal integrated with BIC adapter. This works correctly. Then I tested the field mapping and the BIC Adapter brings no more errors in field mapping.
    BUT NOW THIS ERROR MESSAGE IS:
    Error in BICMODULE modules: Temporary error: BIC XI Adapter call failed. Reason: Error: [Error: ID = 1104; LEVEL = 3] trigger file [not specified] contains no valid trigger. DESCRIPTION: You have specified no valid trigger for that mapping. Please change this within BIC Mapping Designer.
    Destination Message is the Edifact Invoic D96A
    I hope one of you can help me
    Kind regards
    Tobias

    Hi Tobias,
    there is a either a problem with your XML Message or with the BIC Mapping which converts XML to EDI.
    What's the name of the BIC-Mapping that you use in your FTP Module chain?
    You can also check the following to make sure, your BIC Mapping works correctly:
    a) Take your Invoice Idoc and convert it with the Message Mapping into Edifact-XML
    b) Use BIC Mapping Designer and open the Mapping that you use in the Module Chain (Should be XML-->Edifact)
    c) Take the Edifact-XML Message from your PI Message Mapping and convert it in the Test Environment of BIC Maping Designer.
    If you get the same error, there's something wrong with your Edifact-XML message
    If the mapping works, there's something wrong in your module configuration. (Maybe you can post your module configuration)
    regards,
    Daniel

  • Logon trigger - restrict acces using Toad, SQLPLUS...

    Oracle 10.2.0.4
    I have users who use oracle form - ifweb90.exe.
    I want to restrict them to access database using SQL Developer, TOAD or any other tools. I create logon trigger:
    CREATE OR REPLACE TRIGGER block_users
    AFTER LOGON ON DATABASE
    begin
    FOR REC IN (SELECT USERNAME,PROGRAM
    FROM V$SESSION
    WHERE AUDSID = USERENV('SESSIONID'))
    LOOP
    if rec.username like ('X%')
    and
    rec.program not like ('ifweb90.exe')
    then
    RAISE_APPLICATION_ERROR(-20001,'ERROR MESSAGE');
    end if;
    end loop;
    END;
    This solution don’t work if the program executable is renamed (this can’t be done with SQL Developer).
    1. Is there any way to solve this?
    2. Whether this trigger will use resources, whether this trigger will check all connection? What is the cost to pay in terms of performance?
    Thanks in advance!
    Edited by: user9106065 on Nov 9, 2010 3:17 AM

    This solution don’t work if the program executable is renamed (this can’t be done with SQL Developer).
    1. Is there any way to solve this?Better alternative would be to change your own program, set the client_application_info and check for that using logon trigger. Anything else, can then be thrown off.
    2. Whether this trigger will use resources, whether this trigger will check all connection? What is the cost to pay in terms of performance?There would be negligible usage of resources.
    But this trigger won't stop any connections from any tool which come in as SYSDBA.

Maybe you are looking for

  • Lost Music Downloaded Wirelessly... Help!

    Quick background... I'm staying with friends, and my desktop is in storage, and my desktop is my main computer for my iTunes account. It's where I keep all of my music. I have recently made my laptop my second computer that can function with my iPod,

  • Share ical for accounts in imac

    I would like to have a family calendar and have each of the kids to update it using their account. Any suggestions much appreciated

  • Cannot dial outbound numbers from UC320

    Hi, I've recently made some config changes with regards to the network on my UC320.  I think these are all fine, as the unit is recieving calls, even forwarding them out of the office and remote access as well as internal access to the unit is fine.

  • Security error on ff launch. can not open https sites.

    I have to use IE to see most of my sites. When I launch Fire Fox, an error pops up. "Could not initialize the application's security component. The most likely cause is problems with files in your application's profile directory. Please check that th

  • JTable filled from a database.

    Hello everyone, I have defined a TableModel which gets the information from a database. The information is put in a two-dimensional array from which i have column 0 reserved for the primary key. I don't want to show this column, but I do want to retr