Jump to content

Oracle Table Ddl And Associated Objects ****oracle Dba****


Recommended Posts

Posted
Hello my fellow DBA's, This question maybe silly for few and important for others,
 
How do you Migrate database objects in your environments from one database to other ?
 
I use Toad I know am very lazy to code but i am looking for alternate ways to do in a relaible way using scritps.
 
 
However I cant figure out any one way to do it :
 
For Table Structure:
 
create table schema.table as select * from schema.table@&&DBLINK where 1=0;
 
It will only move the table structure, I want to grab Table structure, associated indexes, triggers or  any constraints, Sequences also the grants and synonyms of the table. 
 
(Dont recommend Data pump it will get data as well, I am looking only for Table strucuture and their associated objects).
 
 
select dbms_metadata.get_ddl('TABLE','DEPT','SCOTT') from dual; 
 
This would give only the table structure.
Posted

Datapump lo sqlfile ane option untadi, adi use cheste mottam anni ddl'd vastai without data... Edi inka easy way

Posted

Use dbms_metadata.get_ddl ...

select dbms_metadata.get_ddl('TABLE','DEPT','SCOTT') from dual;

I know but idi use cheste, associated Index raadu, Grants, roles. Grants explicitly given to the users on the table ivvi kuda ravali also the same for Procedures and Packages....Toad lo ithe antha graphical you can select what you need. 

 

Ee table migration cron tab to automate chedam anukuntuna like database refresh chesaka koni objects miss avtayyi kada non-prod lo

so compare report run chessi....evi ithe miss avtunnayo avi migrate cheyadaniki na tapana.

Posted

use data pump and export with metadata only option .. that will bring only the ddls for all the objects ... no data will be brought ... 

 

Posted

Data Pump -- Metadata Option -- Generate Sql file--

Take it only for that Particular Table.

Posted

use data pump and export with metadata only option .. that will bring only the ddls for all the objects ... no data will be brought ...

Yes just use content= metadata
×
×
  • Create New...