Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracl migrates the database 100%, does not lose tables and data, and recovers without error reminders

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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;

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report