I know I can save all my stored procedures and views in one script in MS SQL, but how to do the same thing in Oracle?
Printable View
I know I can save all my stored procedures and views in one script in MS SQL, but how to do the same thing in Oracle?
You have all yours source in dba_source, text column. You can spool tht text column to a script.
where can I find that dba_source?
DBA_SOURCE is a View in Data Dictionary...
If you don't have DBA Priviliges, just select like this
Select Text From User_Source
Where name = Upper('&ObjectName')
and Type = Upper('&ObjectType')
Order by Line;
It will ask you Object Name, and Type, Give your Procedure name, Function name or Package name... and The Type either it is Procedure , Package etc . You will get the Results.
Thanks
I tried that and I'm getting all kind of information that I really don't want. I need only procedures and view. Is there any way to do it using GUI?
Probable you can do one thing:
Download the toad tool from the web, that can export you procedures to either one file or separate files as you want.
Take care
I can't find that TOAD thing and I decided to try it from SQL Spreadsheet but now it's not working. What should I do now?
Hi,Quote:
Originally posted by Anea
I can't find that TOAD thing and I decided to try it from SQL Spreadsheet but now it's not working. What should I do now?
I use the SQL-Navigator from Quest-Software (this company took over the TOAD, too). This tool may be expensive, but it's worth it. ( http://www.quests.com/ )
A script that generates a procedure is generated and saved with 5 mouseclicks.
Commit;
6502
Can I do it without any tool?
It's not working with dba_source.
What do you mean it's not working from dba_source...?
I already gave you the statement, instead of using dba_source, just use user_source.
Tha should be fine..
Hi,
If you have D2K/ Forms, then, I think you can get what
you want.
i) Open D/2K Form
ii) Connect to database
iii) go to Ojbect Navigator
iv) click "Database Objects"
v) click user(schema) you want
vi) Click Stored Program Unit
it will display all stored procedure name
vii) click your choice. It will display the source code;
You can also get source text from DBA_Source in sql plus
see the example
SQL> select text
2 from dba_source
3 where name='HELLO_JAVA';
TEXT
----------------------------------------
procedure Hello_Java(hl varchar2)
as
language java
name 'Hello.main(java.lang.String[])';
Thanks
P. Soni
[Edited by PSoni on 03-20-2001 at 04:49 AM]