Home » RDBMS Server » Backup & Recovery » Does import overwrite existing data ?
Does import overwrite existing data ? [message #115548] Tue, 12 April 2005 10:41 Go to next message
oskarthik
Messages: 26
Registered: March 2005
Junior Member
hi all
All i want to know is does the import command overwrite existing data
TIA
Karthik
Re: Does import overwrite existing data ? [message #115554 is a reply to message #115548] Tue, 12 April 2005 11:15 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
NO.
It will try to append.
icon3.gif  No , If you are importing only data from Source To Destiny Table [message #116296 is a reply to message #115548] Tue, 19 April 2005 05:26 Go to previous messageGo to next message
Bhritul_10
Messages: 1
Registered: April 2005
Location: India
Junior Member

Hi, This is Bhritul here
Your Question is good enough.

Answer : Yes
If u are importing the whole D'base or user or table then your previous data will be lost for that d'base, user & table respectively

Answer : No
If u are importing the Data only from Source to Destination Table then it will just append the new data from source table & it will success only if the Source & destination table's data structure is same & constraints must not be violated..

Try by importing data only, you will get successful result.....
Re: No , If you are importing only data from Source To Destiny Table [message #116332 is a reply to message #116296] Tue, 19 April 2005 08:45 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Britul wrote:
>>Answer : Yes
>>If u are importing the whole D'base or user or table then your >>previous data will be lost for that d'base, user & table >>respectively

No. Wrong.
Import will append.
Please look into the session.
with Ignore=y exp will not complain about the pre-existing object.
If ignore=y is NOT specified, you import will fail stating the object already exists.

First export will export 56 rows.
Import will import those 56 rows.
Total count will be 112 rows.

bash-2.03$ exp mag/mag tables=(mytable) file=mag.dmp

Export: Release 9.2.0.4.0 - Production on Tue Apr 19 08:35:06 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses WE8ISO8859P1 character set (possible charset conversion)

About to export specified tables via Conventional Path ...
. . exporting table                        MYTABLE         56 rows exported
Export terminated successfully without warnings.
bash-2.03$ imp mag/mag file=mag.dmp full=y ignore=y

Import: Release 9.2.0.4.0 - Production on Tue Apr 19 08:35:35 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.


Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production

Export file created by EXPORT:V09.02.00 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses WE8ISO8859P1 character set (possible charset conversion)
. importing MAG's objects into MAG
. . importing table                      "MYTABLE"         56 rows imported
Import terminated successfully without warnings.
bash-2.03$ count mutation mag.mytable;

Table:mag.mytable

  COUNT(*)
----------
       112

Previous Topic: export dmp is of 3 files how to import?
Next Topic: Yet another backup from .dbf files gone wrong!
Goto Forum:
  


Current Time: Fri Apr 19 22:47:45 CDT 2024