开发者

clone oracle database without data

I want to clone my existing oracle database structure without data including packages, users, tablespaces etc. I read some methods but they all copied data as well. Is there a开发者_C百科nyway out in order to do this?

Thanks in advance.


Use SQL Developer > Tools > Database Export..

On "Specify Data" do not include any tables.

clone oracle database without data

Omit packages etc here,

clone oracle database without data

Fine tune your selection here,

clone oracle database without data

My trial export has not finished yet but I expect this will work.


Use Oracle exp.exe utility for export. E.g.

EXP.EXE login/password@TNSNAME file=entire_db.dmp owner=(scott, my_user, user2) rows=n grants=y triggers=y

Only rows=n option in command above make sense for your task.

You can import to target database with imp.exe utility.

Look for detailed option list and definition by running this utilities with help=y option.

BUT tablespaces and users on target databases must be created manually before running import. There are no standard tablespace cloning tools (including SQL Developer), but some queries exists for generating such cloning scripts. Examples can be found here and here.

P.S. This question better fits to ServerFault than to StackOverflow ...


You can do it in toad but its not free tool. (Database Tab->Export->Export DDL)


Try Oracle Export command with ROWS=N

exp SCOTT/TIGER ROWS=N TRIGGERS=N 


Use SQL Developer, Tools > Database Export.

You will need to specify at least one table in the 'data' option because you cannot choose to NOT export any data. Pick a table that has a small number of rows or create a dummy table without any rows beforehand as a workaround.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