13 Replies Latest reply on Jun 18, 2019 8:02 PM by Mark D Powell

    Oracle Wrapper

    4018809

      Hi,

       

      Need some detailed explanation about oracle wrapper with an example please

       

      Many Thanks

        • 1. Re: Oracle Wrapper
          AndrewSayer

          4018809 wrote:

           

          Hi,

           

          Need some detailed explanation about oracle wrapper with an example please

           

          Many Thanks

          What are you referring to? Maybe telling us the context you saw the term in would help?

          • 2. Re: Oracle Wrapper
            Mustafa KALAYCI

            Hi,

             

            here: LMGTFY

            • 3. Re: Oracle Wrapper
              Andris Perkons-Oracle

              You sound exactly like the other guy who excessively points to LMGTFY. Please don't do that. There are more polite ways to encourage someone to do their own research.

               

              Andris

              • 4. Re: Oracle Wrapper
                Mustafa KALAYCI

                Hi,

                 

                I know the "other guy" and I don't support that beheave but this question is so superficial. if you just check google for that very simple search you won't be asking this question as this is. please also check my other replies to others I mostly don't answer like that.

                 

                edit: I would like to add one more thing. This kind of questions are kind of abuse of the community. people are trying to help here voluntarily and no one should ask a question without reading faq and "how do I ask question" rules. again, my answer really gives the question for the OP.

                • 5. Re: Oracle Wrapper
                  BrunoVroman

                  Hello 4018809,

                   

                  -A-

                  create a file "x.sql" with content:
                  CREATE OR REPLACE FUNCTION hello RETURN VARCHAR2 AS
                  BEGIN
                    RETURN 'hello world!';
                  END hello;
                  /

                  Then, in a sqlplus session: run the file to create the function, then try the function and lastly show its source code:
                  @x.sql
                  Function created.

                  SELECT hello FROM dual;
                  HELLO
                  --------------------------------------------------------------------------------------------
                  hello world!

                  And you can do, in the sqlplus session:
                  SELECT text FROM user_source WHERE name = 'HELLO' ORDER BY line;
                  TEXT
                  --------------------------------------------------------------------------------------------------------------------
                  function hello return varchar2 as
                  begin
                    return 'hello world!';
                  end hello;
                  4 rows selected.

                   

                  Now: back to the OS level, and we "wrap" the file:
                  $ wrap iname=x.sql oname=x.sqlx

                  And we go again in sqlplus to recreate the function, but this time with the wrapped file:

                  @x.sqlx
                  Function created.

                  SELECT hello FROM dual;
                  HELLO
                  --------------------------------------------------------------------------------------------
                  hello world!

                  (the function works the same way), but trying to see its source:
                  SELECT text FROM user_source WHERE name = 'HELLO' ORDER BY line;
                  TEXT
                  --------------------------------------------------------------------------------------------------------------------
                  function hello wrapped
                  a000000
                  1
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  abcd
                  8
                  4c 81
                  +/2GDfTW3Lt1OiQjje2VTv5/HN8wg8eZgcfLCNL+XoVa1/r66ufAsr2ym17nx3TAM7h0ZQm4
                  dIvAwDL+0oYJqaEmhI6nwR9DGhbluse+kr4WMFOSzs66gqamovWUHw==

                  1 row selected.

                   

                  ! Note that "wrapping" code will hide it for most users, but people who really want to see the original code can, with some effort, "unwrap" the source to find back the clear content.

                   

                  -B- Something else: welcome to the forums, but note that your "display name" is simply a generated "id"... May I suggest you to modify it to a more human-friendy one? It takes only a couple of minutes, please have a look atUpdate Your Community Display Name and Avatar!

                   

                  Best regards,

                   

                  Bruno Vroman.

                  1 person found this helpful
                  • 6. Re: Oracle Wrapper
                    4018809

                    Thank you very much very helpful

                    • 7. Re: Oracle Wrapper
                      mathguy

                      Andris Perkons-Oracle wrote:

                       

                      You sound exactly like the other guy who excessively points to LMGTFY.

                       

                      I don't particularly like the other guy's style either - sometimes he is rude, and sometimes gratuitously so, when the OP is right and the other guy is wrong, which does happen sometimes (not often).

                       

                      However, I believe his LMGTFY links should be quite helpful to posters (original or otherwise). I never felt that his pointers to LMGTFY in particular were excessive. Do you care to elaborate?

                      • 8. Re: Oracle Wrapper
                        jaramill

                        Andris Perkons-Oracle wrote:

                         

                        You sound exactly like the other guy who excessively points to LMGTFY. Please don't do that. There are more polite ways to encourage someone to do their own research.

                         

                        Andris

                        The problem is people are "lazy" and don't use the Google search OR...the Forum's own search function where they could find the answers MUCH faster, so forum members get frustrated.

                        Also we have a link on "How to ask a question on the forums" and when posts like this one from the OP are made, with LITTLE to NO information, we post that link for them to read.

                        • 9. Re: Oracle Wrapper
                          Andris Perkons-Oracle

                          Yes, agree with all of you that one would expect that the poster should be able to do at least some minimal research themselves before posting seemingly "easy" questions. But it is all about context (in this particular case, OP just joined the forum a couple of days ago) and about basic politeness. It makes a huge difference telling someone "Please use the community search before posting" or "you should be able to find a quick answer yourself using google" versus "you're lazy and obviously too dumb to use a search engine, so LMGTFY". This type of behaviour drives people looking for help away. Again, OP joined the forum just a couple of days ago, and we don't know what OP has tried before and if it even occured to him/her that this is an easy question.

                          If it keeps happening over and over, a stern word may be in place. But even then, this can be done in a non-aggressive tone. Or just don't answer at all. But one shouldn't let their frustration out on posters looking for answers.

                          • 10. Re: Oracle Wrapper
                            jaramill

                            Andris Perkons-Oracle wrote:

                             

                            Yes, agree with all of you that one would expect that the poster should be able to do at least some minimal research themselves before posting seemingly "easy" questions. But it is all about context (in this particular case, OP just joined the forum a couple of days ago) and about basic politeness. It makes a huge difference telling someone "Please use the community search before posting" or "you should be able to find a quick answer yourself using google" versus "you're lazy and obviously too dumb to use a search engine, so LMGTFY". This type of behaviour drives people looking for help away. Again, OP joined the forum just a couple of days ago, and we don't know what OP has tried before and if it even occured to him/her that this is an easy question.

                            If it keeps happening over and over, a stern word may be in place. But even then, this can be done in a non-aggressive tone. Or just don't answer at all. But one shouldn't let their frustration out on posters looking for answers.

                            Agreed but there are SEVERAL members who have been on here for a while that STILL do not follow the guidelines.  One noted example is user Jelly

                            • 11. Re: Oracle Wrapper
                              Andris Perkons-Oracle

                              I choose to ignore hopeless cases. I am not on a mission here. If someone repeatedly does not provide the information needed for a good answer, I wouldn't waste my time.

                              • 12. Re: Oracle Wrapper
                                jaramill

                                Andris Perkons-Oracle wrote:

                                 

                                I choose to ignore hopeless cases. I am not on a mission here. If someone repeatedly does not provide the information needed for a good answer, I wouldn't waste my time.

                                Exactly my point. They're "blacklisted" in my book so I offer no help but I do continue to "chastise" them until they get the point.  Others will help (more so to learn for themselves and that's fine, I just choose not to waste my time as I have my real job to worry about).

                                • 13. Re: Oracle Wrapper
                                  Mark D Powell

                                  user4018809, to add to what Bruno posted.  If your shop is planning on wrapping its stored code (PL/SQL) don't.  Nothing good comes from it and I have seen more than one post where the shop in question lost the unwrapped source and were trying to find out how to unwrap the code.  Then you have the issue of where the customer needs to see the package content to deal with poorly performing SQL coming from the package, bad results, or a run time error.

                                  - -

                                  IMHO -- Mark D Powell --

                                  1 person found this helpful