Oracl migrates the database 100%, does not lose tables and data, and recovers without error reminders
Must:
Use exp/imp command (plsql import does not work)
preparations
select 'alter table '||table_name||' allocate extent;' from user_tables;
SQL copy of query executed without losing tables
exp:
===========================@echo off echo ================================================ echo Automatic backup script of Oracle database under Windows environment echo 1. Name the backup file with the current date. echo ================================================ :: Set user name, password and database to back up. ::set USER= detection1::set PASSWORD= detection1::set DATABASE=orcl :: fetches the current time in the format "YMMDD." set year=%DATE:~0,4%rem get month set month=%DATE:~5,2%rem get data set date=%DATE:~8,2%rem get date set date =%year%%month%%date% :: Create backup catalog. if not exist "D:\YtForever\YTPQM\DB\backup\" mkdir D:\YtForever\YTPQM\DB\backup\ set DATADIR=D:\YtForever\YTPQM\DB\backup\ exp detection1/detection1@127.0.0.1/orcl file=%DATADIR%\detection1_%mydate%.dmpexp ytdetection1/ytdetection1@127.0.0.1/orcl file=%DATADIR%\ytdetection1_%mydate%.dmpexit
Both local and remote can be configured, save bat, double click to run
imp
imp wqs803/wqs803@127.0.0.1/orcl file=E:\wqs803_20190916.DMP full=y ignore=y;