欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

如何创建Oracle新用户(新schema)

程序员文章站 2022-05-07 22:35:40
...

Oracle中创建新的user, 也就相应地创建了一个新的schema, 用来区别其他目录的同时, 还保存所有相关user的数据对象以及user的表.

Oracle中创建新的user, 也就相应地创建了一个新的schema, 用来区别其他目录的同时, 还保存所有相关user的数据对象以及user的表.

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

首先用system(默认密码为manager)用户登陆连接数据库.

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: