监听程序配制及数据备份

13.监听程序
lsnrctl status   --查看LINSTER 状态
lsnrctl start
lsnrctl stop

lsnrctl start listener1
 
1。逻辑备份
>EXP scott/ILOVESMB@ora
EXP tt/tt11
2。逻辑恢复
IMP tt/tt11
3。物理备份
冷/热备份
冷备份:脱机备份 --关闭数据库服务,拷贝文件。
shutdown immediate
热备份:联机备份 -- archive log list 归档模式
alter system set log_archive_start=true scope=spfile
shutdown immediate
startup mount
alter database archivelog
alter database open;
archive log list;

alter tablespace tt begin backup;
alter tablespace tt end backup;

alter system archive log current;
alter system switch logfile;
alter system switch logfile;
shutdown immediate;

startup
select * from v$recover_file;

alter database datafile 6 offline drop;
alter database open;

--after copy file back to the file folder
recover datafile 6;
auto;
alter database datafile 6 online;

--备份控件文件
alter database backup controlfile to trace;
shutdowm immediate
@c:\create_ctl.txt

--日志文件丢失解决办法
recover database until cancel
alter database open resetlogs

原文地址:https://www.cnblogs.com/s021368/p/1472798.html