0

I'm trying to answer the following question (asked in a previous exam and supposedly having one correct answer):

To create a DATAFILE and Assign it to a DATABASE, the instance can't be

  1. started in NOMOUNT mode
  2. started in MOUNT mode
  3. started in OPEN mode
  4. not started

To this end, I started reading the relevant Oracle documentation in the article Database and Instance Startup and Shutdown. In the section How a Database is Mounted, the following was stated (emphasis mine):


How a Database is Mounted

The instance mounts a database to associate the database with that instance. To mount the database, the instance finds the database control files and opens them. Control files are specified in the CONTROL_FILES initialization parameter in the parameter file used to start the instance. Oracle then reads the control files to get the names of the database's datafiles and redo log files.

At this point, the database is still closed and is accessible only to the database administrator. The database administrator can keep the database closed while completing specific maintenance operations. However, the database is not yet available for normal operations.

According to this passage, when the database is mounted it can be accessed by the database administrator. Does access here mean that the administrator can only perform read operations, or can also modify the database (e.g. by creating a datafile)?

1 Answer 1

1

The datafiles are not open for access - only the control files have been read. This state is used for things like backup and recovery operations, renaming datafiles, enabling transparent data encryption on tablespaces, etc. Data cannot be accessed or any transactions processed until the database is opened:

The database administrator can keep the database closed while completing specific maintenance operations. However, the database is not yet available for normal operations.

While the concept of a mounted database really hasn't changed, note that the documentation you referenced is for Oracle 9, which is over 25 years old. For an idea of which maintenance operations might be performed while the database is in MOUNT mode, make sure you're looking at the right documentation for your version (hopefully 19c or later).

In the case of your question, the only state in which no file operations are possible is if the database is not started at all: in that case there is no running instance (processes), no open control files, and no DBA connection to issue commands. Different types of file operations are possible in each of the other modes, depending on whether the database is being created, restored from backup or altered in some way, or open for normal operations.

2
  • So, creating datafiles is not possible under MOUNT mode? Or should I look at the right documentation for my version to check if creating datafiles is considered as a maintenance operation? Commented May 18, 2023 at 10:33
  • 1
    Creating datafiles in MOUNT mode is possible for specific maintenance operations, like recovering from a backup. For typical storage management - adding a file to a tablespace - the database is open. The specific command you want to use to add or manipulate the datafile: e.g., create database, alter database, alter tablespace, etc. will determine what mode the database must be in.
    – pmdba
    Commented May 18, 2023 at 10:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.