Home » SQL & PL/SQL » SQL & PL/SQL » viewing all create and alter statements
viewing all create and alter statements [message #250975] Thu, 12 July 2007 01:57 Go to next message
yoonus.it@gmail.com
Messages: 109
Registered: June 2007
Location: kuwait
Senior Member
Hi Seniors,

I am using oracle 10g version 10.2.0

I have a doubt. Is it possible to view all create and alter statements that we issued to create different objects.If possible which table or view i have to query.

Your answer appreciated.

Hava a gud day.....


unus
Re: viewing all create and alter statements [message #251002 is a reply to message #250975] Thu, 12 July 2007 02:56 Go to previous messageGo to next message
Michel Cadot
Messages: 64117
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Best way is to use dbms.metada.get_ddl.

Regards
Michel
Re: viewing all create and alter statements [message #251024 is a reply to message #251002] Thu, 12 July 2007 03:40 Go to previous messageGo to next message
yoonus.it@gmail.com
Messages: 109
Registered: June 2007
Location: kuwait
Senior Member
Thankz Michel

Can you just show me with an example how to use that?
Re: viewing all create and alter statements [message #251025 is a reply to message #251024] Thu, 12 July 2007 03:47 Go to previous messageGo to next message
Michel Cadot
Messages: 64117
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> select dbms_metadata.get_ddl('TABLE','T',user) from dual;
DBMS_METADATA.GET_DDL('TABLE','T',USER)
---------------------------------------------------------------------------------

  CREATE TABLE "MICHEL"."T"
   (    "US" VARCHAR2(10 CHAR),
        "EMAIL" VARCHAR2(10 CHAR),
        "ID" NUMBER(*,0)
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
  STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "TS_D01"

Regards
Michel
Re: viewing all create and alter statements [message #251026 is a reply to message #251024] Thu, 12 July 2007 03:54 Go to previous message
yoonus.it@gmail.com
Messages: 109
Registered: June 2007
Location: kuwait
Senior Member
Sorry i got it and worked

Thanks alot
Previous Topic: ORA 22835: buffer too small for blob to char
Next Topic: deferrable foreign key
Goto Forum:
  


Current Time: Tue Dec 06 04:17:41 CST 2016

Total time taken to generate the page: 0.11467 seconds