In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Writing backup script A backup mechanism implemented by operating system commands: cp and scp1.1 query the location of all files (data files, control files, parameter files, redo log files, password files) SYS@orcl11g > select name from v$datafile 2 union 3 select name from v$controlfile 4 union 5 select member from v$logfile 1.2 path to create backup SYS@orcl11g > host mkdir / u01/app/backup 1.3 build copy script SYS@orcl11g > set trim on by select statement intercept unnecessary spaces SYS@orcl11g > set trims on each line space SYS@orcl11g > set heading off remove the title SYS@orcl11g > set echo off Remove feedback SYS@orcl11g > set feedback off remove Echo SYS@orcl11g > set term off close Terminal Information SYS@orcl11g > spool / home/oracle/cp.sql SYS@orcl11g > select'cp'| | name |'/ u01Backup 'from v$datafile Union select'cp'| | name |'/ u01aphorb backup 'from v$controlfile union select' cp'| | member | |'/ u01aphorb backup' from v$logfile + + SYS@orcl11g > select'cp'| | name |'/ u01Lachap 'from v$datafile' -- only backup data files + cp / u01/app/oracle/fast_recovery_area/orcl11g/control02.ctl / home/backup cp / u01/app/oracle/oradata/orcl11g/control01.ctl / home/backup cp / u01/app/oracle/oradata/orcl11g/example01.dbf / home/backup cp / u01/app/oracle/oradata/orcl11g/redo01.log / home/backup cp / U01/app/oracle/oradata/orcl11g/redo02.log / home/backup cp / u01/app/oracle/oradata/orcl11g/redo03.log / home/backup cp / u01/app/oracle/oradata/orcl11g/sysaux01.dbf / home/backup cp / u01/app/oracle/oradata/orcl11g/system01.dbf / home/backup cp / u01/app/oracle/oradata/orcl11g/undotbs01.dbf / home/backup cp / u01/app/oracle/oradata/orcl11g/ Users01.dbf / home/backup [oracle@db253 ~] $spool off [oracle@db253 ~] $vi cp.sql [oracle@db253 ~] $cat cp.sql cp / u01/app/oracle/fast_recovery_area/orcl11g/control02.ctl / home/backup cp / u01/app/oracle/oradata/orcl11g/control01.ctl / home/backup cp / u01/app/oracle/oradata/orcl11g/example01.dbf / home/ Backup cp / u01/app/oracle/oradata/orcl11g/redo01.log / home/backup cp / u01/app/oracle/oradata/orcl11g/redo02.log / home/backup cp / u01/app/oracle/oradata/orcl11g/redo03.log / home/backup cp / u01/app/oracle/oradata/orcl11g/sysaux01.dbf / home/backup cp / u01/app/oracle/oradata/orcl11g/system01.dbf / home/backup cp / u01/app/ Oracle/oradata/orcl11g/undotbs01.dbf / home/backup cp / u01/app/oracle/oradata/orcl11g/users01.dbf / home/backup [oracle@db253 ~] $chmod + x cp.sqlawk build command: ls-lSr / test | awk'{print "mv" $NF "/ tmp/test/t" NR ".conf"}'| bash2. Stop the database sql > shutdown immediate;3. Copy the data file [oracle@db253 ~] $/ home/oracle/cp.sql-- execute script 4. Open database sql > startup
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.