01.Database creation in Oracle_11g - Avinashgurugubelli/OracleSQL GitHub Wiki

Database creation in Oracle 11g

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

01

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. 02

Step 4: Click next

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

Step 6: Follow the below highlighted steps.

04 05 06

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.)

07

Click next and Yes.

08

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

09 10 11 12 13 14

Save the configuration file for future reference.

15 16

Wait for installation, until it reaches 100%.

17 18

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.

19

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

20

Connection in SQL developer: 21

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;
⚠️ **GitHub.com Fallback** ⚠️