跳至主要内容

Oracle学习笔记20080107

链接RMAN的种类
Target database
Recovery catalog database
Auxiliary database(后备数据库)
- Standby database
- Duplicate database
- TSPITR instance

进入本地rman
UNIX: $ ORACLE_SID=DB01; export ORACLE_SID
$ rman target / as sysdba
Windows NT:C:\> set ORACLE_SID=DB01
C:\> rman target / as sysdba

远程控制
rman target sys/target_pwd@DB01

写到RMAN输出到某个log file
$ rman target sys/oracle log $HOME/ORADATA/u03/rman.log append

Executing a command file when RMAN is invoked:执行一段命令文件当rman被请求
$ rman target sys/oracle log $HOME/ORADATA/u03/rman.log append
@'$HOME/STUDENT/LABS/my_rman_script.rcv'

恢复管理模式
Interactive mode(作用模式)
-Use it when doing analysis
-Minimize regular usage
-Avoid using with log optionBatch mode(组模式)
-Meant for automated jobs-Minimize operator errors
-Set the log file to obtain information

RMAN命令
RMAN命令有几种:独立(不用run),事件(必须用run),独立或事件.

RMAN管理文件设置
rman在安装好后用默认的修改设置
用configure命令可以:
-Configure automatic channels
-Specify the backup retention policy
-Specify the number of backup copies to be created
-Limit the size of backup sets
-Exempt a tablespace from backup
-Enable and disable backup optimization

设置自动通道:
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/db01/BACKUP/%U';恢复什么的天数。。
RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 days;过多的天数RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;

评论

此博客中的热门博文

4 steps to delete account in Gerrit DB

4 steps to delete account in DB. Delete from accounts where preferred_email=’’; delete from account_ssh_keys where account_id=''; delete from account_external_ids where external_id='gerrit:*’; delete from account_external_ids where external_id='username:*’; whatever it was in H2 database and postgres db . H2: ssh -p 24198 localhost gerrit gsql Postgres: psql

Python学习笔记20100117

映射list   Dictionary 是用{}. list 是一那个[]. turple是用() 当你定义过dictionary后,你可以使用d.keys(), d.values(),d.items()将定义后的时候分别显示出来 当然可以将list里的值加减乘除,也可以如一般的定义直接重新复制这个list. 链接与分割字符串的 li=";", join(li) 则显示的就是 分隔符为;的数 如果使用li=li.split(";")则将刚刚;的分隔符删除,而split里也可定义域,如li.split(";",1)   自省 <---这是啥 之前在使用的时候发觉有些书本上的模块不能调用,很多是py脚本定义过的函数。 下载该脚本s,然后上传至指定位置。 >>>import sys >>>sys.path >>>sys.path.append("绝对位置")然后就能调用这些脚本和参数了。 删除 >>>sys.path.pop() 定义一个参数是 def info(test, test1=10.test2=12): info是函数名,test是必备参数,因为没有定义值,test1和test2是可选参数,定义了初始值   以上是外部函数的调用,下面转到内部函数 内部函数有type,str,dir及其他   ---type 返回任意字符的类型,模块也可以。types模块 >>> type(1) <type 'int'> >>> li=[] >>> type(li) <type 'list'> >>> import odbchelper >>> type(odbchelper) <type 'module'> >>> type(sys) <type 'module'> >>> import types ...