8 Replies Latest reply on Feb 12, 2013 5:20 AM by Ahamed Rafeeque

    Get_Application_Property(USERNAME) and proxyuser

      I have a proxyuser setup and an appuser which has grant connect through proxyuser.
      So, when connecting to forms , when we say proxyuser[appuser] for user field while logging into the db,
      the Get_Application_Property(USERNAME) literally reads the user field and has value proxyuser[appuser] but desired is appuser.
      Is there a way to override it and just get appuser like we see in other tools like Toad which shows appuser@db rightly and use the USER value.
      Of course, i could do string manipulations or use USER value itself but its a lot of change for us, hence wanted to know.

      Edited by: 902337 on Feb 11, 2013 8:11 AM

      Edited by: 902337 on Feb 11, 2013 8:12 AM
        • 1. Re: Get_Application_Property(USERNAME) and proxyuser
          Ahamed Rafeeque
          Dear Friend

          Please try with the query below

          Select USER INTO MUser FROM DUAL;

          I hope this will help you.

          Ahamed Rafeeque Cherkala
          • 2. Re: Get_Application_Property(USERNAME) and proxyuser
            hello sir,
            thanks for the reply.
            Like i mentioned, "Of course, i could do string manipulations or use USER value itself ", i do know a few ways to get around it but it s existing code in about 500 forms and fixing them would take a while, hence looking for a fix to the get_appln_property.
            • 3. Re: Get_Application_Property(USERNAME) and proxyuser
              Ahamed Rafeeque
              Dear Friend,

              You have to change the code that sure, I will sugest one thing please add "S" to the GET_APPLICATION_PROPERTY ( ie. GET_APPLICATION_PROPERTYS) and create a stored function like this below

              MUser VARCHAR2(30);

              As per my knowledge you can open multiple form within a form bulider I don't exact no of forms you can open at a time and using finde and replace you can replace GET_APPLICATION_PROPERTY to GET_APPLICATION_PROPERTYS within 5 minute.


              Ahamed Rafeeque Cherkala
              • 4. Re: Get_Application_Property(USERNAME) and proxyuser
                Andreas Weiden
                Well, but this will intercept all other calls of GET_APPLICATION_PROPERTY. maybe better to create a function GET_USER instead.
                • 5. Re: Get_Application_Property(USERNAME) and proxyuser
                  Are you basically looking for the workstation user name instead of the database user name? If so, you can use a Java Bean or WebUtil to get the Client user name. Both of these options will require some configuration changes to enable them but neither are that difficult.

                  For Java, take a look at A Java Bean to get the client machine information.

                  For WebUtil, search the Forms Help system on "Configure WebUtil". Three help topics will display: Introduction to WebUtil, Configuring WebUtil and Runtime Setup. Read each topic and print out the Runtime Setup topic and use it when you are configuring WebUtil. Once you have WebUtil configured you can use the WebUtil_ClientInfo.Get_User_Name() function to return the client user name.

                  Hope this helps,
                  • 6. Re: Get_Application_Property(USERNAME) and proxyuser
                    Thanks all for replying.
                    Sorry that i am not clear in my earlier post.
                    No, i am not looking for workstation user name or a different function for Get_Application_Property .

                    I am trying to connect to a user appuser which has connect grant through a proxy user.
                    ALTER USER appuser Grant connect through Proxy_user

                    So, as you know, To connect to db through any tool like SQL*PLUS, Toad or forms, we would do user name as proxy_user[appuser]/pwd@testdb

                    Unfortunately, for forms, we use Get_Application_Property(USERNAME) which returns "proxy_user[appuser]" value literally instead of desired which is just "appuser" and thats the value of USER built in as well.

                    LOOKS like i have no choice other than to change code to use a different function or manipulate string but wanted to get opinion from others as well without assuming and whether anyone else faced this scenario.

                    If Forms recognizes proxy connect and returns just the USER value of appuser when calling Get_Application_Property(USERNAME) built in, that would have been great.

                    Again, as you know, in the real world, any change in code in many places even if trivial, involves a project and testing phase . I was just trying to see if i can limit it without a change everywhere by seeing if oracle has a different way either by the way i m connecting or overriding the built in or even a patch to fix this issue.

                    Thanks again for all your time.

                    Ps: Ahamed, as you know, you can actually change forms using frmjdapi in the java world cleaner without opening all forms and searching to replace.


                    Edited by: 902337 on Feb 11, 2013 11:29 AM
                    • 7. Re: Get_Application_Property(USERNAME) and proxyuser
                      Ahamed Rafeeque
                      Sorry friend,

                      He has to replace GET_APPLICATION_PROPERTY(USERNAME) to GET_APPLICATION_PROPERTYS(USERNAME). Then it will effect for username application property only.

                      Ahamed Rafeeque Cherkala
                      • 8. Re: Get_Application_Property(USERNAME) and proxyuser
                        Ahamed Rafeeque
                        Dear Friend,

                        Thanks for your information regarding frmjdapi.

                        Ahamed Rafeeque Cherkala

                        Edited by: Ahamed Rafeeque on Feb 11, 2013 9:20 PM