Linux Oracle is a common system, so I learned about Linux Oracle. Here I will introduce the application of Linux Oracle System in detail and hope it will be useful to you. In the use of Linux Oracle databases, database files gradually increase with the increase of data, which may result in insufficient hard disk space after reaching a certain size;
In Linux Oracle, we can move database files to another large hard disk partition. Next, I will take the database file on drive C in the Linux Oracle for Windows version as an example to introduce the methods and steps for moving the file on the Linux Oracle database.
1. Connect to the Linux Oracle Database of the file to be moved in sqlplus, and run the following SQL statement to view the File Location of the Linux Oracle database:
- SQL> select file_name from sys.dba_data_files;
- FILE_NAME
- C:\ORA8\ORADATA\Linux Oracle\USERS01.DBF
- C:\ORA8\ORADATA\Linux Oracle\DR01.DBF
- C:\ORA8\ORADATA\Linux Oracle\TOOLS01.DBF
- C:\ORA8\ORADATA\Linux Oracle\INDX01.DBF
- C:\ORA8\ORADATA\Linux Oracle\RBS01.DBF
- C:\ORA8\ORADATA\Linux Oracle\TEMP01.DBF
- C:\ORA8\ORADATA\Linux Oracle\SYSTEM01.DBF
7 records are found. The location and name of the file to be moved are recorded.
2. next, we will move the file "C: \ ORA8 \ ORADATA \ Linux Oracle \ USERS01.DBF" to "D: \ ORADATA \ USERS01.DBF" as an example to introduce how to move other files, change the file path and name according to the actual situation.
<1> first, stop all users from connecting to the database and shut down the database. In the command line window, enter:
- C: \ sqlplus/nolog (Press ENTER)
- SQL>Connect/as sysdba (Press ENTER)
- SQL>Shutdown immediate (Press ENTER)
- # Wait for the database prompt to close
- SQL>Exit
<2> find the file "USERS01.DBF" in the "C: \ ORA8 \ ORADATA \ Linux Oracle \" directory and copy it to the directory "D: \ ORADATA. If multiple files are moved, repeat this step.
<3> enter the command window and enter the following content:
- C: \ sqlplus/nolog (Press ENTER)
- SQL>Connect/as sysdba (Press ENTER)
- SQL>Startup mount (Press ENTER)
- # Wait until the database prompts that the load is successful
- SQL>Alter database rename file 'C: \ ORA8 \ ORADATA \ Linux Oracle \ users01.dbf' to 'd: \ ORADATA \ users01.dbf ';
- # After the prompt statement is processed, if you want to move multiple files, modify the file path and name and then run the preceding statement again. Open the database.
- SQL>Alter database open;
- SQL>Exit
The database file is successfully moved. The preceding steps start with a tool:
- Linux Oracle accesses MySQL Client software
- Linux Oracle can be installed on WMware virtual machines
- Linux Oracle 10 Gb software installation database
- Linux management tool installation package and add source
- Common commands and functions of Unix Linux operating system