–管理员方式登录,新建表空间和用户,并建立文件夹映射路径并授权
``
CREATE DIRECTORY directory_name AS ‘path_to_directory’;
grant read,write on directory directory to backup
**
—EXPDP多线程备份数据库脚本–dblink–可以修改为命令行
@echo offset curdate=%date:~0,4%%date:~5,2%%date:~8,2%expdp backup/backup directory=jndx schemas=ccense dumpfile=%curdate%jndx%%U.dmp logfile=%curdate%jndx.log network_link='jndx_public_dblink' compression=ALL parallel=8forfiles /p "D:\backup" /s /m *.dmp /d -4 /c "cmd /c del @file"echo 删除2天前的备份记录forfiles /p "D:\backup" /s /m *.dmp /d -4 /c "cmd /c del @path"forfiles /p "D:\backup" /s /m *.log /d -4 /c "cmd /c del @path"exit
–IMPDP-多文件还原数据库 impdp可以导入多个数据文件
impdp backup/backup directory=jiangnan schemas=ccense dumpfile=20231008jndx%U.dmp logfile=impdpjndx.log