Create a new oracle database xe admin account
Here are the steps to create a new Oracle Database XE admin account:
Prerequisites:
- You have Oracle Database XE installed on your system.
- You have a basic understanding of Oracle Database concepts.
Step 1: Connect to the Database
Open a command prompt or terminal window and navigate to the Oracle Database XE installation directory. For example:
cd C:\app\oracle\product\12.2.0\dbhomeXE\bin
Then, start the database by running the following command:
sqlplus / as sysdba
This will connect you to the database as the system administrator (SYS).
Step 2: Create a New Admin Account
Once connected, create a new admin account using the following command:
CREATE USER <new_admin_username> IDENTIFIED BY <new_admin_password>;
Replace <new_admin_username>
with the desired username for your new admin account, and <new_admin_password>
with the desired password.
For example:
CREATE USER oracle_admin IDENTIFIED BY welcome1;
This will create a new user account named oracle_admin
with the password welcome1
.
Step 3: Grant Privileges to the New Admin Account
Grant the necessary privileges to the new admin account using the following commands:
GRANT CONNECT, RESOURCE, DBA TO <new_admin_username>;
This will grant the CONNECT
, RESOURCE
, and DBA
privileges to the new admin account.
For example:
GRANT CONNECT, RESOURCE, DBA TO oracle_admin;
Step 4: Verify the New Admin Account
To verify that the new admin account has been created and granted the necessary privileges, you can try connecting to the database using the new account:
sqlplus oracle_admin/welcome1
If the connection is successful, you should be able to access the database as the new admin account.
That's it! You have now created a new Oracle Database XE admin account.