테이블 스페이스 만들기
CREATE TABLESPACE PMS
DATAFILE 'C:\oracle\oradata\orcl\pms.dbf' SIZE 50M
DEFAULT STORAGE (INITIAL 512K NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0);
DATAFILE 'C:\oracle\oradata\orcl\pms.dbf' SIZE 50M
DEFAULT STORAGE (INITIAL 512K NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0);
유저생성
create user pms identified by pms123
default tablespace pms;
grant connect, resource to pms;
default tablespace pms;
grant connect, resource to pms;
export
exp userid=system/manager@nice file='D:\backup\exp.dmp'
exp userid=system/manager@nonghyup file='D:\backup\nong.dmp'
exp userid=system/manager@nonghyup file='D:\backup\nong.dmp'
import
imp userid=system/dhfkdhfk file='D:\backup\projects\pdms\nong.dmp' fromuser=pms touser=pms
Copy 명령어를 이용한 복사 (SQL Plus 상에서만 지원됨)
COPY FROM pms/pms123@nonghyup insert TB_LO_SERVER_RESOURCE USING select * FROM TB_LO_SERVER_RESOURCE;
오라클 빨리 죽이기
sys 계정으로 로그인
su - oracle
sqlplus /nolog
conn sys/manager as sysdba
sqlplus /nolog
conn sys/manager as sysdba
backup.bat
- @echo off
- SET TNSNAME=mytns
- SET ID=scott
- SET PASSWORD=tiger
- SET DATE1=%date:~0,4%%date:~5,2%%date:~8,2%
- SET TIME1=%time:~0,2%%time:~3,2%%time:~6,2%
- SET backup_filename=%TNSNAME%-%DATE1%%TIME1%.dmp
- echo %backup_filename%
- exp userid=%TNSNAME%/%ID%@%PASSWORD% file='D:\backup\kddms\%backup_filename%'
댓글 없음:
댓글 쓰기