Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ORACLE DATABASE IMP AND UPDATE

Posted on 2004-08-08
17
Medium Priority
?
40,520 Views
Last Modified: 2011-08-18
Hi,
i have two oracle 9i servers one @ datacenter which is live 2nd  @ office for development I have already imported full database dump file @ office few weeks ago  but now  I want update whole database from new dump file how can I do that I mean I have all tables already created but what I need to 2  update all new data


OS             =       windows 2000 server
DB            =       Oracle 9i


amir
0
Comment
Question by:onlyamir007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 7
17 Comments
 
LVL 33

Expert Comment

by:sajuks
ID: 11750265
do an import with IGNORE=Y ROWS=Y to import the table data
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 11750331
thanks for your quick reply

can u give me full script i'm new in oracle what i was doing i was typing on command prompt “IMP” then it was giving 1by 1 options luckily it works
0
 
LVL 33

Expert Comment

by:sajuks
ID: 11750413
imp scott/tiger file=emp.dmp log=emp.log full=y rows=y ignore=y
0
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 33

Expert Comment

by:sajuks
ID: 11750449
imp scott/tiger file=emp.dmp log=emp.log rows=y ignore=y
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 11750475
i have 2 USERS i need to imp only one user  i used this script
imp user2/pass2 file=emp.dmp log=emp.log full=y rows=y ignore=y
but i'm getting this error i can not use sys user coz, I’m not sure may be it’ll import entire database I don’t want 2 do that I only need 1 user user .  


XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ERROR:-


Connected to: Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production

Export file created by EXPORT:V09.02.00 via conventional path

Warning: the objects were exported by SYSTEM, not by you

import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
export server uses UTF8 NCHAR character set (possible ncharset conversion)
. importing SYSTEM's objects into SYSTEM
IMP-00017: following statement failed with ORACLE error 1119:
 "CREATE UNDO TABLESPACE "UNDOTBS2" BLOCKSIZE 8192 DATAFILE  'X:\ORADATA\CSS"
 "R\UNDOTBS02.DBF' SIZE 209715200       AUTOEXTEND ON NEXT 5242880  MAXSIZE 3"
 "2767M EXTENT MANAGEMENT LOCAL "
IMP-00003: ORACLE error 1119 encountered
ORA-01119: error in creating database file 'X:\ORADATA\temp\UNDOTBS02.DBF'
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
IMP-00017: following statement failed with ORACLE error 1119:
 "CREATE TABLESPACE "OEM_REPOSITORY" BLOCKSIZE 8192 DATAFILE  'X:\ORADATA\ECS"
 "SR\OEM_REPOSITORY.DBF' SIZE 36708352       AUTOEXTEND ON NEXT 5242880  MAXS"
 "IZE 2000M EXTENT MANAGEMENT LOCAL  AUTOALLOCATE  ONLINE PERMANENT  NOLOGGIN"
 "G"
IMP-00003: ORACLE error 1119 encountered
ORA-01119: error in creating database file 'X:\ORADATA\temp\OEM_REPOSITORY.DBF'
ORA-27040: skgfrcre: create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
IMP-00017: following statement failed with ORACLE error 959:
 "CREATE USER "OEM" IDENTIFIED BY VALUES '0B2E387F122E5A05' DEFAULT TABLESPAC"
 "E "OEM_REPOSITORY" TEMPORARY TABLESPACE "TEMP""
IMP-00003: ORACLE error 959 encountered
ORA-00959: tablespace 'OEM_REPOSITORY' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT SELECT ANY TABLE TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT CREATE PROCEDURE TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT EXECUTE ANY PROCEDURE TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT CREATE TRIGGER TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT CREATE TYPE TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT EXECUTE ANY TYPE TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT SELECT ANY DICTIONARY TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT "CONNECT" TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1917:
 "GRANT "SELECT_CATALOG_ROLE" TO "OEM""
IMP-00003: ORACLE error 1917 encountered
ORA-01917: user or role 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1918:
 "ALTER USER "OEM" DEFAULT ROLE ALL"
IMP-00003: ORACLE error 1918 encountered
ORA-01918: user 'OEM' does not exist
IMP-00017: following statement failed with ORACLE error 1918:
 "ALTER USER "OEM" QUOTA UNLIMITED ON "TEMP" QUOTA UNLIMITED ON "OEM_REPOSITO"
 "RY""
IMP-00003: ORACLE error 1918 encountered
ORA-01918: user 'OEM' does not exist
. importing WMSYS's objects into WMSYS
. importing WKSYS's objects into WKSYS
. importing ODM's objects into ODM
. importing OLAPSYS's objects into OLAPSYS
. importing E_sys's objects into E_sys
. importing OEM's objects into OEM
 "ALTER SESSION SET CURRENT_SCHEMA= "OEM""
IMP-00003: ORACLE error 1435 encountered
ORA-01435: user does not exist
IMP-00000: Import terminated unsuccessfully
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
0
 
LVL 33

Expert Comment

by:sajuks
ID: 11750593
Have you created the user in the other database.
Have you created the table spaces.
Have a look at,
http://www.quest.com/schema_manager/.

0
 
LVL 33

Expert Comment

by:sajuks
ID: 11750625
If you need to import the tables from a specific schema, you'd use the following:
    IMP id/password FROMUSER(scott) TABLES=(emp,dept,salary)
    IMP id/password FROMUSER(adams) TABLES=(cust)

If you want to import just a given user's schema, you'd use:
    IMP id/password FROMUSER(scott)

0
 
LVL 33

Expert Comment

by:sajuks
ID: 11750645
http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch02.htm#33570

You might need to register ( free )  to aceess the documents.

Also, to get online help use the command
imp help=y
on the command line to invoke it.
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 11750670
i  have 1 table space in that table space 2 users  
0
 
LVL 33

Expert Comment

by:sajuks
ID: 11750676
does the same exist in the other database
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 11750702
Can u please describe this I don’t know where should I put dump file name and other  stuff I think this script can solve my prob.

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

If you need to import the tables from a specific schema, you'd use the following:
    IMP id/password FROMUSER(scott) TABLES=(emp,dept,salary)
    IMP id/password FROMUSER(adams) TABLES=(cust)

If you want to import just a given user's schema, you'd use:
    IMP id/password FROMUSER(scott)
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 11750728
>> does the same exist in the other database

yes.....
0
 
LVL 33

Accepted Solution

by:
sajuks earned 400 total points
ID: 11750770
imp sys/password file=filename.dmp ignore=y rows=n grants=y tables=tablename fromuser=schema touser=schema log=filename.log

eg
imp id/passwd  file=emp.dmp log=emp.log rows=y ignore=y FROMUSER(scott) TABLES=(emp,dept,salary) log=emp.log

0
 
LVL 33

Expert Comment

by:sajuks
ID: 11751379
Glad you got it working.  Thanks for the points and grade
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 11751689
I should thanks 2 u .

I need little assistance from u .
what I was doing I have 1 backup server and 1 live server.
I want live server should update some tables data 2 backup server
Daily bases so u tell me I’m doing fine ??
U can say I want synchronize live server 2 backup server  not full only 1 user.


Amir
0
 
LVL 4

Author Comment

by:onlyamir007
ID: 11759903
if you want me to open new question so let me know i'll open ...

Amir
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question