01.Database creation in Oracle_11g - Avinashgurugubelli/OracleSQL GitHub Wiki
The below steps are executed and tested in Windows 10.
Step 1: Install Oracle in the system.
Step 2: To check whether the oracle exists in your machine or not.
Open command prompt and run this command – “sqlplus/nolog” you should be able to see the below message in command prompt.
Note:
o sqlplus - provides access to utilize sqlplus,
o The "/nolog" parameter means "start sqlplus, but do not log into a database

Step 3: Go to window search and type “database configuration assistance”. When ever
you complete the oracle installation you will get this database configuration assistance.
Once you click and open the app. below window will open.

Step 4: Click next
Step 5: Select a create database in the application window and click next.

Step 6: Follow the below highlighted steps.

Select use the same administrative password for all accounts (it is up to you whether to use the same or not, but keep a note of all these passwords.)

Click next and Yes.

I want to save it to the custom location you can save it anywhere

Save the configuration file for future reference.

Wait for installation, until it reaches 100%.

Step 7: Now open new command prompt and type
set oracle_sid = sampleDB
Note: sampleDB - is the name I have given while creation, provide your database name here.
Step 8: Now type sqlplus/nolog in the same command prompt. Run the below commands:
conn sys as sysdaba;
Enter password: (just hit enter key in the keyboard)
You should get the below message.

Step 9: Now create a user
Syntax: create user USERNAME identified by PASSWORD;
Command: create user admin identified by admin;
Step 10: Give permissions to the created user:
Syntax: grant dba to USERNAME
Command: grant dba to admin; (admin is the username which I provided in step 9)
TO Test:
Open another command prompt. And type sqlplus/nolog
conn admin
Enter password: in my case “admin”
You should get the below output

Connection in SQL developer:

How to unlock the user?
- Open command promt.
- run “sqlplus/nolog”
- conn [sys (or) admin] as sysdba
- ALTER USER <'user-name'> IDENTIFIED BY <'password'> ACCOUNT UNLOCK;