Re: A question on table export

From: Gus Spier <gus.spier_at_gmail.com>
Date: Wed, 2 Jul 2008 10:02:37 -0400
Message-ID: <6d3967610807020702l43ef6e21i164b0d51740b4814@mail.gmail.com>


That will work ... Unless the string you propose to change shows up in other places (like in a value in one of the columns) ...

Be careful

It remains unclear why "CREATE TABLE AS ..." is not the solution of choice.

Regards,
Gus

On Wed, Jul 2, 2008 at 9:47 AM, Yaping Chen <hangzhoumaster_at_gmail.com> wrote:

> 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@%C3%83%5EB%5E@%5E@%5EB%5E@%C3%83%5EC%5E@%5E@%5EB%5E@%C3%83%5ED%5E@%5E@%5EB%5E@%C3%83%5EE%5E@%5E@%5EB%5E@%C3%83%5EF%5E@%5E@%5EB%5E@%C3%83%5EG%5E@%5E@%5EB%5E@%C3%83%5EH%5E@%5E@%5EB%5E@%C3%83>
> ^@^@^B^@ <%5E@%5E@%5EB%5E@%C3%83>
> ^@^@^B^@^K^@^@ÿ <%5E@%5E@%5EB%5E@%C3%83%5EK%5E@%5E@%C3%83%C2%BF%C3%83>
> 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

-- 
Gus
703 304 5587 (mobile)
540 687 3370 (home)

gus.spier_at_gmail.com

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jul 02 2008 - 09:02:37 CDT

Original text of this message