Home » SQL & PL/SQL » Client Tools » dbms_metadata.get_ddl in Sql*Plus (Oracle 9.2.0.8.0, [SQL*Plus: Release 9.2.0.1.0 & SQL*Plus: Release 11.2.0.1.0])
dbms_metadata.get_ddl in Sql*Plus [message #494076] Fri, 11 February 2011 05:03 Go to next message
Roachcoach
Messages: 1508
Registered: May 2010
Location: UK
Senior Member
This is probably something quite trivial but I tend to use Sql Dev for things like this and the issue isn't there (yay for training wheels GUI)

Below is an output of the code I'm running, the package is much longer than is showing!


SQL> select dbms_metadata.get_ddl('PACKAGE','MVIEW_REFRESH_API','BATCHP') metad from dual;

  CREATE OR REPLACE PACKAGE "BATCHP"."MVIEW_REFRESH_API"
AS

    /**


How do I have it show the full output?

NB: It happens in both listed versions of sqlplus

[Updated on: Fri, 11 February 2011 05:04]

Report message to a moderator

Re: dbms_metadata.get_ddl in Sql*Plus [message #494078 is a reply to message #494076] Fri, 11 February 2011 05:07 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
Use set long .....
Re: dbms_metadata.get_ddl in Sql*Plus [message #494079 is a reply to message #494078] Fri, 11 February 2011 05:08 Go to previous messageGo to next message
Roachcoach
Messages: 1508
Registered: May 2010
Location: UK
Senior Member
Thanks Smile
Re: dbms_metadata.get_ddl in Sql*Plus [message #494080 is a reply to message #494079] Fri, 11 February 2011 05:11 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
You can use *_source also.
Re: dbms_metadata.get_ddl in Sql*Plus [message #494081 is a reply to message #494080] Fri, 11 February 2011 05:11 Go to previous messageGo to next message
Roachcoach
Messages: 1508
Registered: May 2010
Location: UK
Senior Member
What's that one?

Long worked but more knowledge is good Smile
Re: dbms_metadata.get_ddl in Sql*Plus [message #494082 is a reply to message #494081] Fri, 11 February 2011 05:14 Go to previous messageGo to next message
ramoradba
Messages: 2456
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
ind> select table_name||' Is the '  ||COMMENTS
  2  from dict
  3  where TABLE_NAME like '%SOURCE';

TABLE_NAME||'ISTHE'||COMMENTS
----------------------------------------------------------------------------------------------------
USER_SOURCE Is the Source of stored objects accessible to the user
ALL_SOURCE Is the Current source on stored objects that user is allowed to create
DBA_SOURCE Is the Source of all stored objects in the database
--------------------------------------

6 rows selected.

[Updated on: Fri, 11 February 2011 05:16]

Report message to a moderator

Re: dbms_metadata.get_ddl in Sql*Plus [message #494084 is a reply to message #494082] Fri, 11 February 2011 05:17 Go to previous message
Roachcoach
Messages: 1508
Registered: May 2010
Location: UK
Senior Member
Oh that source. I knew about that one, I thought it was a sqlplus command I'd not seen and wasn't in the doc I had open at the time!

/bonks head
Previous Topic: grant user schema to another user
Next Topic: PROMPT & ACCEPT
Goto Forum:
  


Current Time: Tue Jan 16 02:45:44 CST 2018

Total time taken to generate the page: 0.48407 seconds