Connect with a system user in SQL

Rumman Ansari   Software Engineer   2023-03-25   7160 Share
☰ Table of Contents

Table of Content:


Create a new user inside Oracle Database

After installation of Oracle software. We have to create a user inside it. In this tutorial, we are going to show you how to create a new user. So let's start.

To create a new user. Start SQL PLUS form your windows menu. It flows the below statements for SQL 11g release 2 version.

For this, you have to login in the system user for the highest privilege. First I will tell you how to Connect to the Oracle Database from SQL*Plus.

To connect to Oracle Database from SQL*Plus: (Using SQL PLUS)

After typing the username and password it will look like this. By default, the username is system and password in that password which you gave at the time of installation, in my case the password is alone#i#4

  SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 18 22:30:24 2018

  Copyright (c) 1982, 2010, Oracle.  All rights reserved.

  Enter user-name: system
  Enter password: alone#i#4 (For security, your password is not visible on your screen.)

  Connected to:
  Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  With the Partitioning, OLAP, Data Mining and Real Application Testing options

  SQL>

To connect to Oracle Database from SQL*Plus: (Using CMD)

  1. If you are on a Windows system, display a Windows command prompt.

  2. At the command prompt, type sqlplus and press the key Enter.

    SQL*Plus starts and prompts you for your username.

  3. Type your username and press the key Enter.

    SQL*Plus prompts you for your password.

  4. Type your password and press the key Enter.

For security, your password is not visible on your screen.

The system connects you to an Oracle Database instance.

You are in the SQL*Plus environment. At the SQL> prompt, you can enter and run SQL*Plus commands, SQL statements, PL/SQL statements, and operating system commands.

To exit SQL*Plus, type exit and press the key Enter.

Exiting SQL*Plus ends the SQL*Plus session, but does not shut down the Oracle Database instance.

  Microsoft Windows [Version 10.0.10240]
  (c) 2015 Microsoft Corporation. All rights reserved.

  C:\Users\user1>SQLPLUS

  SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 18 22:24:33 2018

  Copyright (c) 1982, 2010, Oracle.  All rights reserved.

  Enter user-name: system
  Enter password: alone#i#4 (For security, your password is not visible on your screen.)

  Connected to:
  Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
  With the Partitioning, OLAP, Data Mining and Real Application Testing options

  SQL>

How to see the recent database user

SQL> SHOW user;
USER is "SYSTEM"
SQL>