How to create a local database using Oracle?
To create an Oracle database locally, you can follow these steps:
- Firstly, make sure you have installed the Oracle database software. If not, please download the appropriate software package for your operating system from the official Oracle website.
- Open Command Prompt or Terminal window, and run as administrator.
- sqlplus log in as the sysdba role
- Run the following command to create the database:
CREATE DATABASE <database_name>
USER SYS IDENTIFIED BY <sys_password>
USER SYSTEM IDENTIFIED BY <system_password>
LOGFILE GROUP 1 ('path_to_redo_log_file_1') SIZE 100M,
GROUP 2 ('path_to_redo_log_file_2') SIZE 100M,
GROUP 3 ('path_to_redo_log_file_3') SIZE 100M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
CHARACTER SET <character_set>;
- Run the following command to start the database:
STARTUP;
- After the database startup is complete, you can use the following command to check the database status:
SELECT status FROM v$instance;
If the status is OPEN, the database has been successfully created and started.
By following these steps, you have successfully set up an Oracle database locally. Please note that the process may vary depending on the operating system and Oracle version, so make adjustments according to your specific situation.