标签:-- word sqlplus only user use size rop and
--1.以sys或者system用户身份登录数据库.
--2.创建dump文件导出路径(DUMP_DIR名称可替换),并在dba_directories中查看.
create directory dump_dir as 'D:/oradata/orcl/dmpfile';
select * from dba_directories;
--3.把导出路径与导出权限授权给eamprd,如果用system等高级帐号导出,则不用。
grant read,write on directory dump_dir to username;
grant exp_full_database to eamprd;
--4.退出sqlplus,在oracle系统用户下运行,导出对应的SCHEMA,推荐第二种。
expdp username/passpword@ip:port/sid directory=dump_dir dumpfile=filename.dmp
--导出重点参数:
--版本:高往低需加version=xx.x 导出某些张表tables=xxxx content=metadata_only(只要结构) content=data_only(只要数据)
--1.以sys或者system身份登陆测试库.
--2.建立导入表空间和临时表空间(名称、路径、表空间大小,请自行替换).
create tablespace tablespace_01 datafile 'D:/oradata/orcl/tablespace01.dbf' size 1024M autoextend on next 1024M maxsize 2048M;
create temporary tablespace tablespace_temp tempfile 'D:/oradata/orcl/tablespacetemp.dbf' size 512M;
create user username identified by password default tablespace tablespace_01 temporary tablespace tablespace_temp;
grant connect,resource,create view,create session,dba to username;
create directory dump_dir as 'D:/oradata/orcl/dmpfile';
grant read,write on directory dump_dir to gctest01;
--退出sqlplus,在oracle系统用户下运行
impdp username/password@pord directory=dump_dir dumpfile=filename.dmp logfile=filename.log remap_schema=fromschema:toschema remap_tablespace=fromtablespace:totablespace
alter user username identified by password;
drop user username cascade;
drop tablespace tablespacename including contents and datafiles;
select * from all_users;
select * from dba_data_files;
标签:-- word sqlplus only user use size rop and
原文地址:https://www.cnblogs.com/aqcc/p/12213147.html