How to display a logon message using login trigger?

Hello,
I have created a logon trigger similar to Tom's guide in his thread - http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3236035522926. The guideline in the thread disables a user login, but I need the trigger to prompt a message that the logon schema has been changed to XYZ schema. Trying to use the same code format, I am able to publish the message, but at the end the connection is getting disconnected similar to Tom's example:
ops$[email protected]>
ops$[email protected]>
ops$[email protected]> connect scott/tiger
ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-20001: You are not allowed to logon from this terminal!!!
ORA-06512: at line 7
Warning: You are no longer connected to ORACLE.
ops$[email protected]> connect /
Connected.I want the user to establish a session after login and still prompt the message. How can do that?
The trigger I am trying is -
CREATE OR REPLACE TRIGGER ABC_DBA.USER_LOGON
after logon on database
DISABLE
declare
v_user varchar2(30);
v_base_user varchar2(30);
begin
select SYS_CONTEXT ('USERENV', 'SESSION_USER') into v_user from dual;
dbms_output.enable;
dbms_output.put_line(v_user);
execute immediate 'alter session set current_schema=XYZ';
-- RAISE_APPLICATION_ERROR (-20001, 'Welcome');
end;Thanks in advance
aBBy
PS: Forgot to mention - this is a 11gR2 RAC on Linux env.
Edited by: AB007 on Oct 12, 2012 11:29 AM

After user is logged in without an error, the Oracle Client does not expect any message from DB.
It is up to Client Application to expect such a message.
For example if the Client Application is SQL*Plus, you can issue
SET SERVEROUTPUT ON
After that SQL*Plus will read from DBMS_OUTPUT buffer and print on the screen.
Others applications have to be programmed to do similar.

