Oracle RAC 执行闪回数据库操作
2013-01-23 18:00:57 来源:WEB开发网核心提示:Database dismounted. ORACLE instance shut down. SQL> startup mount ORACLE instance started. Total System Global Area 1269366784 bytes Fixed Size
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1269366784 bytes
Fixed Size 2227984 bytes
Variable Size 889192688 bytes
Database Buffers 369098752 bytes
Redo Buffers 8847360 bytes
Database mounted.
SQL> alter database open resetlogs;
Database altered.
SQL> !srvctl start instance -d zhongwc -i zhongwc2
SQL> col host_name format a20
SQL> set lines 300
SQL> select INSTANCE_NAME,HOST_NAME,VERSION,STARTUP_TIME,STATUS,ACTIVE_STATE,INSTANCE_ROLE,DATABASE_STATUS from gv$INSTANCE;
INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS ACTIVE_ST INSTANCE_ROLE DATABASE_STATUS
---------------- -------------------- ----------------- ----------------------- ------------ --------- ------------------ -----------------
zhongwc1 zhongwc1.oracle.com 11.2.0.3.0 23-JAN-2013 17:30:37 OPEN NORMAL PRIMARY_INSTANCE ACTIVE
zhongwc2 zhongwc2.oracle.com 11.2.0.3.0 23-JAN-2013 17:34:30 OPEN NORMAL PRIMARY_INSTANCE ACTIVE
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1269366784 bytes
Fixed Size 2227984 bytes
Variable Size 889192688 bytes
Database Buffers 369098752 bytes
Redo Buffers 8847360 bytes
Database mounted.
SQL> alter database open resetlogs;
Database altered.
SQL> !srvctl start instance -d zhongwc -i zhongwc2
SQL> col host_name format a20
SQL> set lines 300
SQL> select INSTANCE_NAME,HOST_NAME,VERSION,STARTUP_TIME,STATUS,ACTIVE_STATE,INSTANCE_ROLE,DATABASE_STATUS from gv$INSTANCE;
INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS ACTIVE_ST INSTANCE_ROLE DATABASE_STATUS
---------------- -------------------- ----------------- ----------------------- ------------ --------- ------------------ -----------------
zhongwc1 zhongwc1.oracle.com 11.2.0.3.0 23-JAN-2013 17:30:37 OPEN NORMAL PRIMARY_INSTANCE ACTIVE
zhongwc2 zhongwc2.oracle.com 11.2.0.3.0 23-JAN-2013 17:34:30 OPEN NORMAL PRIMARY_INSTANCE ACTIVE
也可以基于时间戳进行闪回数据库
SQL> select to_char(scn_to_timestamp(1395475),'yyyy-mm-dd hh24:mi:ss') time_stamp from dual;
TIME_STAMP
-------------------
2013-01-23 17:14:05
SQL> flashback database to timestamp to_timestamp('2013-01-23 17:14:05','yyyy-mm-dd hh24:mi:ss');
flashback database to timestamp to_timestamp('2013-01-23 17:14:05','yyyy-mm-dd hh24:mi:ss')
*
ERROR at line 1:
ORA-38757: Database must be mounted and not open to FLASHBACK.
- ››oracle 中 UPDATE nowait 的使用方法
- ››Oracle ORA-12560解决方法
- ››Oracle 10g RAC 常用维护命令
- ››Oracle如何在ASM中定位文件的分布
- ››Oracle的DBMS_RANDOM.STRING 的用法
- ››oracle 外部表导入时间日期类型数据,多字段导入
- ››Oracle中查找重复记录
- ››oracle修改用户登录密码
- ››Oracle创建删除用户、角色、表空间、导入导出等命...
- ››Oracle中登陆时报ORA-28000: the account is lock...
- ››Oracle数据库在配置文件中更改最大连接数
- ››Oracle中在pl/sql developer修改表的两种方式
更多精彩
赞助商链接