If there are duplicate options, the usual behavior is that the one occurring last in the command is used. If you want to override mount options from /etc/fstab, you have to use: mount device| dir -o optionsĪnd then the mount options from command line is appended to the list of options from /etc/fstab. The mount program does not read the /etc/fstab file if both device (or LABEL/ UUID) and dir are specified. If no arguments are given to mount, this list is printed. The programs mount and umount maintain a list of currently mounted filesystems in the file /etc/mtab. When mounting a filesystem mentioned in fstab or mtab, it suffices to give only the device, or only the mount point. Adding the -F option makes mount fork, so that the filesystems are mounted simultaneously. This command is often included in a boot script. The command mount -a Ĭauses all filesystems mentioned in fstab (of the proper type and/or having or not having the proper options) to be mounted as indicated, except for those whose line contains the noauto keyword. The file /etc/fstab may contain lines describing what devices are usually mounted where, using which options. The Files /etc/fstab, /etc/mtab And /proc/mounts The customary choice none is less fortunate: the error message " none busy" from umount can be confusing since something is indeed busy. The proc filesystem is not associated with a special device, and when mounting it, an arbitrary keyword such as proc can be used instead of a device specification. The string representation of the UUID should be based on lowercase characters. The UUIDs from command line or fstab are not converted to internal binary representation. Internally, mount command uses udev symlinks, so using symlinks in /etc/fstab has no advantage over " LABEL=/UUID=". The tags are more readable, robust and portable. ] device| dir mount device| dir umount syntax umount umount -a umount " udev symlinks in the /etc/fstab file. Otherwise, I use ARCHIVE LOG CURRENT to make sure everything is ready before doing anything important.Syntax mount mount -a mount. Which statement is better? Which one should I use? If I'm NOT in a RAC or data guard environment, I will use SWITCH LOGFILE because I don't want to wait. SQL> alter system archive log instance 'ORCLCDB2' current In this case, we switch the redo group of node 2. The syntax of ALTER SYSTEM also supports to switch only one instance. ARCHIVE LOG CURRENTīy default, it switches redo groups on all nodes (threads). SQL> alter system switch logfile Īs we can see, only redo groups of thread #1 is switched. SQL> select thread#, group#, status from v$log order by 1,2 įirst of all, we make a switch log file. SQL> select thread#, instance_name from v$instance Let's see all statuses of groups before switching. RAC Databaseįor a cluster database, statement SWITCH LOGFILE affects only the current instance whereas ARCHIVE LOG CURRENT makes redo log switch on all nodes (threads). In the middle of remote archiving, there could be a temporary archive gap. Also, the larger redo size, the longer it takes. This is because it's waiting for the completion of network transferring and archiving on the remote standby database. SQL> alter system archive log current Īs you can see, ARCHIVE LOG CURRENT takes almost 2 minutes for a 1GB redo logs to return. Data GuardĪ big difference can be seen in data guard environments, especially in 9i. Now the statuses of all groups are: SQL> select group#, status from v$log įor larger redo logs, you might see the difference. On the other side, ARCHIVE LOG CURRENT will wait for Archiver Process (ARCH) to complete the archiving and then return to user.įor small redo logs, both can return less than 1 second, although ARCHIVE LOG CURRENT takes a little longer. SWITCH LOGFILE is a no-wait statement, once it was issued by DBA, it'll return to the user and do the switching in the background. Log is no longer needed for instance recovery. Log is active but is not the current log. This implies that the redo log is active. SQL> select group#, status from v$log Īccording to the descriptions of V$LOG in 19c, the statuses of redo log mean:Ĭurrent redo log. Let's see an example before switching groups. In other words, they make the same result, but they behave differently. Both SWITCH LOGFILE and ARCHIVE LOG CURRENT force Log Writer process (LGWR) switch to the next redo log group and start to write, then archival follow.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |