Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: A couple of questions

Re: A couple of questions

From: Jerry Gitomer <jgitomer_at_ictgroup.com>
Date: 1998/01/30
Message-ID: <34D23D76.6500@ictgroup.com>#1/1

songmuh wrote:
>
> Hello,
>
> Two more questions for all you Oracle gurus:
> 1. How can I list all the stored procedures?

	SELECT object_name 
	FROM DBA_OBJECTS
	WHERE OBJECT_TYPE = 'PROCEDURE';

	Since DBA_OBJECTS contains one record for every in your
	data base this should return a list of all of the stored
	procedures.

> 2. I want to get the table definition and format it
> to a text file so that I can import the file into a structure.
> I know that I can describe the table at SQL*Plus prompt,
> but is there a way to catch the output of the DESC
> command and save it to a file?
>

	SPOOL file_name.sql
	DESC  table_name
	SPOOL OFF

	The above three steps will create a file which can be
	easily edited to change tablespace names, default storage,
	table and column names, and/or the structure.

	You have three alternatives for populating your new table(s)
	once created:

	1.  INSERT INTO new_owner.table_name 
	    SELECT * FROM old_owner.table_name;

	2.  SELECT * FROM old_owner.table_name;
	then write a SQL*Loader control file and use the loader

	3.  EXPORT and then IMPORT

	If you haven't changed the structure and column names the
	first alternative is fastest.

	Regards

	Jerry

	
	EXIT

	(edit your file as desired)

	

> TIA,
>
> Songmuh
 

-- 
Jerry Gitomer               Since I know how to spell DBA I is one!
jgitomer_at_ictgroup.com
jgitomer_at_p3.net             Opinions are mine not those of ICT Group
Received on Fri Jan 30 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US