Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set Oracle9i to automatic archiving mode

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to set Oracle9i to automatic archiving mode". In daily operation, I believe many people have doubts about how to set Oracle9i to automatic archiving mode. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to set Oracle9i to automatic archiving mode". Next, please follow the editor to study!

Query whether Oracle is run according to pfile or spfile

A) run sqlplus, execute show parameter pfile or show parameter spfile, and you can know which mode Oracle is running in by returning the result

Connections and differences between pfile and spfile in Oracle:

Pfile: for Oracle8i, can also be used in oracle9i, exists as text, and the parameters can be modified with the vi editor. The file format is initSID.ora

Spfile: for oracle9i, exists as binary text and cannot be modified with a vi editor. The file format is spfileSID.ora. If you want to modify the spfile file, you can use the alter system set statement to modify it.

two。 If Oracle runs as pfile, you need to perform the following steps

A) execute vi $ORACLE_HOME/dbs/initSID.ora and edit the initSID.ora file

B) search for * .log _ archive_dest and * .log _ archive_start attributes

These two attributes are used to set the directory of the archive log and to start in archive mode when Oracle starts. If these two attributes are not in the initSID.ora file, add the following; if so, modify it as follows

* .log_archive_dest=''/export/home/oracle/arch''

* .log_archive_start=true

It is best to choose a different directory other than the directory where Oracle applications and data files are stored, or even different hard drives, so that speed and security will be better.

If you need to set the log file format, you can also specify, such as

* .log_archive_format=''%t_%s_%r.dbf''

3. Save initSID.ora

4. Execute shutdown immediate to shut down the Oracle server

5. Execute startup mount to start the Oracle server

6. Execute alter database archivelog

7. If Oracle runs as spfile, you need to perform the following steps

A) set up the archive log directory

Alter system set LOG_ARCHIVE_DEST_1=''LOCATION=/export/home/oracle/arch''

B) set the archive mode to start

Alter system set log_archive_start=true scope=spfile

If you need to set the log file format, you can also specify, such as

Alter system set log_archive_format=''%t_%s_%r.dbf'' scope=spfile

8. Shutdown immediate shuts down the Oracle server again

9. Execute startup to start the Oracle server, automatically enter archive mode, and each subsequent startup will automatically run in archive mode.

At this point, the study on "how to set Oracle9i to automatic filing mode" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report