导出oracle数据库的脚本文件,导出一ORACLE用户下的所有对象的DDL脚本

[oracle@vrh8 ~]$ exp maclean/maclean file=maclean_ddl rows=no owner=maclean

Export: Release 10.2.0.5.0 - Production on Thu Dec 20 02:04:45 2012

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export done in US7ASCII character set and UTF8 NCHAR character set

server uses AL32UTF8 character set (possible charset conversion)

Note: table data (rows) will not be exported

About to export specified users ...

. exporting pre-schema procedural objects and actions

. exporting foreign function library names for user MACLEAN

. exporting PUBLIC type synonyms

. exporting private type synonyms

. exporting object type definitions for user MACLEAN

About to export MACLEAN's objects ...

. exporting database links

. exporting sequence numbers

. exporting cluster definitions

. about to export MACLEAN's tables via Conventional Path ...

. . exporting table                             BB

EXP-00091: Exporting questionable statistics.

EXP-00091: Exporting questionable statistics.

. . exporting table                        MACLEAN

EXP-00091: Exporting questionable statistics.

. . exporting table                    MACLEAN_LOB

EXP-00091: Exporting questionable statistics.

. . exporting table                             TV

EXP-00091: Exporting questionable statistics.

. . exporting table                         VALIT2

EXP-00091: Exporting questionable statistics.

. exporting synonyms

. exporting views

. exporting stored procedures

. exporting operators

. exporting referential integrity constraints

. exporting triggers

. exporting indextypes

. exporting bitmap, functional and extensible indexes

. exporting posttables actions

. exporting materialized views

. exporting snapshot logs

. exporting job queues

. exporting refresh groups and children

. exporting dimensions

. exporting post-schema procedural objects and actions

. exporting statistics

Export terminated successfully with warnings.

[oracle@vrh8 ~]$ imp maclean/maclean file=maclean_ddl.dmp show=y full=y

Import: Release 10.2.0.5.0 - Production on Thu Dec 20 02:07:06 2012

Copyright (c) 1982, 2007, Oracle.  All rights reserved.

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT:V10.02.01 via conventional path

import done in US7ASCII character set and UTF8 NCHAR character set

import server uses AL32UTF8 character set (possible charset conversion)

. importing MACLEAN's objects into MACLEAN

"BEGIN  "

"sys.dbms_logrep_imp.instantiate_schema(schema_name=>SYS_CONTEXT('USERENV','"

"CURRENT_SCHEMA'), export_db_name=>'G10R25', inst_scn=>'31433226');"

"COMMIT; END;"

"CREATE TABLE "BB" ("OWNER" VARCHAR2(30), "OBJECT_NAME" VARCHAR2(128), "SUBO"

"BJECT_NAME" VARCHAR2(30), "OBJECT_ID" NUMBER, "DATA_OBJECT_ID" NUMBER, "OBJ"

"ECT_TYPE" VARCHAR2(19), "CREATED" DATE, "LAST_DDL_TIME" DATE, "TIMESTAMP" V"

"ARCHAR2(19), "STATUS" VARCHAR2(7), "TEMPORARY" VARCHAR2(1), "GENERATED" VAR"

"CHAR2(1), "SECONDARY" VARCHAR2(1))  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRA"

"NS 255 STORAGE(INITIAL 6291456 NEXT 1048576 FREELISTS 1 FREELIST GROUPS 1 B"

"UFFER_POOL DEFAULT) TABLESPACE "TTSA" LOGGING NOCOMPRESS"

"CREATE INDEX "IND_OBJD1" ON "BB" ("OBJECT_ID" )  PCTFREE 10 INITRANS 2 MAXT"

"RANS 255 STORAGE(INITIAL 1048576 NEXT 1048576 FREELISTS 1 FREELIST GROUPS 1"

" BUFFER_POOL DEFAULT) TABLESPACE "TTSA" LOGGING"

"CREATE TABLE "MACLEAN" ("T1" NUMBER(*,0), "T2" CHAR(20), "T3" CHAR(20), "T4"

"" CHAR(20), "T5" CHAR(20), "T6" DATE)  PCTFREE 10 PCTUSED 40 INITRANS 1 MAX"

"TRANS 255 STORAGE(INITIAL 17825792 NEXT 1048576 FREELISTS 1 FREELIST GROUPS"

" 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRESS"

"CREATE TABLE "MACLEAN_LOB" ("T1" VARCHAR2(200) NOT NULL ENABLE, "T2" CLOB, "

""T3" CLOB)  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 3"

"145728 NEXT 1048576 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABL"

"ESPACE "USERS" LOGGING NOCOMPRESS LOB ("T2") STORE AS  (TABLESPACE "USERS" "

"ENABLE STORAGE IN ROW CHUNK 16384 PCTVERSION 50 CACHE  STORAGE(INITIAL 6553"

"6 NEXT 1048576 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) LOB ("T3"

"") STORE AS  (TABLESPACE "USERS" ENABLE STORAGE IN ROW CHUNK 16384 PCTVERSI"

"ON 50 CACHE  STORAGE(INITIAL 65536 NEXT 1048576 FREELISTS 1 FREELIST GROUPS"

" 1 BUFFER_POOL DEFAULT))"

"CREATE TABLE "TV" ("RN" NUMBER, "RP" VARCHAR2(600))  PCTFREE 10 PCTUSED 40 "

"INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 450887680 NEXT 1048576 FREELISTS 1 "

"FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRES"

"S"

"CREATE TABLE "VALIT2" ("T1" NUMBER(*,0))  PCTFREE 10 PCTUSED 40 INITRANS 1 "

"MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 FREELISTS 1 FREELIST GROUPS"

" 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" LOGGING NOCOMPRESS"

"ALTER SESSION SET "_LOAD_WITHOUT_COMPILE" = PLSQL"

"CREATE procedure insert_data(s int) as"

"    begin"

"      for i in 1..s  loop"

"        insert into MACLEAN values(i,'A','B','C','D',sysdate);"

"        commit;"

"        end loop;"

"        end;"

"ALTER SESSION SET "_LOAD_WITHOUT_COMPILE" = NONE"

"ALTER PROCEDURE "INSERT_DATA" COMPILE REUSE SETTINGS TIMESTAMP '2012-10-25:"

"12:00:02'"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值