SYS_CONTEXT return do not results

Hi - noobie question, sorry in advance.

I am a student at OCA, and I came across a feature called SYS_CONTEXT

[http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions184.htm#SQLRF06117]

I'm trying to retrieve my IP using SYS_CONTEXT ('USERENV', 'IPAddress'). SQL * more accepting but nothing back and I don't know why. I tried a few arguments (e.g. SYS_CONTEXT (' USERENV', 'AUTHENTICATION_DATA' ") but still nothing is returned.) Still using USERENV as I believe that it is the namespace built into Oracle.

all the tips at this stage.

PS I am connected to OracleXE as SYSTEM

How you connect to the database? And it is a database that is installed on your local computer?

If you use SQL * more

sqlplus scott/tiger

creates a connection needed to the database. You're not going via TCP/IP so that you have an IP address.

sqlplus scott/tiger@tns_alias

will go over TCP/IP to the listener and create a 'normal' connection that will have an IP address.

Justin

Tags: Database

Similar Questions

  • CFEXECUTE / ant script return do not result in the CF

    I have a batch script that is running an ant script that is running "cvs log h application.cfm" on the cvs server.

    When I run the script commands manually on the command line, everything works fine.

    When I run the command via CFEXECUTE script, the batch works very well, the ant script works fine, but the cvs command does not seem to do anything. The results of the tag are:
    [echo] front
    [echo] after

    As you will see the (unchanged with the exception of the cvsroot attribute) attached ant script, echoes are and part of the cvs command.
    When running from the command line, I get the results of the cvs log command between these lines, but I get nothing with the CF.

    Any ideas on how to get this to work at all will be greatly appreciated.


    I use 7.01, but I corrected the tag CFEXECUTE by restarting the service CF twice.

    I also managed to finally get the CVS little work - changing : ext: to : ssh: -which I'm sure I've tried before and it wouldn't work, but it works now so I'm very happy.

  • Property RemotePanel.ConnToServers return do not results

    Hello!

    I'm trying to detect connections from the remote panel to my labview application.  I created this chiseled of the following code:

    When I run the present and then connect remotely with this other computer sitting next to me, the picture remains empty.

    I'm using LabVIEW 2009.  Any input is greatly appreciated.

    It turns out that this particular property of the reference App you'll get not facing away from struggling.  Don't know what this particular property is intended.

    The list of connections remote panel is accessed through a reference of VI Invoke node.  If you open a reference to the current VI, you can get a list of connections of the remote panel and make decisions based on this list:

    -Nic

  • SQL that don't return do not results

    Hello

    I executed
    select * from semestru;
    and I myself
                                         ID                               AN_SCOLAR SEM DATA_START  DATA_SFARSIT
    --------------------------------------- --------------------------------------- --- ----------- ------------
                                          1                                       3 I   15.09.2000  26.02.2001
                                          2                                       4 I   16.09.2001  27.02.2002
                                          3                                       5 I   14.09.2002  23.02.2003
                                        118                                     104 I   17.09.2011  17.02.2012
                                          5                                       6 I   17.09.2003  25.02.2004
                                          6                                       7 I   16.09.2004  26.02.2005
                                          7                                       8 I   16.09.2005  24.02.2006
                                          9                                       3 II  04.03.2001  14.06.2001
                                         10                                       4 II  06.03.2002  16.06.2002
                                         11                                       5 II  05.03.2003  15.06.2003
                                         12                                       6 II  16.03.2004  16.06.2004
                                         13                                       7 II  08.03.2005  19.06.2005
                                         14                                       8 II  08.03.2006  18.06.2006
                                         15                                       9 II  07.03.2007  16.06.2007
                                         16                                      10 I   10.09.2007  24.02.2008
                                         17                                      10 II  04.03.2008  04.07.2008
                                         19                                      11 I   15.09.2008  20.02.2009
                                         20                                      11 II  03.03.2009  15.06.2009
                                         21                                       9 I   16.09.2006  23.02.2007
                                        119                                     104 II  05.03.2012  15.06.2012
     
                                         ID                               AN_SCOLAR SEM DATA_START  DATA_SFARSIT
    --------------------------------------- --------------------------------------- --- ----------- ------------
                                         22                                      12 I   *17.06.2009*  23.02.2010
                                         23                                      12 II  03.03.2010  14.06.2010
                                         24                                      13 I   15.09.2010  25.02.2011
                                         25                                      13 II  07.03.2011  15.06.2011
    I put my date 17.06.2009 system.
    When I run
    select * from semestru where data_start=sysdate i got no results. Why?
    
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        

    Don't forget SYSDATE is inclusive of seconds, so you need to TRUNC he put at midnight.

    Try:

    select * from semestru where data_start=TRUNC(sysdate);
    

    And if that doesn't work, try:

    select * from semestru where TRUNC(data_start)=TRUNC(sysdate);
    
  • % ROWCOUNT SQL does not return the expected result

    I have the following function within a package:

    --Update APPERY_JTI_deleted_USERS table:
    FUNCTION fn_updt_app_jti_dlt_usr(
        p_update_co      IN VARCHAR2,
        p_appery_user_id IN APPERY_JTI_deleted_USERS.appery_user_id%TYPE,
        p_outlet_code    IN APPERY_JTI_deleted_USERS.outlet_code%TYPE)
      RETURN NUMBER
    AS
    lv_sql       VARCHAR2(4000);
    lv_rowcount  NUMBER := 0;
    BEGIN
    
    lv_sql := 'UPDATE APPERY_JTI_deleted_USERS SET '||p_update_co||' = 1 WHERE '||p_update_co||' = 0 AND OUTLET_CODE = '''||p_outlet_code||''' AND APPERY_USER_ID = '''||p_appery_user_id||'''';
    
    --EXECUTE IMMEDIATE lv_sql;
    EXECUTE IMMEDIATE 'BEGIN ' || lv_sql || '; :z := sql%rowcount; END; ' USING OUT lv_rowcount ;
    
    RETURN lv_rowcount;
      
    EXCEPTION
    WHEN OTHERS THEN
      RETURN -1;  
    END fn_updt_app_jti_dlt_usr;
    
    

    The function called several times as part of a job. Basically, the main function (Say M), call a few functions (for example A1... A9). Each of these functions is to do something and updated the application using the above function. Therefore, each of the nine functions will call the above function with different parameters.

    The problem that I am facing is:

    First run, invoke only first of all for the above function will return the positive result ($sql rowcount > 0). When I run M the second time, only first and second calls for the above function will be to return positive results and so on.

    How odd, it's that if I change the values again and run a function M, it will start from the beginning. And what strange more, the dynamic update statement is executed correctly and data are updated successfully. It's just sql rowcount % do not return is not the expected results.

    I tried to run execute immediately without (begin, end). I also tried to run it without HELP ON. It's always the same. I'm really confused, what Miss me here.

    I don't know if this is relevant. But for what it's worth, invoking the function above updates the SAME lines in the table appery_jti_deleted_users that the columns are different. So for all the work, the same lines need to be updated. Each function (A1... A9) will call the above function to update a different column of these lines.

    If you REALLY want to help you having US SHOW, not tell us:

    1. WHAT you do

    2. HOW to

    3. WHAT results you get

    4. WHAT results you expect to get

    First run, invoke only first of all for the above function will return the positive result ($sql rowcount > 0). When I run M the second time, only first and second calls for the above function will be to return positive results and so on.

    How odd, it's that if I change the values again and run a function M, it will start from the beginning. And what strange more, the dynamic update statement is executed correctly and data are updated successfully. It's just sql rowcount % do not return is not the expected results.

    Perhaps that the foregoing is true and maybe he's not. We have NO WAY of knowing because you don't SHOW US anything.

    I tried to run execute immediately without (begin, end). I also tried to run it without HELP ON. It's always the same.

    Yet once you showed us NOTHING >

    You do NOT FOLLOW best practices when you use dynamic sql statements: the sql statement real so that you can print:

    1 SEE what's running - make sure there are no syntax errors, and it seems to be what you wanted

    2 EXECUTE/TEST manually - to see if he really runs without error and see what results it really give.

    3. FIX any syntax or other problems and retest it

    Instrument properly your code and you won't have the problems you are having.

    You should know by now what are the parameters are transmitted when you run the function. So, there are at least three sets of these parameters.

    So you should be able to:

    1 run the instrumented manually function three times

    2. see that all three SQL statements are

    3 manually run these instructions

    4. see that the number of lines is after each execution

    We have no idea of what the output of the function is every time you call it. Apparently, you have, if you save the results of the function somewhere, but you didn't post any of this info.

    We need real details to help you - just listen to your story is not enough.

  • Simple find() return is not the expected results

    I'm new to ColdFusion, but have been programming for a while now.  I have (what seems) an easy problem that I thought would be a simple solution, but I'm currently stuck.  Any guidance would be appreciated!

    I have the following code:

    < cfset brand = Trim (products. BRAND name) / >
    < cfif Find (brand name, ",") >
    < cfset brand = ""' & brand & ' "" / >

    < / cfif >

    My goal is to surround the text with 'if the string contains a comma.  I tried the standard comma, as Chr (44), but neither returned the expected results.

    What I am doing wrong?  The CSV file, creating, is sprayed upward for the name of a company is like 'Test Company, Inc.'

    Please help us save my sanity!  TIA!

    I think the first thing we do is to read the docs.  And if you may have read 'em a little closer... ;-)

    http://livedocs.Adobe.com/ColdFusion/8/htmldocs/functions_e-g_21.html#5177400

    How around two parameters go?

    --

    Adam

  • vCACCAFEEntitiesFinder.getMachinePrefixes (vCACCafeHost) returns only 25 results

    vRA 6.2.2 Build - 2754020

    vRO 6.0.1

    With the help of vCACCAFEEntitiesFinder.getMachinePrefixes (vCACCafeHost) returns only 25 results when there is more than 25 Machine prefixes.

    The documentation for this method "Gets all prefixes for a host machine" - but apparently not to collect them all if there are more than 25.

    I also tried the built in getAvailableMachinePrefixes workflow that uses vCACCAFEEntitiesFinder.findMachinePrefixes (host, query), but that seems to have the same problem when there are more than 25.

    All this experience / have a way around it?

    This was bugs me because we talked last... This seems to work & survives when I throw a lot of prefixes to it :-)

    https://communities.VMware.com/thread/521041 · GitHub

  • When prefWidth() and prefHeight() return the correct results

    The functions Node.prefWidth () and Node.prefHeight () return 0 after a node is created (for example after the new Button("xyz"). - then "suddenly" (for example when being positioned in layoutChildren() of a component) they return correct return values.)

    That is the trigger to make the knots return a correct result of prefWidth/prefHeight? Is there a way to directly get the correct prefWidth/prefHeight just after creating an instance of the component?

    Thanks for any indication on that!



    A few examples: an extension component for the simple layoutChildren() method in which the three buttons are added. The prefWidth/prefHeight is output to the console:
    public class Test_39_PrefWidth extends Application
    {
        public static void main(String[] args) { launch(args); }
    
        class MyPane extends Pane
        {
            protected void layoutChildren()
            {
                double y = 0;
                sysoutNodePrefSizes("----- doing the layout");
                for (Node child: getChildren())
                {
                    double childWidth = child.prefWidth(-1);
                    double childHeight = child.prefHeight(-1);
                    child.resizeRelocate(0,y,childWidth,childHeight);
                    y = y + childHeight;
                }
            }
        }
        
        MyPane m_pane;
        
        public void start(Stage primaryStage)
        {
            final Scene scene = SceneBuilder.create()
                 .root
                 (
                     m_pane = new MyPane()
                 )
                 .build();
            for (int i=0; i<3; i++)
            {
                Button b = new Button("Hello " + i);
                m_pane.getChildren().add(b);
            }
            sysoutNodePrefSizes("------ having created and added the buttons");
            primaryStage.setScene(scene);
            sysoutNodePrefSizes("------ having assigned the scene");
            primaryStage.show();
            sysoutNodePrefSizes("------ having called stage.show");
        }
        
        private void sysoutNodePrefSizes(String title)
        {
            System.out.println(title);
            for (Node child: m_pane.getChildren())
                System.out.println(child.prefWidth(-1) +  "/" + child.prefHeight(-1));
        }
    }
    The result in the console is:
    -have created and added the buttons
    0.0/0.0
    0.0/0.0
    0.0/0.0
    -have assigned to the scene
    0.0/0.0
    0.0/0.0
    0.0/0.0
    -do the page layout
    58.0/20.9609375
    58.0/20.9609375
    58.0/20.9609375
    -calling stage.show
    58.0/20.9609375
    58.0/20.9609375
    58.0/20.9609375
    -do the page layout
    58.0/20.9609375
    58.0/20.9609375
    58.0/20.9609375

    Published by: user10257069 on 09.11.2012 00:48 - reformatted the code...

    user10257069 wrote:

    That is the trigger to make the knots return a correct result of prefWidth/prefHeight? Is there a way to directly get the correct prefWidth/prefHeight just after creating an instance of the component?

    The size of a knot is not known, until it has been laid out. It is not arranged until after it has been added to the scene. Setting in page happens during a pulse, so you add the node to the stage and then is placed on the next pulse.

    Because a node could be affected by a CSS style and the styles that apply to a dependent node when the node is in the graphic scene, it is not possible to get prefWidth/prefHeight without adding the node to the graphic scene. This is a problem and there must be a method 'size this node as if it was added to that parent in the scene graph', but it is not one now.

  • Firefox on Android sync returns "could not sign."

    I have Firefox for Android beta v39 and Firefox for Android v38 installed on my phone (Lollipop 5.0.2) and little matter which of these browsers, I try, when I have connection for synchronization, it gives the message "Unable to connect"... I have installed on my linux desktop v38 and it works with the same credentials. I tried to reset the password, and it also does not help, because the problem is always the same... Desktop Sync works and it does not work on Android. Any suggestions?

    I understand that Firefox for Android returns: "could not sign" I am happy to help you. Let's try a new connection by removing the account first.

    1. First unplug the account settings under 'Accounts' Android
    2. After listening to remove, open a new window in Firefox
    3. Go to https://accounts.firefox.com
    4. Connect once more and make sure that in your account settings, that data usage is set to auto sync.

    For troubleshooting, you have any content blockers or filters/proxies on your device?

  • A few keys return a different result example I press o and he returned .o

    My son has been on the computer (asus k53s) laptop. I don't know what he did, but now some of the traits keyboard return a different result, it feels almost like a kind of shortcut function. I restarted snd got the same result

    Here are the problems I found.
    o and. They all return two .o
    q returns a q and a tab
    m and refer my
    v and t both return a vt
    x starts the Help window
    I can't use my laptop properly right now that one of the letters is used in the passwd file, I use the keyboard to the mouse on screen.
    I need help asap thank you

    You can try the system restore to go back before the problem?

    How to repair the operating system and how to restore the configuration of the operating system to an earlier point in time in Windows Vista (or 7)
    http://support.Microsoft.com/kb/936212/#appliesTo

    I see that the OSK works for you, so perhaps the problem is a defective keyboard?  Have you tried to turn the laptop upside down and gently pat down to try to remove some of the bread crumbs between the keys (Lol).

    You can plug in another USB keyboard into the laptop and test with that?

  • FileAccess.pl returns "404 Not Found" on ESXi 4.0

    Hello

    I use vcli fileaccess.pl (viperl) 4.0 to search for a data store, it works fine with ESX 4.0, but I encountered an error with ESXi 4.0 (with version number registration), the server returns "404 Not Found", the data store is a local disk and the name is what I see from the vSphere Client.

    FileAccess.pl - operation go - filetype datastore.

    -Server example.org - username - password password administrator.

    -'Data center' datacentername - datastorename ' datastore1.

    RemotePath-«»

    Someone knows what's the problem?  Thanks in advance.

    -

    You can hit the following URL:

    https://10.241.32.48/mob
    

    and

    https://10.241.32.48/
    

    =========================================================================

    William Lam

    VMware vExpert 2009

    Scripts for VMware ESX/ESXi and resources at: http://engineering.ucsb.edu/~duonglt/vmware/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • Query of query count (column) returns empty not zero

    This seems to be a bug in 7,0,1,116466 and 8,0,1,195765

    Query of query count (column) or count (*) returns empty not zero when there is no match. Correctly returns a number when there is query matches.

    For example select count (i_id) of PersonnelQuery where i_id < 100

    Where does a report these?

    scottcook,

    It's a known bug in ColdFusion 6.x which apparently has not been set.

    Bug in CF6 (see the comments section of the page linked below)
    http://livedocs.Adobe.com/ColdFusion/6.1/htmldocs/using_29.htm

    Workaround
    http://www.bennadel.com/blog/244-ColdFusion-query-of-queries-odd-count-behavior.htm

    Report it as a bug
    http://www.Adobe.com/cfusion/mmForm/index.cfm?name=wishform

  • Oracle text index does not return the expected results.

    Hello

    My project requires a generic search on 5 different columns and all the VARCHAR2 data type.
    As performance is very slow with AS % search, I try to use for the multi_column_datastore that is recommended for this.

    Here's what I did.

    1 - Create table.
    CREATE TABLE BILLING_SCHEMA.NAMES_TABLE ( 
        ID                  NUMBER(9,0) NOT NULL,
        ENTITY_NUMBER         VARCHAR2(30) NOT NULL,
        GIVEN_NAMES         VARCHAR2(50) NULL,
        SURNAME             VARCHAR2(30) NULL,
        ORGANISATION_NAME     VARCHAR2(60) NULL,
        DISPLAY_NAME        VARCHAR2(100) NULL 
        )
    /
    
     
    My search must be made on the columns ENTITY_NUMBER, GIVEN_NAMES, surname, ORGANISATION_NAME and DISPLAY_NAME.

    2. - insert values into the table
    INSERT INTO NAMES_TABLE VALUES(1, 'GH', NULL, NULL, NULL, 'GROUP OF HOSPITAL')
    /
    INSERT INTO NAMES_TABLE VALUES(2, 'DH', NULL, NULL, NULL, 'DEPARTMENT OF HEALTH')
    /
    INSERT INTO NAMES_TABLE VALUES(3, 'REC', NULL, NULL, NULL, 'DEBTOR FOR RECEIPTS')
    /
    INSERT INTO NAMES_TABLE VALUES(4, 'UN_REC', NULL, NULL, NULL, 'DEBTOR FOR UNMATCHED RECEIPTS')
    /
    INSERT INTO NAMES_TABLE VALUES(5, 'SAM_FUND', NULL, NULL, NULL, 'THE S FUND')
    /
    
     
    3 - create context multi_column_datastore index
    BEGIN
    CTX_DDL.CREATE_PREFERENCE('NAMES_TABLE_MULTI', 'MULTI_COLUMN_DATASTORE');
    CTX_DDL.SET_ATTRIBUTE('NAMES_TABLE_MULTI', 'COLUMNS', 'ENTITY_NUMBER, GIVEN_NAMES, SURNAME, ORGANISATION_NAME, DISPLAY_NAME');
    END;
    
    CREATE INDEX NAMES_TABLE_IDX
    ON NAMES_TABLE(ENTITY_NUMBER)
    INDEXTYPE IS   CTXSYS.CONTEXT
    PARAMETERS ('DATASTORE NAMES_TABLE_MULTI')
    
     
    4 - create the trigger that should update the column ENTITY_NUMBER if everything is inserted/updated
    CREATE OR REPLACE TRIGGER NAMES_TABLE_TRIGGER
    BEFORE INSERT OR UPDATE OF GIVEN_NAMES, SURNAME, ORGANISATION_NAME, DISPLAY_NAME  ON NAMES_TABLE
    FOR EACH ROW
    BEGIN
      :NEW.ENTITY_NUMBER := :NEW.ENTITY_NUMBER;
    END
     
    5. the search query
    SELECT *
    FROM NAMES_TABLE
    WHERE  CONTAINS(ENTITY_NUMBER,'%TH%') > 0
     
    I am so very confused here because the result returned is only
    ID     ENTITY_NUMBER     GIVEN_NAMES     SURNAME     ORGANISATION_NAME     DISPLAY_NAME         
     2      DH                  (null)        (null)         (null)          DEPARTMENT OF HEALTH 
     
    When I wait for him that the 5th inserted record is returned too as it contains "THE S FUND" that begins with "TH".

    When I use the search string '% %' and %, no results are returned, although I expect at least two records in each case.

    I would appreciate help with this.

    Thanks in advance,
    Marilyn

    Published by: user5615580 on 08/03/2011 21:35

    Published by: user5615580 on 08/04/2011 16:33
  • Validator do not return is not the results.

    Hi all

    I extended the StringValidator class in order to create a user name validator. When a new user is registered, the user name is validated on the server to check if it exists.

    The code is not thrown error and I know the remoteobject calls to work. The push sets the message, but the problem is that the result is not returned.

    The flow is correct?

    public class PosUsernameValidator extends StringValidator {
              
              private var userServiceRO:RemoteObject = new RemoteObject();
              private var validatorResults:Array = new Array();
              
              public function PosUsernameValidator(){
                   super();
                   userServiceRO.destination = "UserService";
                   userServiceRO.getUserByUserName.addEventListener("result", getUserByUserNameRH);
                   userServiceRO.getUserByUserName.addEventListener("fault", getUserByUserNameFH)
              }
              
              override protected function doValidation(value:Object):Array {
                   validatorResults = super.doValidation(value); 
                   return doForUserName(value);
              }
              
              private function doForUserName(value:Object):Array{
                   userServiceRO.getUserByUserName(String(value));
                   return validatorResults;
              }
              
              private function getUserByUserNameRH(r:ResultEvent, t:Object = null):void{
                   var user:User = r.result as User;
                   if(user!=null){
                        validatorResults.push(new ValidationResult(true, null, "Username error","Username already taken!"));
                   }
              }
              
              private function getUserByUserNameFH(f:FaultEvent, t:Object = null):void{
                   Alert.show(ObjectUtil.toString(f));
              }
              
         }
    

    Once the error message string from the server side, link it to property 'errorString' of any component of entry, you want to display the error on. This will give you the red border and a ScreenTip as if you used a validator. Don't forget to set the error return string to "" to clear the message once validation passes.

  • sys_context procedure does not return an ip address

    Hello


    DB 11 GR 1 material

    What would be the reason for which this query does not return an IPAddress?

    Select sys_context ('userenv', 'IPAddress') of double;

    Thank you

    What would be the reason for which this query does not return an IPAddress?

    USERENV does not know what the IP # is.

    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> select sys_context('userenv', 'ip_address') from dual;
    
    SYS_CONTEXT('USERENV','IP_ADDRESS')
    --------------------------------------------------------------------------------
    

    Maybe it's because you are connected locally & not via SQL * Net

    Published by: sb92075 on October 27, 2010 12:53

Maybe you are looking for