Create a new user in oracle database 12c

Here are the steps to create a new user in an Oracle database 12c:

Using SQLPlus

  1. Open a SQLPlus session by running the command sqlplus and logging in as the system administrator (e.g., sys or system).
  2. Create a new user by running the following command:
    CREATE USER <username> IDENTIFIED BY <password>;

    Replace <username> with the desired username and <password> with the desired password.

For example:

CREATE USER myuser IDENTIFIED BY mypassword;
  1. Grant the user the necessary privileges by running the following command:
    GRANT <privilege> TO <username>;

    Replace <privilege> with the desired privilege (e.g., CREATE SESSION, CREATE TABLE, etc.) and <username> with the username you created.

For example:

GRANT CREATE SESSION TO myuser;
  1. Commit the changes by running the following command:
    COMMIT;

Using Oracle Enterprise Manager

  1. Log in to Oracle Enterprise Manager (EM) by navigating to the URL http://<your_database_host>:<port>/em (e.g., http://localhost:5500/em).
  2. Click on the "Security" tab and then click on "Users" in the left-hand menu.
  3. Click on the "Create User" button.
  4. Enter the desired username and password, and select the desired privileges (e.g., CREATE SESSION, CREATE TABLE, etc.).
  5. Click on the "Create" button to create the user.
  6. Click on the "Commit" button to commit the changes.

Using Oracle SQL Developer

  1. Open Oracle SQL Developer and connect to your database.
  2. Click on the "Tools" menu and select "User" > "Create User".
  3. Enter the desired username and password, and select the desired privileges (e.g., CREATE SESSION, CREATE TABLE, etc.).
  4. Click on the "Create" button to create the user.
  5. Click on the "Commit" button to commit the changes.

Note: Make sure to replace <username> and <password> with the desired values, and <privilege> with the desired privilege. Also, ensure that the username and password are strong and follow the recommended password policies.