title: Pl/Sql Trigger for changing default date format in oracle
body: <p>i want to ensure that every time i logon the date format is changed from <code>'24-Apr-2014'</code> to <code>'24/04/2014'</code></p>
  
  <p>For that I created a pl/sql trigger as follows</p>
  
  <pre><code>    CREATE OR REPLACE TRIGGER CHANGE_DATE_FORMAT
      AFTER LOGON ON DATABASE
      BEGIN
      ALTER SESSION SET NLS_DATE_FORMAT = 'MM/DD/YYYY';
      END;
      /
  </code></pre>
  
  <p>However i am not logged on as sysdba so perhaps thats why i get the error </p>
  
  <blockquote>
  <pre><code>    SQL&gt; @C:/pl/dateTrigger.sql
      AFTER LOGON ON DATABASE
             *
      ERROR at line 2:
      ORA-01031: insufficient privileges
  </code></pre>
  </blockquote>
  
  <p>What can i do to ensure that date format is changed permanently?</p>