因为system用户的密码不知道,考虑到可能其他DBA或者应用可能会使用到这个用户,就没有修改i密码,而是创建备份全库的用户
CREATE USER backup IDENTIFIED BY back123
default tablespace xxxxxxx
;
--给新用户授权
GRANT CONNECT,RESOURCE TO backup;
grant exp_full_database,imp_full_database to backup;
grant flashback any table to backup;
grant select any table to backup;
--给directory的使用权限
grant read,write on directory DATA_PUMP to backup;
执行以下命令,备份成功
expdp backup/back123@mam directory=DATA_PUMP dumpfile=swi_`date +%Y%m%d_%H%M%S`.dmp logfile=swi_`date +%Y%m%d_%H%M%S`.log schemas=username1,username2,username3