DB Management tools Flashcards
Q: What is an “abort” shutdown in Oracle?
An “abort” shutdown, also known as a “fast” or “immediate” shutdown, is a method of shutting down an Oracle database that disconnects all connected users and terminates all background processes immediately, regardless of any active transactions.
When should I use an “abort” shutdown?
An “abort” shutdown should be used in emergency situations when the database needs to be shut down immediately and there is no time for a “normal” or “transactional” shutdown. This can be used when there is a database corruption or when the database is stuck in a hung state and normal shutdown is not possible.
what is SHUTDOWN NORMAL
A “normal” shutdown is a way to turn off an Oracle Database. It makes sure all the work is done before turning off, just like you finish your work before going to bed. It is a safe way to stop the database.
What does Shutdown TRANSACTIONAL do
A “transactional” shutdown is a way to turn off an Oracle Database in a way that allows to finish any ongoing transaction before shutdown, it means that it will wait for all ongoing transactions to complete or rollback before shutting down the database. It’s a safe way to stop the database, but it may take longer than other methods
What is a immediate shutdown
A “immediate” shutdown is a way to turn off an Oracle Database quickly, without waiting for any ongoing transactions to complete. It’s like turning off the lights and leaving the house quickly, without waiting for everyone to be done with what they’re doing. It’s a fast way to stop the database, but it may cause some unsaved changes to be lost.
What is the difference between Shutdown IMMEDIATE and Shutdown ABORT
The difference between “immediate” and “abort” shutdown is that “immediate” shutdown will wait for all active transactions to rollback before shutting down the database, while “abort” shutdown will terminate all background processes and disconnect all connected users immediately, regardless of any active transactions. Both options will cause any unsaved changes to be lost, but “abort” shutdown may cause more data corruption if the shutdown process is not handled properly.
What is the difference between Shutdown IMMEDIATE and Shutdown TRANSACTIONAL
-“Immediate” shutdown will terminate all background processes and disconnect all connected users without waiting for any active transactions to complete or rollback.
-“Transactional” shutdown will wait for all active transactions to complete or rollback before shutting down the database.
-Both options will cause any unsaved changes to be lost.
-“Transactional” shutdown may take longer than an “immediate” shutdown.
Which command performs a clean shutdown without waiting for clients to disconnect?
SHUTDOWN IMMEDIATE
Q: What is the Log Writer (LGWR) process in Oracle Database?
A: The Log Writer (LGWR) process is a background process in Oracle Database that is responsible for writing redo log entries to the online redo log files.
Q: How does LGWR work?
A: LGWR constantly monitors the redo log buffer in the SGA (System Global Area) for new redo log entries. Once the buffer is full or there is a specified time interval, LGWR writes the contents of the buffer to the online redo log files. This process is repeated continuously to ensure that all changes made to the database are captured in the redo logs.
Q: What is the importance of LGWR in the context of database recovery?
A: LGWR plays a critical role in the context of database recovery. The redo log files written by LGWR contain all the information necessary to recover the database in case of a failure. In the event of a failure, the database can be recovered by applying the redo log entries to the last known good state of the database
Q: Can LGWR be configured?
A: Yes, LGWR can be configured. For example, you can configure the size of the redo log buffer, the frequency at which LGWR writes to the redo log files, and the number of redo log files that should be used. This can be done via the initialization parameters in the database configuration file or via the ALTER SYSTEM statement.
Q: Is there any effect on performance if LGWR is slow?
A: If LGWR is slow, it can cause a bottleneck in the system and affect overall performance. This can happen if the redo log buffer is too small, the redo log files are not properly configured or if the storage system is slow. When this happens, LGWR will spend more time writing to the redo log files and less time processing new transactions, resulting in slow performance of the database.
Which package should an administrator use to configure local extent management for tablespaces?
DBMS_SPACE_ADMIN
Q: What is the Oracle Database Process Monitor?
A: The Oracle Database Process Monitor (PMON) is a background process in Oracle Database that is responsible for cleaning up after failed or terminated user processes, and for recovery of failed processes.
Q: What are the tasks of PMON?
Cleaning up after failed or terminated user processes by releasing resources such as locks and memory.
Monitoring and recovering failed database connections.
Monitoring and restarting failed Dispatcher and Server processes.
Coordinating instance recovery in a Real Application Clusters (RAC) environment.
Q: How does PMON help in the recovery process?
A: PMON plays an important role in the recovery process by detecting failed or terminated user processes, and releasing any resources they were using so that they can be reused by other processes. It also monitors and recovers failed database connections, and restarts failed Dispatcher and Server processes to ensure that the database is always available.
Q: Is PMON configurable?
A: PMON is not configurable as it is an integral part of the Oracle Database system and its behavior is controlled by the Oracle Database software. However, some of its related functionalities can be managed via database initialization parameters, for example PMON_DUMP_TIMER which controls how frequently PMON writes diagnostic information to the alert log.
Q: What is the impact on performance if PMON is not working properly?
A: If PMON is not working properly, it can cause various issues such as memory leaks, un-released locks and stuck processes, which can lead to poor performance and possibly even bring down the database. Additionally, it can cause the database to be less available and can lead to recovery failures.
Q: What is Oracle DBMS_SPACE_ADMIN package?
A: The DBMS_SPACE_ADMIN package is a set of procedures and functions provided by Oracle Database for managing space allocation and usage within the database.
Q: What are the functionalities provided by DBMS_SPACE_ADMIN package?
A: Some of the functionalities provided by DBMS_SPACE_ADMIN package include:
Managing space allocation for tablespaces, segments and extents.
Reclaiming unused space within a tablespace.
Compacting and defragmenting tablespaces and segments.
Managing temporary tablespaces and temporary segments.
Gathering statistics on space usage and fragmentation.
Q: How can DBMS_SPACE_ADMIN be used to manage space allocation?
A: DBMS_SPACE_ADMIN provides procedures such as ALLOCATE_EXTENT and DEALLOCATE_EXTENT that can be used to manage space allocation for tablespaces, segments and extents. These procedures can be used to allocate and deallocate space as needed, allowing for more precise control over space usage within the database.
Q: How can DBMS_SPACE_ADMIN be used to reclaim unused space?
DBMS_SPACE_ADMIN provides a procedure called SHRINK_Tablespace that can reclaim unused space within a tablespace. This procedure can be used to shrink a tablespace to a specified size or a percentage of its current size, effectively reclaiming any unused space.
Q: How can DBMS_SPACE_ADMIN be used to reclaim unused space?
A: DBMS_SPACE_ADMIN provides a procedure called SHRINK_Tablespace that can be used to reclaim unused space within a tablespace. This procedure can be used to shrink a tablespace to a specified size or to a percentage of its current size, effectively reclaiming any unused space.