• Home
  • About
  • Links
MemoSoup

MemoSoup

Mix of the things I always forget

CommentsPosts
 

 
  • Scripts
    • Unix
    • Windows & DOS
    • Perl
    • JavaScript
    • VB
  • Tips & Tricks
    • MS Office
    • Photo
    • Documents
  • SQL
    • Sybase
    • Oracle
    • mysql
    • MS SQL
  • Web
  • Programming
    • c++
    • Java
  • System
    • Windows
    • Linux
    • Solaris
 

Oracle: using DBMS_METADATA for getting table structure

SET LONG 5000 SELECT dbms_metadata.get_ddl(’TABLE’,'EMP’,'SCOTT’) FROM dual;

Some other values of the type field for dbms_metadata.get_ddl function:

INDEX DB_LINK PACKAGE

(See also “Oracle® Database PL/SQL Packages and Types Reference“)

Tweet
news and informations automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel
December 29th, 2009 | Tags: dbms_metadata, table | Category: Oracle | Leave a comment

Oracle: source text for the view, package and other objects

The best method is to use dbms_metadata package:

SELECT dbms_metadata.get_ddl(UPPER(’&OBJ_TYPE’),UPPER(’&OBJ_NAME’),UPPER(’&OWNER’)) FROM dual;

Additional methods could be also used: Source text of the package

SELECT text FROM dba_source WHERE UPPER(name) LIKE UPPER(’&which_object’) ORDER BY line ;

Use $ORACLE_HOME/bin/wrap utility to encrypt the package (there is no unwrap) (Well, actually, there is unwrap – just look in [...]

Tweet
news and informations automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel
October 26th, 2009 | Tags: dbms_metadata, Oracle, source | Category: Oracle | Leave a comment

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Copyright © 2012 MemoSoup - All Rights Reserved

Tags

alert log batch bookmark browser case convert create database date dbms_metadata device error export file find Java javascript Linux log logon md5 MS SQL mysql Oracle output parameter parameters password performance Perl process shell solaris space sp_who Sybase table tablespace trigger unix vbs version Windows wmi word

Powered by WordPress & Atahualpa