Microsoft Windows XP [version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C: \ Documents ents and Settings \ Administrator> Conn
Sys/system @ orcl;
'Conn' is neither an internal or external command nor a program that can be run.
Or batch files.
C: \ Documents ents and Settings \ Administrator> sqlplus/nolog
SQL * Plus: Release 11.1.0.6.0-production on Saturday June 30 23:57:18 2012
Copyright (c) 1982,200 7, Oracle. All rights reserved.
SQL> conn sys/system @ orcl;
Error:
ORA-01017: invalid username/password; logon denied
SQL> conn sys/xiexie @ orcl as sysdba;
Connected.
SQL> shutdow immediate
The database has been closed.
The database has been detached.
The Oracle routine has been disabled.
SQL> startup Mount;
The Oracle routine has been started.
Total system global area 535662592 bytes
Fixed size 1334380 bytes
Variable Size 230687636 bytes
Database buffers 297795584 bytes
Redo buffers 5844992 bytes
The database has been loaded.
SQL> alter database open
2;
The database has been changed.
SQL> archive log list
Database Log mode archiving Mode
Enable automatic archiving
Archiving end point use_db_recovery_file_dest
Earliest online log sequence 23
Next archive log sequence 25
Current Log sequence 25
SQL> show parameter db_recovery_file_dest;
Name type value
-----------------------------------------------------------------------------
Db_recovery_file_dest string D: \ app \ Administrator \ flash_rec
Overy_area
Db_recovery_file_dest_size big integer 2G
SQL> select sysdate from dual
2;
Sysdate
--------------
-12
SQL> alter session set nls_date_format = 'yyyy-mm-dd hh24: MI: ss ';
The session has been changed.
SQL> select sysdate from dual;
Sysdate
-------------------
2012-07-01 00:01:40
SQL> set time on;
00:02:12 SQL> show user;
User is "sys"
00:02:20 SQL> select * From test_1;
Name_test Tel
-----------------------------------------
Xie13907756220
Xie2 13907756220
Xie3 13907756220
Xie4 123
00:03:01 SQL> insert into test_1 values ('ie5', '123 ');
One row has been created.
00:03:29 SQL> commit;
Submitted.
00:04:34 SQL> select * From test_1;
Name_test Tel
-----------------------------------------
Xie13907756220
Xie2 13907756220
Xie3 13907756220
Xie4 123
Xie5 12345
00:04:40 SQL> shutdown immediate
The database has been closed.
The database has been detached.
The Oracle routine has been disabled.
00:05:33 SQL>;
1 * select * From test_1
00:05:33 SQL> startup Mount;
The Oracle routine has been started.
Total system global area 535662592 bytes
Fixed size 1334380 bytes
Variable Size 230687636 bytes
Database buffers 297795584 bytes
Redo buffers 5844992 bytes
The database has been loaded.
00:06:25 SQL> flashback database to timestamp (to_date ('2017-07-01 00:02:20 ', 'yyy
Y-mm-dd hh24: MI: ss '));
Flashback database to timestamp (to_date ('2017-07-01 00:02:20 ', 'yyyy-mm-dd hh24: m
I: ss '))
*
Row 3 has an error:
ORA-38726: Flash back database event logging is not enabled.
00:09:05 SQL> alter database flashback on;
The database has been changed.
00:10:20 SQL> archive log list;
Database Log mode archiving Mode
Enable automatic archiving
Archiving end point use_db_recovery_file_dest
Earliest online log sequence 23
Next archive log sequence 25
Current Log sequence 25
00:10:26 SQL> select * From test_1;
Select * From test_1
*
Row 3 has an error:
ORA-01219: Database not open: Allow queries only in fixed tables/Views
00:10:37 SQL> alter database open;
The database has been changed.
00:11:33 SQL> select * From test_1;
Name_test Tel
-----------------------------------------
Xie13907756220
Xie2 13907756220
Xie3 13907756220
Xie4 123
Xie5 12345
00:12:08 SQL> commit;
Submitted.
00:12:17 SQL> insert into test_1 values ('ie6', '123 ');
One row has been created.
00:12:39 SQL> shutdown immediate;
ORA-01097: unable to close during transaction processing-submit or roll back first
00:12:55 SQL> commit;
Submitted.
00:13:04 SQL> shutdown immediate;
The database has been closed.
The database has been detached.
The Oracle routine has been disabled.
00:13:21 SQL> startup Mount;
The Oracle routine has been started.
Total system global area 535662592 bytes
Fixed size 1334380 bytes
Variable Size 230687636 bytes
Database buffers 297795584 bytes
Redo buffers 5844992 bytes
The database has been loaded.
00:13:45 SQL> flashback database to timestamp (to_date ('2017-07-01 00:02:20 ', 'yyy
Y-mm-dd hh24: MI: ss '));
Flashback database to timestamp (to_date ('2017-07-01 00:02:20 ', 'yyyy-mm-dd hh24: m
I: ss '))
*
Row 3 has an error:
ORA-38729: the flashback execution flash back database log data is insufficient.
00:15:03 SQL> select * From test_1;
Select * From test_1
*
Row 3 has an error:
ORA-01219: Database not open: Allow queries only in fixed tables/Views
00:15:38 SQL> alter database open;
The database has been changed.
00:16:25 SQL> select * From test_1;
Name_test Tel
-----------------------------------------
Xie13907756220
Xie2 13907756220
Xie3 13907756220
Xie4 123
Xie5 12345
Xie6 123
You have selected 6 rows.
00:16:30 SQL> shutdown immediate;
The database has been closed.
The database has been detached.
The Oracle routine has been disabled.
00:16:58 SQL> startup Mount;
The Oracle routine has been started.
Total system global area 535662592 bytes
Fixed size 1334380 bytes
Variable Size 230687636 bytes
Database buffers 297795584 bytes
Redo buffers 5844992 bytes
The database has been loaded.
00:17:25 SQL> flashback database to timestamp (to_date ('2017-07-01 00:11:33 ', 'yyy
Y-mm-dd hh24: MI: ss '));
Flash back complete.
00:17:53 SQL> alter database open;
Alter database open
*
Row 3 has an error:
ORA-01589: to open the database, you must use the resetlogs or noresetlogs Option
At 00:18:06 SQL> alter database open resetlogs;
The database has been changed.
00:19:22 SQL> select * From test_1;
Name_test Tel
-----------------------------------------
Xie13907756220
Xie2 13907756220
Xie3 13907756220
Xie4 123
Xie5 12345
00:19:42 SQL>