Solved

ORACLE DATABASE IMP AND UPDATE

Posted on 2004-08-08
17
40,475 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
  • 10
  • 7
17 Comments
 
LVL 33

Expert Comment

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

Author Comment

by:onlyamir007
Comment Utility
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
Comment Utility
imp scott/tiger file=emp.dmp log=emp.log full=y rows=y ignore=y
0
 
LVL 33

Expert Comment

by:sajuks
Comment Utility
0
 
LVL 33

Expert Comment

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

Author Comment

by:onlyamir007
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 33

Expert Comment

by:sajuks
Comment Utility
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
Comment Utility
i  have 1 table space in that table space 2 users  
0
 
LVL 33

Expert Comment

by:sajuks
Comment Utility
does the same exist in the other database
0
 
LVL 4

Author Comment

by:onlyamir007
Comment Utility
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
Comment Utility
>> does the same exist in the other database

yes.....
0
 
LVL 33

Accepted Solution

by:
sajuks earned 100 total points
Comment Utility
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
Comment Utility
Glad you got it working.  Thanks for the points and grade
0
 
LVL 4

Author Comment

by:onlyamir007
Comment Utility
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
Comment Utility
if you want me to open new question so let me know i'll open ...

Amir
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Creating and Managing Databases with phpMyAdmin in cPanel.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now