0

I wanted to change the default location for Oracle datafiles and spread data across different physical drives using below command. This way u02, u03, u04, u05, ... will automatically point to directory2.

alter system set db_create_file_dest = '/path/to/directory2';

Here are the questions.

  1. Once u02 is full, is that correct that u03/u04/u05/u06/... will be created automatically in the new directory?
  2. What should be done if I want u04 and u05 to point to directory3 and u06/u07/... to point to directory4?

Thanks!

2
  • I don't understand your question. What means "u02, u03, u04, u05, ... will automatically point to directory2"?
    – miracle173
    Commented Nov 21, 2022 at 9:24
  • I was thinking about keeping /u01 in the root disk for software and /u02, /u03, etc. in a separate storage for storing data. Is it possible if I could set up some parameters to limit the size of /u02 so that when it's filled up, Oracle would create /u03 automatically in that storage or I'll have to manually create /u03? @miracle173
    – geopark
    Commented Nov 24, 2022 at 6:00

1 Answer 1

0

Directories like /u02, /u03/, etc. are typically mount points for disk partitions. If it "fills up" then creating a new directory won't help: you'll need another disk partition to point /u03 or some other mount point to. These directories, partitions and mount points are not created automatically, but are assigned by your system administrator.

That said, you can always spread your data files across physical disks by specifying the exact path in the CREATE or ALTER TABLESPACE commands. The db_create_file_dest parameter only specifies the default location in which files are created if you don't specify one explicitly, and it can only point to one place.

Note that there is no point to spreading files across directories only if those directories are all located on the same physical disk partition.

4
  • Thanks @pmdba! Is that common that 1 mount point normally corresponds to 1 physical disk, that is pointing /u01 to the root, /u02 to disk1, /u03 to disk2, and so on?
    – geopark
    Commented Nov 24, 2022 at 6:04
  • A mount point is the point of attachment for a disk partition's file system to the operating system, so maybe - it depends on how many partitions a disk has been formatted into. Could be one, could be four or more, each with their own mount point. A mount point could also be pointing to a network-mounted disk or partition, a LUN on a SAN (which is a logical array of disks), or a logical volume spanning multiple disks on the local server.
    – pmdba
    Commented Nov 24, 2022 at 11:52
  • The "point" is that each mount point will only point to a single physical or logical storage location. Any directory folder can become a mount point. /u01 and /u02 could point to separate storage locations, or they could be just directories in the root partition. On Linux you would use the df command to list all of the actual mounted disks or partitions. Note that many Linux distributions now put the operating system and all initial data into the root partition, unless you specifically mount additional disks. If this is the case then be careful: if root is full, the server will hang.
    – pmdba
    Commented Nov 24, 2022 at 11:53
  • Great! Thanks a lot!
    – geopark
    Commented Nov 28, 2022 at 4:32

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.