02.Oracle/DataBase2008. 12. 22. 09:38
반응형

오라클 9i 임포트 가이드

2008.7.1 고진우 mr.big


*설명
익스포트한 덤프파일이 있는경우 새로 셋팅된 오라클디비에 임포트로 데이터를 밀어넣는 작업
새로 설치한 오라클디비명은 익스포트한 디비명과 동일하게 설치해야 함

*순서
1.오라클설치
2.리스너가동
3.sys계정으로 오라클 로그인
4.오라클인스턴스시작
5.테이블스페이스 생성
6.유저 생성
7.유저 권한부여
8.임포트

*정의
TESTUSER = 유저명
TESTUSER_TS = 테이블스페이스명
TESTUSER01.dbf = 테이블스페이스 실제 파일명

-------------------------------------------

1.오라클 설치 - 생략

2.리스너 가동
/home/oracle/9i/bin/lsnrctl start

3.sys계정으로 오라클 로그인
4.오라클인스턴스시작
[oracle@localhost ~]$su - oracle
[oracle@localhost ~]$sqlplus '/as sysdba'
SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jul 1 15:53:04 2008
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
SQL>startup;


5.테이블스페이스 생성
CREATE TABLESPACE TESTUSER_TS
DATAFILE '/home/oracle/oradata/MEDICAL/TESTUSER01.dbf' SIZE 100M
AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED;

6.유저 생성
CREATE USER TESTUSER
IDENTIFIED BY "패스워드"
DEFAULT TABLESPACE "TESTUSER_TS"
temporary tablespace temp;

7.유저 권한부여
GRANT CREATE SESSION TO TESTUSER;
GRANT CREATE TABLE TO TESTUSER;
GRANT CREATE ANY INDEX TO TESTUSER;
GRANT CREATE TABLESPACE TO TESTUSER;
GRANT CREATE SEQUENCE TO TESTUSER;
GRANT CREATE VIEW,RESOURCE TO TESTUSER;


*참고 - 재작업시 유저삭제
//DROP USER TESTUSER CASCADE;


8.임포트
대화형 임포트로 작업
[oracle@localhost ~]$ imp
 
Import: Release 9.2.0.4.0 - Production on Tue Jul 1 15:15:22 2008
 
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
 
Username: TESTUSER
Password: 패스워드
 
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production
 
Import file: expdat.dmp > /home/oracle/export파일명.dmp
 
Enter insert buffer size (minimum is 8192) 30720>
 
Export file created by EXPORT:V09.02.00 via conventional path
import done in KO16KSC5601 character set and AL16UTF16 NCHAR character set
import server uses WE8ISO8859P1 character set (possible charset conversion)
List contents of import file only (yes/no): no >
 
Ignore create error due to object existence (yes/no): no > yes
 
Import grants (yes/no): yes >
 
Import table data (yes/no): yes >
 
Import entire export file (yes/no): no >
Username: TESTUSER
 
Enter table(T) or partition(T:P) names. Null list means all tables for user
Enter table(T) or partition(T:P) name or . if done:
 
. importing TESTUSER's objects into TESTUSER
. . importing table                    "CATEGORY"        11 rows imported
. . importing table                      "MAPPING"        83 rows imported
. . importing table                        "BOARD"      1739 rows imported
. . importing table                "SPECIAL_LIST"        278 rows imported
. . importing table                  "TEST_TABLE"          0 rows imported
Import terminated successfully without warnings.

임포트를 완료하였습니다


-------------------

자세한 임포트문서가 없기에 몇번삽질후 문서로 만들어 봤습니다~
삽질하지 마시고 한방에 성공하시길 염원합니다 ^^



출처 : http://phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=61927&page=1


이건 먹는건가...

Posted by 1010