Home » SQL & PL/SQL » SQL & PL/SQL » How to put source code into procedure ? (database 10g , XP SP2)
icon5.gif  How to put source code into procedure ? [message #325627] Fri, 06 June 2008 18:43 Go to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

let's suppose that we have a source code for store Schema like this schema that you can download it from follow Link :-

http://www.zshare.net/download/1322967884dcdbab/

or download it form attachment , in case the previous link didn't work.

and now I want to wrap it ,until get the plb file , and then no one can know the content of the schema source code , and as I know the ( procedure , function and package ) only could wrapped , so I tried to embed the source code in procedure , but the process failed Sad

Is there anyway to embed the source code schema into procedure until wrap the procedure later to get the plb file Question Exclamation
Re: How to put source code into procedure ? [message #325628 is a reply to message #325627] Fri, 06 June 2008 18:47 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above
Re: How to put source code into procedure ? [message #325640 is a reply to message #325627] Sat, 07 June 2008 00:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is "schema source code" and what does mean "the process failed"?

Regards
Michel
icon1.gif  well ....... [message #325645 is a reply to message #325640] Sat, 07 June 2008 02:08 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Michel Cadot wrote on Sat, 07 June 2008 08:11
What is "schema source code"


if you tried to download it , you will understand , may be it has another keyword , but I can't estimate but this terms only : "schema source code" .

Michel Cadot wrote on Sat, 07 June 2008 08:11
what does mean "the process failed"?



It's means that the procedure executed with errors ... I did that:-
( it's pseudo code ) :-

create procedure scs is
begin
execute immediate ' source code schema ';
end;
/


I don't want to post the "source code schema" after execute immediate , because it will take large area from the page .... if you need to see the entire code , download it from the attachment.

and now , is there any suggests for what I need Rolling Eyes
  • Attachment: scs.sql
    (Size: 67.63KB, Downloaded 366 times)
Re: well ....... [message #325649 is a reply to message #325645] Sat, 07 June 2008 02:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
if you tried to download it , you will understand , may be it has another keyword , but I can't estimate but this terms only : "schema source code" .

Explain, in words, every term has its definition in words, give yours.
In addition, instead of creating notion without explaining it, post without it even if it takes more words to post.

Quote:
I don't want to post the "source code schema" after execute immediate , because it will take large area from the page

So put a small example.

Quote:
if you need to see the entire code , download it from the attachment.

No I don't want to make this effort. Put all what I need to help you in the post.

By the way, why don't you wrap "scs"?

Regards
Michel
icon4.gif  well ....... [message #325655 is a reply to message #325649] Sat, 07 June 2008 04:23 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Quote:
By the way, why don't you wrap "scs"?


if I wraped it with it's problems , the procedure won't execute correctly ..... hence the schema won't create ..... tell me Michel ...... what exactly you don't understand from my question ?
I don't think my question is so hard to understood as you show .
you want the full code , OKay ..... take it :-
CREATE OR REPLACE ...

 REMOVED BY LITTLEFOT



and after the creation process done , give me that error :-

Warning: Procedure created with compilation errors.

SQL> 
SQL> sho err
Errors for PROCEDURE SCS:

LINE/COL ERROR
-------- ------------------------------------------
4/22     PLS-00172: string literal too long


and when I execute the procedure in new schema , give me that error :-

SQL> exec scs
BEGIN scs; END;

      *
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00905: object TIME_BILL.SCS is invalid
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored



so what is the solution for that situation ?

[EDITED by LF: please, do not do that any more. People who are interested in reading hundreds of lines will do it after visiting site whose address was posted in your first message.

You'd rather create a small, easy understandable example.]

[Updated on: Sat, 07 June 2008 09:48] by Moderator

Report message to a moderator

Re: well ....... [message #325657 is a reply to message #325655] Sat, 07 June 2008 04:39 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
first: why didn't you just give ONE table as an example instead of adding a zillion-lines script?

Second: It is plain dumb to wrap the schema creation script, as it can be obtained once installed.

If you want to copy-protect your application, add a copyright notice. Nothing more annoying than an erroneous wrapped procedure.

hmm, and third: what's the use of wrapping it now, after you posted it thrice...

[Updated on: Sat, 07 June 2008 04:41]

Report message to a moderator

Re: well ....... [message #325680 is a reply to message #325655] Sat, 07 June 2008 09:23 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Are you really so stupid to don't understand: "put a small example"!
As this level, there is nothing to do for you, or maybe a lobotomy will help.

Regards
Michel
icon13.gif  Re: well ....... [message #325684 is a reply to message #325657] Sat, 07 June 2008 09:31 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Quote:
first: why didn't you just give ONE table as an example instead of adding a zillion-lines script?

as you said it's "schema creation script" , so it's should post entirely not little part of it , and that's why I post it like an attachment in the post before the previous post.

Quote:
Second: It is plain dumb to wrap the schema creation script, as it can be obtained once installed.
If you want to copy-protect your application, add a copyright notice. Nothing more annoying than an erroneous wrapped procedure.

believe me it's great idea to wrap the "schema creation script" especially if you have smart codes you had put in it.... otherwise it's good idea also to make copyright - the note that you are talking about can be erase easily .

Quote:
hmm, and third: what's the use of wrapping it now, after you posted it thrice...

who say that's my schema ?!!!!!!
my "schema creation script" in my computer , I hope everything are clear now .

I'm waiting for the answer Smile
Re: How to put source code into procedure ? [message #325689 is a reply to message #325627] Sat, 07 June 2008 09:41 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
>I'm waiting for the answer
Nobody owes you an answer & you do NOT deserve any response.
Re: How to put source code into procedure ? [message #325691 is a reply to message #325689] Sat, 07 June 2008 10:23 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Quote:
Nobody owes you an answer & you do NOT deserve any response.

why ??????????????????????????
Re: How to put source code into procedure ? [message #325696 is a reply to message #325691] Sat, 07 June 2008 11:03 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is an asnwer that comes immediatly in my mind but you will report it once more.

Regards
Michel
icon2.gif  Re: How to put source code into procedure ? [message #325708 is a reply to message #325627] Sat, 07 June 2008 14:59 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

OKay people ..... Let's talk clear here. Neutral
if anyone have any suggests help me to embed "schema creation script" into procedure and then wrap it - without any errors - to get in the end Wrapped procedure ( plb file ) contain the schema creation script that could executed in any empty schema to make the schema that we need ........ I will be so grateful so much to him/her to post the suggests here in this thread.

if you haven't any suggests can help me , so please kindly don't reply .... that will be not so hard to do Neutral
Re: How to put source code into procedure ? [message #325718 is a reply to message #325708] Sun, 08 June 2008 02:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Are you still trying to create your virus?

http://www.orafaq.com/forum/m/301480/43710/#msg_301480

Regards
Michel
Re: well ....... [message #325725 is a reply to message #325684] Sun, 08 June 2008 03:39 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Hany Freedom wrote on Sat, 07 June 2008 16:31

believe me it's great idea to wrap the "schema creation script" especially if you have smart codes you had put in it.... otherwise it's good idea also to make copyright - the note that you are talking about can be erase easily .


There is no such thing as smart code in DDL.
Or could it be that everything you have in your code you are trying to sell is only too easy to to trace back to what WE advised you, so your customer might find out that you aren't the smart coder you tell them you are?
Seriously, I can't imagine that you have the ability to write (and more importantly, maintain) a commercial piece of software, considering the level of your questions here.
icon10.gif  Re: How to put source code into procedure ? [message #325731 is a reply to message #325718] Sun, 08 June 2008 03:58 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Quote:
Are you still trying to create your virus?

Very Happy Good for you Thumbs Up , I was almost forget about it.

but I'm still waiting for any ideas or suggests about the wrapped procedure contain schema creation script. Rolling Eyes

Quote:
considering the level of your questions here.

no genius didn't begin from Zero .... or you just born like professor in Oracle Very Happy

[Updated on: Sun, 08 June 2008 04:05]

Report message to a moderator

Re: How to put source code into procedure ? [message #325732 is a reply to message #325627] Sun, 08 June 2008 04:00 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Just curious, whether you are aware of the difference between SQL, PL/SQL and SQL*Plus.

To the question: you may easily put SQL commands into PL/SQL procedure/function/package; there is a section about it in PL/SQL User's Guide and Reference, found with other documentation books e.g. online on http://tahiti.oracle.com/.
No way to put SQL*Plus commands into PL/SQL code.
Re: How to put source code into procedure ? [message #325733 is a reply to message #325732] Sun, 08 June 2008 04:08 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

flyboy wrote on Sun, 08 June 2008 12:00
Just curious, whether you are aware of the difference between SQL, PL/SQL and SQL*Plus.

OKay .... let's suppose we removed the SQL*PLUS orders from the script , then what ?!
Re: How to put source code into procedure ? [message #325734 is a reply to message #325733] Sun, 08 June 2008 04:14 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Why don't you tell us why it is so important for you to hide what you're doing?

Like I stated before, it is useless to obfuscate schema creation scripts, since the endresult is always visible.
The only reason to wrap or encrypt it is if you are trying to do something unexpected (like the "virus"-thingy in the thread Michel linked to)

So, unless you tell us in general terms what "smart code" you use, I suggest we should assume that you have some malicious plans.
No need to tell in detail, if it really is "smart code", just tell us in general, tell us in what way it is smart, in what way it is untraceable after it has run.
Re: How to put source code into procedure ? [message #325737 is a reply to message #325733] Sun, 08 June 2008 04:20 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Hany Freedom wrote on Sun, 08 June 2008 11:08
flyboy wrote on Sun, 08 June 2008 12:00
Just curious, whether you are aware of the difference between SQL, PL/SQL and SQL*Plus.

OKay .... let's suppose we removed the SQL*PLUS orders from the script , then what ?!

Quote:
there is a section about it in PL/SQL User's Guide and Reference, found with other documentation books e.g. online on http://tahiti.oracle.com/.

Are you really unable to find an information when given a link to start? Or just too lazy to make any effort?
icon1.gif  Re: How to put source code into procedure ? [message #325739 is a reply to message #325627] Sun, 08 June 2008 04:36 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Quote:
Why don't you tell us why it is so important for you to hide what you're doing?

just for test , no more no less.
Quote:
I suggest we should assume that you have some malicious plans.

my virus remove all the tables in the schema forever , so how this virus be malicious in empty schema Exclamation Exclamation Exclamation

Quote:
Are you really unable to find an information when given a link to start? Or just too lazy to make any effort?

did you saw the link sweetheart before you talk Question Exclamation
Re: How to put source code into procedure ? [message #325741 is a reply to message #325739] Sun, 08 June 2008 04:45 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
No, this is NOT just for test.
You already have plans with it, otherwise you would not be referring to your smart code.

Flyboy's hyperlink is valid and directs you to all the documentation you could probably want.

Now explain why you want this and what it is you try to hide please. Even if it were for testing purposes, explain why you would go through all the trouble of doing it. After all, testing and experimenting is always done in order to (know how to) use it later.
Re: How to put source code into procedure ? [message #325744 is a reply to message #325627] Sun, 08 June 2008 04:54 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Quote:
did you saw the link sweetheart before you talk

As the (original) link is contained in a post you replied, I do not understand, what are you referring to.
icon1.gif  Re: How to put source code into procedure ? [message #325748 is a reply to message #325741] Sun, 08 June 2008 05:09 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Quote:
No, this is NOT just for test.
Now explain why you want this and what it is you try to hide please. Even if it were for testing purposes, explain why you would go through all the trouble of doing it. After all, testing and experimenting is always done in order to (know how to) use it later.

what suppose I tell you !!! ,it's really for testing purpose , should I give you lies to believe me ?!

Quote:
Flyboy's hyperlink is valid and directs you to all the documentation you could probably want.

how could that link be useful to me ????? you give me all the Documentation for the Oracle , and think I can read them all , I will need years to do it , and of course the ability too. , I already read the wrap from the specific like for it :-
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm

Quote:
otherwise you would not be referring to your smart code.

I haven't now "Smart Code" , or at least may be not smart enough to you , that because I telling you .... what I need it's ONLY FOR TEST
Re: How to put source code into procedure ? [message #325749 is a reply to message #325748] Sun, 08 June 2008 05:11 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
then you can stop testing, as this is not possible.
Re: How to put source code into procedure ? [message #325751 is a reply to message #325627] Sun, 08 June 2008 05:25 Go to previous messageGo to next message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Quote:
there is a section about it in PL/SQL User's Guide and Reference, found with other documentation books e.g. online on http://tahiti.oracle.com/.

Quote:
how could that link be useful to me ????? ...
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/toc.htm

It seems it was useful for you as you found PL/SQL User's Guide and Reference (the book suggested) for 10gR2.
Note that there is documentation for both 10gR1 and 10gR2 versions and you did not exactly specify your version.
As you claim you found info about the wrap utility, it is hard to believe you cannot find anything about using SQL in PL/SQL.
Re: How to put source code into procedure ? [message #325753 is a reply to message #325749] Sun, 08 June 2008 06:08 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Frank wrote on Sun, 08 June 2008 13:11
as this is not possible.


are you sure Frank from that ? is certain sure that no hope to carry out what I need ?!
Re: How to put source code into procedure ? [message #325755 is a reply to message #325753] Sun, 08 June 2008 06:12 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Yes, I am sure. You can quit your tests.
Re: How to put source code into procedure ? [message #325756 is a reply to message #325755] Sun, 08 June 2008 06:28 Go to previous messageGo to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
This is not applicable in XP..

I am not sure if this is possible but I read that shell scripts can be run from stored procedures (oracle in Linux/Unix) so do you think it may be possible to run a wrapped form of the code as a system file from a shell script in stored procedure and produce the desired result



icon10.gif  Re: How to put source code into procedure ? [message #325769 is a reply to message #325755] Sun, 08 June 2008 09:42 Go to previous messageGo to next message
Hany Freedom
Messages: 256
Registered: May 2007
Location: Egypt
Senior Member

Quote:
Yes, I am sure. You can quit your tests.

thanks Frank you really good adviser .... but NO
I will try again and again and again and again and again and again and again Laughing Razz Very Happy

Quote:
This is not applicable in XP.

can you please give me your source for this information.

and thanks in advance.
Re: How to put source code into procedure ? [message #325771 is a reply to message #325627] Sun, 08 June 2008 10:35 Go to previous message
flyboy
Messages: 1832
Registered: November 2006
Senior Member
Quote:
I read that shell scripts can be run from stored procedures (oracle in Linux/Unix)

In DOS/Windows, they are called batch files.
Quote:
so do you think it may be possible to run a wrapped form of the code as a system file from a shell script

I think it is not possible, at least using Oracle wrapper.
I am also not sure what does "system file" (what do you mean by that?) have to do with this matter.
You just included operating system to this "problem", nothing more.
Previous Topic: ROWID reliability question.
Next Topic: PLSQL sorting
Goto Forum:
  


Current Time: Sun Dec 04 15:01:42 CST 2016

Total time taken to generate the page: 0.08279 seconds