Re: A question on table export

From: Yaping Chen <hangzhoumaster_at_gmail.com>
Date: Wed, 2 Jul 2008 21:47:41 +0800
Message-ID: <170d3ad90807020647h4d09a7cfta65310ced6e83321@mail.gmail.com>


FYI
[oracle_at_chen ~]$ exp test/test tables=t2 file=t2.dmp silent=y

About to export specified tables via Conventional Path ...

. . exporting table                             T2         10 rows exported
Export terminated successfully without warnings.

Edit dump file t2.dmp with vi tools, change all T2 words to T8 in the file, then save it.
[oracle_at_chen ~]$ vi t2.dmp

...
TABLE "T2"
CREATE TABLE "T2" ("ID" NUMBER) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "TEST" LOGGING NOCOMPRESS
INSERT INTO "T2" ("ID") VALUES (:1)

^A^@^B^@^V^@^@^@^@^@^B^@Ã^B^@^@^B^@Ã^C^@^@^B^@Ã^D^@^@^B^@Ã^E^@^@^B^@Ã^F^@^@^B^@Ã^G^@^@^B^@Ã^H^@^@^B^@Ã<%5EA%5E@%5EB%5E@%5EV%5E@%5E@%5E@%5E@%5E@%5EB%5E@Ã%5EB%5E@%5E@%5EB%5E@Ã%5EC%5E@%5E@%5EB%5E@Ã%5ED%5E@%5E@%5EB%5E@Ã%5EE%5E@%5E@%5EB%5E@Ã%5EF%5E@%5E@%5EB%5E@Ã%5EG%5E@%5E@%5EB%5E@Ã%5EH%5E@%5E@%5EB%5E@Ã>
^@^@^B^@Ã <%5E@%5E@%5EB%5E@Ã>
^@^@^B^@Ã^K^@^@ÿà <%5E@%5E@%5EB%5E@Ã%5EK%5E@%5E@ÿÃ>¿
CREATE INDEX "IDX_T2_ID" ON "T2" ("ID" ) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "TEST" LOGGING
...

[oracle_at_chen ~]$ strings t2.dmp

EXPORT:V09.02.00
UTEST
RTABLES
8192

                                        Fri Jun 27 0:34:44 2008t2.dmp
#C##
#C##
+08:00
BYTE
INTERPRETED
TABLE "T8"
CREATE TABLE "T8" ("ID" NUMBER) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "TEST" LOGGING NOCOMPRESS
INSERT INTO "T8" ("ID") VALUES (:1)
CREATE INDEX "IDX_T8_ID" ON "T8" ("ID" ) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "TEST" LOGGING
EXIT
EXIT
[oracle_at_chen ~]$ imp test/test file=t2.dmp silent=y
Export file created by EXPORT:V09.02.00 via conventional path . importing TEST's objects into TEST
. . importing table                           "T8"         10 rows imported
Import terminated successfully without warnings.

2008/7/1 Anurag Verma <anuragdba_at_gmail.com>:

>
> I have an Oracle 9i (9.2.0.7.0) database.
>
> One question on table export.
>
> Can we export a table and import into another table (which has the same
> structure)?
>
> Both the tables are in the same schema.
>
>
> Thanks,
>
>
> --
>
> Anurag Verma,
> Database Administrator
> ERCOT(Electric Reliability Council of Texas),
> Texas 76574
>



-- 
Regards,
Chen Yaping

http://freelists.spaces.live.com
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jul 02 2008 - 08:47:41 CDT

Original text of this message