Similar Messages

  • How to display a logon-message without a diconnect

    Hello,
    I tried to display a message on logon with a trigger on logon and a RAISE_APPLICATION_ERROR, but this disconnects the user or doesn't worl for DBA-users.
    Is the any other possibilty to display a message when somebody logs on ?
    Regards,
    Mynz

    Mynz wrote:
    Hello,
    I want to implement something like a license-check.
    The end-user should get a message when exceeding the license limit, but not being disconnected. Means, he can go on working, but he is informed that licenses are missing and he shoud buy some more ;-)
    And I don't want to change all our applications...
    Regards,
    Mynz
    Your application is what is responsible for taking whatever the database sends and determining what it wants to do with that.
    You use sqlplus as an example, but as far as the database is concerned, sqlplus is just another application making a connection and sending requests.  The behavior of what sqlplus is displaying is not the result of something in the database, it is the result of how sqlplus is coded to handle what the database sends it.
    Your application is no different. 

  • How to display an error message after validation in Formatted Search?

    Hi SBO experts,
    if an error is detected on validation in a Formatted Search, how to display an error message to the user entering the data?
    Thanks & Regards,
    Raghu Iyer

    i created a formatted search query & attached it to the field 'Quantity' at Line Item level in Sales Order screen. just for testing purpose, i eneterd the following code lines in the query validating 'Quantity'
    if $[$38.11.0] > 50
    begin
    select @error = 1
    select @error_message = 'Vendor code cannot begin to X sign.'
    end
    the system throws the error : Internal error (8180) occurred [Message 131-183]
    actually, i need to display an error message to the user if Quantity is not in multiples of the OITM.SalFactor2
    if $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode]  = $[$38.1.0]) > 0
    begin
    select @error = 1
    select @error_message = 'Error in Quantity.'
    end
    but, this expression to get the remainder itself seems to have some error
    $[$38.11.0] % (SELECT T0.[SalFactor2] FROM OITM T0 WHERE T0.[ItemCode]  = $[$38.1.0])
    i guess, % operator is used for modulo (to find the remainder of one number divided by another.) ? am i right ?
    Regards,
    Raghu Iyer

  • How to display an error message in maintenace view

    Hi,
    I have following requirement.
    I have a table. In the table, there is a field named REPORT which keeps an executable report name. When adding an entry i need to fill the field with an report name, which should exist in the system. The report name should not be include objects.
    Then I use search help HELP_TRDIR with import parameter SUBC = 1.  I also create a maintenance view for the table.
    Then my question is how to display a warning message if the report I input in REPORT field doesn't exist in the system. If I need to modify the generated objects of the maintenance view, how to do it.
    The reason i don't use foreign key is that it seems filter functionality is not availabe in the case with import parameter SUBC = 1.
    Thanks in advance,
    Best Regards, Johnney.

    Hi,
    You need to add your validation in the table maintenance events:
    Use the event : 01 - Before saving data to the databse table... for this purpose
    1) Go to Menu-> Utilities->Table mainatenace generator
    2) On the table maintenance screen->Menu->Enviroement-> Modifications->Events
    3) select an event 01 and give some subroutine/form name.
    4) Add your validation in the form(Note this form should be in the Func Group of the table maintanance genetaor)
    Regarrds
    Shiva

  • Can anyone help how to print stack trace messages using log4j?

    Can anyone help how to print stack trace messages using log4j?

    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
    <appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p %m%n"/>
    </layout>
    </appender>
    <appender name="DEBUG" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/usr/local/dice/d2jbin/cmdToNetJobs/app-debug.log"/>
    <param name="Append" value="true"/>
    <param name="MaxFileSize" value="1000KB"/>
    <param name="MaxBackupIndex" value="5"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p %m%n"/>
    </layout>
    <filter class="org.apache.log4j.varia.LevelRangeFilter">
    <param name="LevelMin" value="DEBUG" />
    <param name="LevelMax" value="DEBUG" />
    </filter>
    </appender>
    <appender name="INFO" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/usr/local/dice/d2jbin/cmdToNetJobs/app-info.log"/>
    <param name="Append" value="true"/>
    <param name="MaxFileSize" value="1000KB"/>
    <param name="MaxBackupIndex" value="5"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p %m%n"/>
    </layout>
    <filter class="org.apache.log4j.varia.LevelRangeFilter">
    <param name="LevelMin" value="INFO" />
    <param name="LevelMax" value="INFO" />
    </filter>
    </appender>
    <appender name="WARN" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/usr/local/dice/d2jbin/cmdToNetJobs/app-warn.log"/>
    <param name="Append" value="true"/>
    <param name="MaxFileSize" value="1000KB"/>
    <param name="MaxBackupIndex" value="5"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p %m%n"/>
    </layout>
    <filter class="org.apache.log4j.varia.LevelRangeFilter">
    <param name="LevelMin" value="WARN" />
    <param name="LevelMax" value="WARN" />
    </filter>
    </appender>
    <appender name="ERROR" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="/usr/local/dice/d2jbin/cmdToNetJobs/app-error.log"/>
    <param name="Append" value="true"/>
    <param name="MaxFileSize" value="1000KB"/>
    <param name="MaxBackupIndex" value="5"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p %m%n"/>
    </layout>
    <filter class="org.apache.log4j.varia.LevelRangeFilter">
    <param name="LevelMin" value="ERROR" />
    <param name="LevelMax" value="ERROR" />
    </filter>
    </appender>
    <root>
    <priority value="debug"/>
    <!--<appender-ref ref="STDOUT"/>
    --><appender-ref ref="DEBUG"/>
    <appender-ref ref="INFO"/>
    <appender-ref ref="WARN"/>
    <appender-ref ref="ERROR"/>
    </root>
    </log4j:configuration>
    I ve written like this
    and to print stack trace I used
    log.error(Throwable(e))
    but does nt display printstacktrace how to do it

  • How to display an error message on screen?

    Hi experts,
    In screen painter, how to display an error message in the message area just below the screen?
    Thanks!

    hi wuyia,.
    Write like this;
    Message 'Process completed Successfuly' TYPE 'S'.
    Message 'Want to Overwrite Value' TYPE 'W'.
    Message 'Press enter to continue' TYPE 'I'.
    Message 'Invalid Input' TYPE 'E'.
    S - Success
    W - Warning
    I - Information
    E - Error
    You can adjust your GUI option to display the message in a Popup or in the status bar.
    Regards
    Karthik D

  • How to display the eror message in the iView

    Hi
    I want to check the user input in the client side and display an error message in the iView instead of displaying the error message as an alert
    it is ok when I tried to do it as an alert
    alert('ERROR MESSAGE');
    but the problem is how to display the error message as a text in the iView ...
    I wrote the below code..
    any one can see it and has any sugestion?
    Thanks
    =============
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <%
    String compid = "";
    String message = "";
    %>
    <hbj:content id="MyContent">
    <hbj:page title = "Selection Screen">
    <hbj:form id = "myForm">
    <br>
    <br>
    <br>
    <center>
    <H3>Benefits Statement </H3>
    <H4>Selection Screen</H4>
    <hbj:gridLayout
    id="FSSLayout"
    debugMode="False"
    width="40%"
    cellSpacing="5"
    >
    <hbj:gridLayoutCell
    rowIndex="1"
    columnIndex="1"
    width="10%"
    horizontalAlignment="LEFT"
    style="WildStyle"
    >
    <hbj:label
    id="label_inputPernr"
    required="TRUE"
    text="Personal Number:"
    design="LABEL"
    labelFor="inputPernr"
    />
    </hbj:gridLayoutCell>
    <hbj:gridLayoutCell
    rowIndex="1"
    columnIndex="2"
    width="40%"
    horizontalAlignment="LEFT"
    >
    <hbj:inputField id = "inputPernr"
    >
    <%
    compid=MyContent.getParamIdForComponent(inputPernr);
    %>
    </hbj:inputField>
    </hbj:gridLayoutCell>
    <hbj:gridLayoutCell
    rowIndex="10"
    columnIndex="1"
    width="40%"
    horizontalAlignment="CENTER"
    colSpan="2"
    >
    <hbj:button id = "myButton" text="Submit.." design="EMPHASIZED"
    tooltip="Click me to submit this form" onClick="ClickEvent" onClientClick="validRequired()">
    </hbj:button>
    </hbj:gridLayoutCell>
    </hbj:gridLayout>
    </center>
    <p font="Arial" size=20><%= message%></p>
    </hbj:form>
    <SCRIPT LANGUAGE="Javascript">
    function validRequired()
    var myvar = document.getElementById('<%=compid%>').value;
    var ivID='<%=componentRequest.getComponentContext().getContextName()%>';
    if (myvar = " ")
    message = "Enter Employee Number";
    ivuRefresh(ivID);
    htmlbevent.cancelSubmit=true;
    </SCRIPT>
    </hbj:page>
    </hbj:content>

    No problem, here is an example of some html code and javascript that you can adapt to your needs. You can display this standalone to see how it works.
    I hope this helps
    <html>
         <head>
              <script language="JavaScript">
                   function validateForm(){
                        if(document.getElementById("nameField").value == "")
                             document.getElementById("errormessage").innerHTML = "Please enter the Name";
                        else if(document.getElementById("ageField").value == "")
                             document.getElementById("errormessage").innerHTML = "Please enter the Age";
                        else if(document.getElementById("idField").value == "")
                             document.getElementById("errormessage").innerHTML = "Please enter the id";                         
                        else
                             document.getElementById("errormessage").innerHTML = "";
              </script>
         </head>
         <body>
              <table border="0" cellpadding="0" cellspacing="0">
                   <tr>
                     <td>Name</td>
                     <td><input type="input" id="nameField" name="nameField"></td>
                   </tr>
                   <tr>
                     <td>Age</td>
                     <td><input type="input" id="ageField" name="ageField"></td>
                   </tr>
                   <tr>
                     <td>Id</td>
                     <td><input type="input" id="idField" name="idField"></td>
                   </tr>
                   <tr><td><font color="red"><span id="errormessage"></span></font></td></tr>
                   <tr><td><input type="button" name="validate" onClick="validateForm()" value="Click to validate"/></td></tr>
              </table>
         </body>
    </html>

  • How can I send whatsapp messages using Siri ?

    Hi,
    How can I send whatsapp messages using Siri ? or how can I ask Siri to read my whatsapp messages ?
    thanks for help!

    kladrian wrote:
    this is not the case in particular
    Yes it is.  If it wasn't the case, then why are you asking the question to begin with?
    why everytime I have a question about a simple activity present in Android system I get in response ... "you can't sorry" !?
    1.  Because iOS is not Android
    2.  Because it's the truth, whether you like it or not

  • How to display all the surveys using content query web part

    Can you please tell me how to display all the surveys using content query web part in more details? I also created a subsite and multiple surveys in that site. Then, I inserted a Content Query Web Part and select the List Type to be "Survey",
    however, it returned nothing. Did I miss anything?

    Hi,
    OOTB Survey List does not contain any
    Content Types and it has the following structure:
    Response entry is represented by
    List Item
    Response entry consist of questions and answers, where Question correspond to
    Field and Answer to Item value respectively.
    For querying Survey List via CQWP  the following properties could be used
    BaseType 
    <Lists BaseType="4">
    ServerTemplate
    <Lists ServerTemplate="102">
    Example
    To retrieve all the responses from Survey lists, specify List Type property as shown on picture
    Reference:
    http://stackoverflow.com/questions/17280778/display-all-surveys-using-content-query-web-part
    Best Regards,
    Eric
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How to display smartforms table lines useing different background colour

    Hi all:
    How to display smartforms table lines useing different background colour .
    for example:
    line1:green
    line2:red
    line3:green
    line4:red
    line5:green
    line6:red
    line7:green
    line8:red
    Any help is highly appreciated!!
    启明星

    Hi,
    Create a two lines one for header and second for data in the table.
    1)In table painter we can find the pencil mark.
    2)select the pencil mark
    3)now select the line which you need to shade
    4) now select the shading colour in the table painter and the provide the resolution up to 100% and select table pattrn for that line.
    5) Now you can use this for the header now only the header gets shaded and the remaining gets unshaded.
    reward points if useful
    Thanks and Regards,
    Nishant

  • How to display another window by using Check box

    Hi Friends,
    I have one doubt in Webdynpro with java. How to display another window by using Check box?
    For Exam My requirement is I am getting BAPI from ECC System. So I have to go given input details in first view and output details in Second View. So in Second View I will taken Table that data will displayed in rows. each and every row first check box is available.
    Here Select Check Box of particular row then click Edit button. That row data will be displayed in one popup window.
    empid, name, sal ,firstname, last Name
    empid, name, sal ,firstname, last Name
    empid, name, sal ,firstname, last Name
    Suppose I have to select check box in First Row Click on EDIT button That row data will be displayed in another popup window here customer will change details depending up requirement click on SAVE Button that update data will saved in ECC System.
    How to display another window by using Check box?
    Regards
    Vijay

    Hi Vijay
    Your question is not clear enough to give an answer. Do you have some difficulties with the code for opening a popup-window? There are many-many examples in the forum how to open/close a popup.
    Or you do not know how to bind the popup opening with clicking a check box? Just put the code in the onSelect event handler of the check box.
    BR, Siarhei
    Edited by: Siarhei Pisarenka on Mar 11, 2010 10:55 AM

  • How to display a user message on WEBI Home page ?

    Hi all,
    How to display a user message on WEBI Home page ?
    like when ever the data gets scheduled at etl side i want to display a message a message on info view home page "new data is uploading" is this is possible to do ?

    Unfortunately this is not possible to do "out of the box".  There aren't any pre-configured options that will let you do this.  You're only real option is to try and modify the infoview source code yourself to do this.
    Regards,
    Shawn

  • How to display items from database using catagorylookupdroplet

    Hi everyone,
    i want to know how to display items from database using catagorylookup droplet. if anybody have any code snippet please share it.
    Thanks in advance,

    <dsp:droplet name=".................../CategoryLookup">
         <dsp:param name="id" param="itemId"/>
         <dsp:oparam name="output">
              <dsp:valueof param="element.displayName"/>
                   <%-- This is show the Child Category --%>
                   <dsp:droplet name="......................./ForEach">
                   <dsp:param name="array" param="element.childCategories"/>
                   <dsp:oparam name="outputStart">Child Categories</dsp:oparam>
                   <dsp:oparam name="output">
                        <dsp:a href="">//bydefault it will take its own file's name
                             <dsp:param name="itemId" param="element.repositoryId"/>                                                                                          <dsp:valueof param="element.displayName"/>
                        </dsp:a>
                   </dsp:oparam>                                             
                   </dsp:droplet>
                   <%-- This is show the Child Product --%>          
                   <dsp:droplet name=".............../ForEach">
                        <dsp:param name="array" param="element.childProducts"/>
                        <dsp:oparam name="outputStart">Child Products</dsp:oparam>
                                  <dsp:oparam name="output">
                                       <dsp:droplet name="................/ProductLookup">
                                            <dsp:param name="id" param="itemId"/>
                                            <dsp:param name="elementName" value="Prod"/>
                                            <dsp:oparam name="output">
                                                 <dsp:getvalueof id="img102" param="Prod.smallImage.url" idtype="java.lang.String">
                                                      <dsp:img height="250" width="250" src="<%=img102%>"/>
                                                 </dsp:getvalueof>
                                            </dsp:oparam>
                                       </dsp:droplet>
                                       <dsp:a href="productView.jsp">
                                            <dsp:param name="itemId" param="element.repositoryId"/>
                                            <dsp:valueof param="element.displayName"/>
                                       </dsp:a>
    Hope this helps.
    -RMishra

  • ICI - How to display custom error messages in SAP CRM

    Hello,
    we are working on a custom Contact Center which interfaces with SAP CRM Version 7 with Enhancement Package over ICI.
    The basic call functions like accepting, hanging up, holding and retrieving are fully implemented and are working already.
    Our goal is to display error messages in the CRM so that clients know there is something wrong, for example why he can't be log in successfully (e.g. the telephony server isn't reachable).
    We already found the ICI Documentation file which provides us the CRM SOAP error codes and tried to send SOAP Fault messages, but never got
    them to screen.
    Please find an attached example screenshot what we mean exactly, reproduced by trying to make a call with CRM user while BCM CDT isn't
    running in the background.
    Regarding to this topic we've the following questions:
    - Is it possible to display custom error messages on the CRM or is this functionality limited to SAP?
    - Could you provide us some further information on how to use this feature exactly (implementation details?) and how the SOAP XML should look like to get it work?
    Thank you in advance!
    Best regards
    René Holy

    NewUser7 wrote:
    Please correct me if I am wrong
    I need to create an entity adapter and attach an error handler with the adapter? or can i handle that in the event handler itself. I coulnt find any api for handling errorsYou can do it both ways but since we are talking about event handler now, then in 9.x you need to extend com.thortech.xl.client.events.tcBaseEvent class for creating a event handler. In tcBaseEvent class there are various flavors of handleError method. So use that as per my note earlier and you should be good.
    HTH

  • How to display only one message in WD

    Hi all,
    I want to display successful message or error message when certain action is perform.
    I have my message enter in the MessagePool, say Request_Successful_Updated and value is "your request is successfully updated"
    In my WD, I do this:
    IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
    msgMgr.reportSuccess(textAccessor.getText(IMessage<my class>.Request__Successful__Update));
    The error message appear three times in the top view, right side view and the bottom of the view.
    How to just displayed one error message on just on side of the view?

    Hi
    Define a success message or Error message in the pool.
    Use the following statement
                   wdComponentAPI.getMessageManager().reportMessage(IMessage<Comp_Name>.<MessageKey>,
                        null,false);
    Define message areas  View element in your View and place it where you want to display the error message.
    May be this helps you.
    Regards
    Kalyan

