一、创建表空间:
create tablespace BDCK(表空间名)
datafile \’D:\\backup\\SJK\\BDCK.dbf\’ size 50M
autoextend on next 30M maxsize unlimited logging
extent management local autoallocate
segment space management auto;
注释:BDCK(表空间名)
\’D:\\backup\\SJK\\BDCK.dbf\’ (表空间存放路径)
注意:路径可以是任意文件夹内,建议不要用中文命名文件夹。创建表空间前要确保路径在电脑中存在;
二、创建表用户:
CREATE USER BDCK IDENTIFIED BY password DEFAULT TABLESPACE BDCK TEMPORARY TABLESPACE TEMP PROFILE DEFAULT;
GRANT CONNECT TO BDCK;
GRANT DBA TO BDCK;
GRANT RESOURCE TO BDCK;
grant create any view to BDCK;
GRANT CREATE ANY TABLE TO BDCK;
GRANT SELECT ANY TABLE TO BDCK;
GRANT COMMENT ANY TABLE TO BDCK;
GRANT LOCK ANY TABLE TO BDCK;
GRANT SELECT ANY DICTIONARY TO BDCK;
三、数据导入
impdp user/password@ORACLE_SID schemas=user directory=DMPDIR(定义路径名) dumpfile=user.dmp