How to create a new Oracle user (new schema)

Source: Internet
Author: User
Create a new user in Oracle, and create a new schema to distinguish other directories. At the same time, it also saves data objects of all related users and tables of users.

Create a new user in Oracle, and create a new schema to distinguish other directories. At the same time, it also saves data objects of all related users and tables of users.

Create a new user in Oracle, and create a new schema to distinguish other directories. At the same time, it also saves data objects of all related users and tables of users.

How to create a new user? (Create a new db)

First, use the system (default password is manager) user to log on to the database.

The statement create user creates a user.
In the most simple form, the create user statement is one of the following three:

The first one creates a local user, the second one creates an external user while the last one creates global user.

How to create locked users?

A user can be created locked, that is, the user cannot connect to the database.

SQL> create user alfredo identified by passw0rd account lock;

The user is now created, he can be granted some rights, for example the right to connect to the database:

Now, if the user tries to connect to the database, he will get ORA-28000:

The user can now be unlocked with an alter user statement:

Which allows Alfredo to log on to the database now:

  • Connected.
  • ,

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.