http://kythuatlaptrinh.com/noi-dung/restore-to-the-points-trong-oracle-10g.html
Bổ sung:
sau khi restore lại database tại 1 restore point nào đó, thì để open lại database cần ở chế độ RESETLOGS hoặc NORESETLOGS:
SQL> alter database open resetlogs;
SQL> alter database open resetlogs;
iNothing appears to change, but you are now in insert mode and can begin typing text. In general, vi's commands do not display on the screen and do not require the Return key to be pressed.
Key Cursor Movement --- ---------------
h left one space j down one line k up one line l right one spaceWhen you have gone as far as possible in one direction, the cursor stops moving and you hear a beep. For example, you cannot use l to move right and wrap around to the next line, you must use j to move down a line. See the section entitled "Moving Around in a File" for ways to move more quickly through a file.
xThe character under the cursor disappears. To remove four characters (the one under the cursor and the next three) type
4xTo delete the character before the cursor, type
X (uppercase)
dwThis command deletes the word and the space following it.
3dw
ddThe cursor does not have to be at the beginning of the line. Typing dd deletes the entire line containing the cursor and places the cursor at the start of the next line. To delete two lines, type
2ddTo delete from the cursor position to the end of the line, type
D (uppercase)
cwThe last letter of the word to be replaced will turn into a $. You are now in insert mode and may type the replacement. The new text does not need to be the same length as the original. Press <Esc> to get back to command mode. To replace three words, type
3cw
o (lowercase)To insert a blank line above the current line, type
O (uppercase)
uTo undo all the edits on a single line, type
U (uppercase)Undoing all edits on a single line only works as long as the cursor stays on that line. Once you move the cursor off a line, you cannot use U to restore the line.
Key Movement --- --------
w forward word by word b backward word by word $ to end of line 0 (zero) to beginning of line H to top line of screen M to middle line of screen L to last line of screen G to last line of file 1G to first line of file <Control>f scroll forward one screen <Control>b scroll backward one screen <Control>d scroll down one-half screen <Control>u scroll up one-half screen
nTo repeat the search in a backward direction, type
N
ZZThe vi editor editor is built on an earler Unix text editor called ex. ex commands can be used within vi. ex commands begin with a : (colon) and end with a <Return>. The command is displayed on the status line as you type. Some ex commands are useful when saving and closing files.
vi filename edit a file named "filename" vi newfile create a new file named "newfile"ENTERING TEXT
i insert text left of cursor a append text right of cursorMOVING THE CURSOR
h left one space j down one line k up one line l right one spaceBASIC EDITING
x delete character nx delete n characters X delete character before cursor dw delete word ndw delete n words dd delete line ndd delete n lines D delete characters from cursor to end of line r replace character under cursor cw replace a word ncw replace n words C change text from cursor to end of line o insert blank line below cursor (ready for insertion) O insert blank line above cursor (ready for insertion) J join succeeding line to current cursor line nJ join n succeeding lines to current cursor line u undo last change U restore current lineMOVING AROUND IN A FILE
w forward word by word b backward word by word $ to end of line 0 (zero) to beginning of line H to top line of screen M to middle line of screen L to last line of screen G to last line of file 1G to first line of file <Control>f scroll forward one screen <Control>b scroll backward one screen <Control>d scroll down one-half screen <Control>u scroll up one-half screen n repeat last search in same direction N repeat last search in opposite directionCLOSING AND SAVING A FILE
ZZ save file and then quit :w save file :q! discard changes and quit file
emctl status dbconsoleChú ý, để sử dụng những câu lệnh này, cần set biến môi trường, ở ví dụ của mình là "orcl"
emctl start dbconsole
emctl stop dbconsole
SQL> startupStart instance và database ở chế độ NOMOUNT
SQL> startup nomountLệnh mount database từ trạng thái NOMOUNT
SQL> alter database mount;Lệnh open database từ trạng thái MOUNT
SQL> alter database open;
Quá trình shutdown ở các chế độ: NORMAL, TRANSACTIONAL, IMMEDIATE |
Quá trình shutdown ABORT |