⌘BABAKOV.NET Let's code!
100% [light] [ru]

Creating a User (Schema) in Oracle

Example of a simple user (schema) creation in Oracle DB:

--Создаем нового пользователя test с паролем 240580
create user test IDENTIFIED BY 240580
default tablespace users
temporary tablespace temp

--Добавляем квоту на дисковое пространство.
alter user test quota 100M on users;

--Разрещаем создавать сессии пользователю (подключаться)
grant create session to test

--Разрешаем создавать таблицы пользователю
grant create table to test

--Разрешаем создавать процедуры
grant create procedure to test

--Разрешаем создавать триггеры
grant create trigger to test

--Разрешаем создавать представления
grant create view to test

--Разрешаем создвавть счетчики
grant create sequence to test

--Разрешаем изменять таблицы, процедуры, триггеры и профиль
grant alter any table to test;
grant alter any procedure to test;
grant alter any trigger to test;
grant alter profile to test;

--Разрешаем удаления
grant delete any table to test;
grant drop any table to test;
grant drop any procedure to test;
grant drop any trigger to test;
grant drop any view to test;
grant drop profile to test;

A full-fledged user has been created, and you can use it!

Comments (0)

No comments yet.

Leave a comment
Comment
Images (up to 5 MB)
Your comment will appear after moderation.