Maybe you are looking for

  • HELP! opening a pdf file and using page view

    Hi everyone! I'm doing a school project in which I'm trying to develop an app that opens a pdf file from the device memory (ipad or iphone) and lets the user turn pages forward and backward by swiping on the screen. Although I have very basic knowled

  • Need help on passing a parameter in Oracle report

    Hello guys ...i Have a custom report which takes..TRX number and Org id as input Parameters.where TRX number is mandatory and ORg id is optional. here is my question ..if i dont pass the org id,it should take the id of the Organization where i am run

  • Upgrade OAS from 10.1.2.0.2 to 10.1.2.3.0

    The client application worked fine before the update but now I receive some strange results. Everything still works fine if I use a test OC4J 10.1.2.0.2 I want to do a test with the real 10.1.2.3.0 client jar files. Can I download them somewhere? I c

  • Cannot invoke Web service wizard

    I get an error when I try to create Regenerate a Webservice from the JDeveloper in a Modal Dialog box. Cannot Invoke Wizard oracle.bali.xml.addin.XMLSourceNode I checked to see if the xmladdin.jar file is in the extensions folder and find it there. T

  • Premiere CC 2014.1 Crashes

    I just recently updated Premiere CC to 2014.1 and now it crashes every time I try to load footage into the timeline or source window it crashes. Prior to the update the program worked fine. OS:Windows 7 -64 Bit Processor: Intel(R) Core (TM) i7-4770 G