yenna_chata Posted September 17, 2014 Report Posted September 17, 2014 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.
CheGuevara Posted September 17, 2014 Report Posted September 17, 2014 Datapump lo sqlfile ane option untadi, adi use cheste mottam anni ddl'd vastai without data... Edi inka easy way
yenna_chata Posted September 17, 2014 Author Report Posted September 17, 2014 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.
yenna_chata Posted September 17, 2014 Author Report Posted September 17, 2014 delete everything from table ^&H
MeetFriendz Posted September 17, 2014 Report Posted September 17, 2014 use data pump and export with metadata only option .. that will bring only the ddls for all the objects ... no data will be brought ...
All Posted September 17, 2014 Report Posted September 17, 2014 Data Pump -- Metadata Option -- Generate Sql file-- Take it only for that Particular Table.
Bondu_Babu Posted September 17, 2014 Report Posted September 17, 2014 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
Recommended Posts