Oracle create user, table space, view and assign permissions

- tablespace dcuser
Create TABLESPACE dcuser (tablespace name) datafile ' &. 1 \ dcuser.dbf (created here, and the same name space table dbf file)' size 100 m AUTOEXTEND Next ON 10 m;

Here is & 1 will be in the implementation, we need to fill your own table space for file storage address, usually placed in the database instance name (orcl), for example: E: \ app \ xxx \ oradata \ orcl

--用户dcuser
create user dcuser identified by 123 default tablespace dcuser;

- Fu login permissions
Grant Connect to dcuser;

- Create a view

CREATE OR REPLACE VIEW View_Axis_Employee

AS

select Employee_Name,

Employee_Account,

Employee_ICCard,

Dept_Name,

User_ID

from (select

t.name as Employee_Name,

t.no as Employee_Account,

t3.ic_no as Employee_ICCard,

t2.dept_name as Dept_Name,

t.id as User_ID

from sys_user t

left join sys_user_dept_position t1

on t.id = t1.user_id

left join sys_dept_v t2

on t2.id = t1.dept_id

left join sys_user_extend t3

on t3.sys_user_id = t.id);

- permission to query the user dcuser

grant select on mes614.View_Axis_Employee to dcuser;

 

Guess you like

Origin www.cnblogs.com/1012hq/p/11214476.html