Noarchivelog mode:U confirm log working mode: First method: Query v $ databasesql> select log_mode from V $ database; LOG_MODE------------ARCHIVELOG indicates that the current database is running under the archive log, that is, the database works in the archive log mode. Method 2: Execute the command archive log list; SQL> archive log list
| Archive mode, but the automatic archiving process is not enabled currently! |
Database Log mode archiving Mode
Enable automatic archiving end point D: /Oracle/ora92/rdbms earliest Summary log sequence 214 next archive log sequence 214 current log sequence 216 U modify log working mode 1. Step 1 from noarchivelog mode to archivelog mode: shut down Database SQL> shutdown immediate; the database is closed. The database has been detached. The Oracle routine has been disabled. Step 2: Start the database to the Mount status SQL> startup Mount; the Oracle routine has been started. Total system global area 135338868 bytesfixed size 453492 bytesvariable size 109051904 bytesdatabase buffers 25165824 bytesredo buffers 667648 bytes database loaded. Step 3: Execute the command alter database archivelog; Modify SQL> alter database archivelog; the database has been changed. Step 4: confirm the result SQL> archive log list; Enable archive end point D in Database Log mode archive mode: /Oracle/ora92/rdbms earliest Summary log sequence 183 next archive log sequence 185 current log sequence 185 the database is already running in archive log mode. Step 5: Open the database and change the database to the open state SQL> alter database open; the database has been changed. 2. Steps 1 from archivelog mode to noarchivelog mode: Shut down Database SQL> shutdown immediate; the database has been closed. The database has been detached. The Oracle routine has been disabled. Step 2: Start the database to the Mount status SQL> startup Mount; the Oracle routine has been started. Total system global area 135338868 bytesfixed size 453492 bytesvariable size 109051904 bytesdatabase buffers 25165824 bytesredo buffers 667648 bytes database loaded. Step 3: Execute the command alter database noarchivelog; Modify SQL> alter database noarchivelog; the database has been changed. Step 4: confirm the execution result SQL> select log_mode from V $ database; LOG_MODE------------NOARCHIVELOG we see the database changed to working in non-archive mode again. Step 5: Open the database and change the database to the open state SQL> alter database open; the database has been changed. U modify the automatic archiving mode. We can see that the automatic archiving process is not enabled even though the database is running in archive mode. in this state, you need to manually execute the archiving command to generate the archived logs, how can I enable automatic database archiving? There are two ways to achieve this: first, load the database to the Mount state, and then run the command: Alter system archive log start; SQL> alter system archive log start; the system has changed. View results: SQL> archive log list; Enable archive end point for automatic archiving in Database Log mode. D: /Oracle/ora92/rdbms earliest Summary log sequence 183 next archive log sequence 185 current log sequence 185
Disadvantages of this method: changes are not persistent. If you restart the database, the changes made to the database are invalid.Method 2: Implement Persistent modification by modifying the pfile file: add it to the pfile file: init. ora.
Log_archive_start = true
Then, use the pfile file to load the database SQL> startup pfile = 'd:/Oracle/admin/Libn/pfile/init. ora 'mount; the Oracle routine has been started. Total system global area 135338868 bytesfixed size 453492 bytes
Variable Size 109051904 bytesDatabase buffers 25165824 bytesredo buffers 667648 bytes database load is complete.
Check that the database is running in the automatic archiving mode.
How does one create a spfile file from a pfile file?
SQL> Create spfile = 'd:/Oracle/ora92/database/spfilelibn. ora 'from pfile = 'd:/Oracle/admin/Libn/pfile/
Init. ora ';
The file has been created.
Oracle9i starts the database through the spfile file by default.
How can I check whether a spfile exists?
View directory: D:/Oracle/ora92/database/
Find the spfilesid. ora file. Where: Sid is the SID of your database
View Details of pfile, spfile, archive log, and other files through ParametersSQL> show parameter pfile; Name type value -------------------------------------- spfile string % ORACLE_HOME %/database/spfile % oracle_sid %. orasql> show parameter spfile; Name type value -------------------------------------- ------------------------------------ spfile string % ORACLE_HOME %/database/spfile % oracle_sid %. orasql> show parameter logfile; SQL> show parameter archive log; name type value =----------- specify archive_lag_target integer 0log_archive_dest when there are too many variable string name type value =----------- choose log_archive_dest_9 variable string variable optional string inclustring enable name type value -------------------------------------- log_archive_duplex_dest stringlog_archive_format string arc % s. % tlog_archive_max_processes integer 1_integer 1log_archive_start Boolean truelog_archive_trace integer 0remote_archive_enable string truestandby_archive_dest string % ORACLE_HOME %/rdbms
SQL>
How does one modify the password file of a sys user?To modify the password file in Oracle, run the orapwd command at the command prompt of the operating system. C:/> orapwdusage: orapwd file = <fname> Password = <password> entries = <users> where file-name of password file (MAND ), password-password for sys (MAND), entries-Maximum number of distinct dBA and opers (OPT), there are no spaces around the equal-To (=) character. c:/> orapwd file = C:/pwdlibn. ora Password = sysadmin1 entries = 5; orapwd file = C:/pwdlibn. ora Password = sysadmin1 entries = 5; generate a new pwdlibn. ora Password Copy it to the D:/Oracle/ora92/database/directory and replace the original file. U archive parameter init. the ora file can contain different parameters to specify the number of copies of the archived redo log file, the location where these copies are stored, or even the file name format of the archive file. In addition, you can specify how many archiving processes are used to create an archived file. The target parameter log_archive_destlog_archive_duplex_dest only needs to type the parameter in the init. ora file, followed by the expected archiving location. Log_archive_start = truelog_archive_dest = D:/Oracle/ora92/rdbmslog_archive_duplex_dest = D:/Oracle/ora92/rdbms
The log_archive_dest_nlog_archive_dest_n parameter (N is a specified location in the range of 1-10) allows a maximum of 10 locations to store archived files. In addition, one location can be located on a different computer, such as the remote location of a file server or backup computer site, for use in the event of natural disasters or human accidents in the main computer center.Note: These two sets of parameters cannot be used at the same time. U file name parameter log_archive_format file name Option
| Item |
Description |
| % S |
Including the log serial number as part of the file name |
| % S |
Include the log serial number and fill the left side with 0 as part of the file name |
| % T |
Including the thread number as part of the file name |
| % T |
Contains the thread number and fills the left side with 0 as part of the file name |
General style:Arc % S. % t