Skip to main content
Home
  • Tutorials
    • Quality Assurance
    • Software Development
    • Machine Learning
    • Data Science
  • About Us
  • Contact
programsbuzz facebook programsbuzz twitter programsbuzz linkedin
  • Log in

Main navigation

  • Tutorials
    • Quality Assurance
    • Software Development
    • Machine Learning
    • Data Science
  • About Us
  • Contact

Oracle Create User

Profile picture for user akshita.goel
Written by akshita.goel on 11/30/2021 - 14:10

In oracle you can create a new user by following the syntax shown below:

Oracle Create User Syntax

Create User user_name Identified by password|Globally|externally
Default Tablespace name1 Temporary Tablespace name2
Quota Size On name1
Password expire
ACCOUNT Lock|Unlock;

NOTE: After creating a User you should provide at least CREATE SESSION privileges to it.

Create User

The keyword is used to create a new user in the Oracle database.

Identified By clause:

  • In the above syntax Identify By Clause followed by password is used to set the login password for the user to access the database.
  • Identified By Clause followed by externally states that, the access of the user is handled by any third party. However, when followed by Globally keyword states that it has global access.

Tablespace:

  • Default Tablespace name1 in the above syntax is a space that is generated for storing the object that will be created by the user.
  • Temporary Tablespace name2 in the above syntax is the space that is meant to store the temporary object that will be created. 
  • Note: By default, the default tablespace name is set as users ie. name1=users.

Quota:

  • QUOTA SIZE on name1 keyword in the above syntax is used to allocate the maximum amount of space that can be used by the user. Quota is followed by size in M(megabyte) or you can simply write unlimited.
  • Make sure to always use the name1 that is the name of the default tablespace with Quota.

Password Expires:

  • This statement helps the user to change the password just before login into the database.

Account LOCK|UNLOCK:

  • This statement summarises the status of the Account that is created. ACCOUNT UNLOCK is used to unlock the account if it is locked.

Create User in Oracle Example

You want to create a new user named ANEW. Follow the syntax to perform the same task:

Create User ANEW Identified by manager
Default Tablespace Users Temporary Tablespace temp
Quota 10M On Users
Password expire
ACCOUNT UNLOCK;

Output

Create User in Oracle Example

Related Content
Oracle Tutorial
Oracle: GRANT Statement
Alter User Password Oracle
  • Log in or register to post comments

Choose Your Technology

  1. Agile
  2. Apache Groovy
  3. Apache Hadoop
  4. Apache HBase
  5. Apache Spark
  6. Appium
  7. AutoIt
  8. AWS
  9. Behat
  10. Cucumber Java
  11. Cypress
  12. DBMS
  13. Drupal
  14. GitHub
  15. GitLab
  16. GoLang
  17. Gradle
  18. HTML
  19. ISTQB Foundation
  20. Java
  21. JavaScript
  22. JMeter
  23. JUnit
  24. Karate
  25. Kotlin
  26. LoadRunner
  27. matplotlib
  28. MongoDB
  29. MS SQL Server
  30. MySQL
  31. Nightwatch JS
  32. PactumJS
  33. PHP
  34. Playwright
  35. Playwright Java
  36. Playwright Python
  37. Postman
  38. Project Management
  39. Protractor
  40. PyDev
  41. Python
  42. Python NumPy
  43. Python Pandas
  44. Python Seaborn
  45. R Language
  46. REST Assured
  47. Ruby
  48. Selenide
© Copyright By iVagus Services Pvt. Ltd. 2023. All Rights Reserved.

Footer

  • Cookie Policy
  • Privacy Policy
  • Terms of Use