Using system users to log in to Oracle's Sqlplus
" system/oracle " as Sysdba
First check if Oracle has turned on Archive logging
log list;
If the following error is displayed, the proof is not turned on
ORA-01031Privileges
Users can use the following command to see if Oracle has turned on auto-archive mode
Select from v$database;
Log_mode display noarchivelog means no open
To start Archive logging, you need to stop the database and execute the following command
shutdown Immediate;
The database is then booted to the Mount State
Startup Mount
Change archive mode to start automatic log archive
ALTER DATABASE ARCHIVELOG;
The following blog about the status of Oracle start and stop database is very clear, you can refer to
http://blog.csdn.net/lutinghuan/article/details/7484062
This is used if the user wants to know if the log archive is really turned on, and to see what path the archive log is stored in, you can do it again
Log List
For example, the author machine is the display
Database Logmode Archive modeautomatic archival enabledarchive destination/Home/Oracle/App/Oracle/Product/11.2.0/Dbhome_1/Dbs/archoldest OnlineLogSequenceWuyiNext LogSequence toArchive - Current LogSequence -
If the user wants to modify the storage path of the archive log, the following command can be executed
Alter set log_archive_dest=' user desired path, but requires Oracle program to read and write '
Once modified, you re-open Oracle's database
Alter Database Open
In the shell, users need to create a log archive directory first, such as an author's archive Directory of/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/arch, which needs to be pre-created
mkdir -p/home/oracle/app/oracle/product/11.2. 0/dbhome_1/dbs/arch
Test Archive
alter system switch logfile
The user can then see the new archive log in the/home/oracle/app/oracle/product/11.2.0/dbhome_1/dbs/arch directory.
The user can also use the SQL command to view the archive, but the author does not look at the output
Select * from V$archived_log
Here, the method of how Oracle turns on automatic log archiving is complete.
Reference blog:
http://blog.csdn.net/warren_zqw/article/details/52894586
http://guojuanjun.blog.51cto.com/277646/295454/
Oracle Goldengate docking Oracle 11g and Kafka