oracle创建表空间、授权、创建用户、导入dmp文件

oracle创建表空间,授权,创建用户,导入dmp文件,具体详解如下所示:

1.创建表空间

create tablespace bpm datafile 'd:\oracle11\oradata\orcl\bpm.dbf' size 400m autoextend on
create tablespace lyoa datafile 'd:\oracle11\oradata\orcl\lyoa.dbf' size 400m autoextend on
create tablespace kdb datafile 'd:\oracle11\oradata\orcl\kdb.dbf' size 400m autoextend on

2– 创建用户

2.创建lyoa用户

create user lyoa
identified by lyoa
default tablespace lyoa
temporary tablespace temp
profile default;
-- grant/revoke role privileges
grant connect to lyoa;
grant resource to lyoa;
-- grant/revoke system privileges
grant create database link to lyoa;
grant create public database link to lyoa;
grant create view to lyoa;

3 创建kdb用户

create user kdb
identified by kdb
default tablespace kdb
temporary tablespace temp
profile default;
-- grant/revoke role privileges
grant connect to kdb;
grant resource to kdb;

4 把lyoa下的表授权给kdb用户

grant all on lyoa.oa_public_address_book to kdb;
grant all on lyoa.oa_public_address_book_group to kdb;
grant all on bpm.bpm_orgdeptlist to kdb;
grant all on bpm.bpm_orguserdeptmap to kdb;
grant all on bpm.bpm_orguserlist to kdb;
-- grant/revoke system privileges
grant create view to kdb;
grant unlimited tablespace to kdb;
-- create the user
create user bpm
identified by bpm
default tablespace bpm
temporary tablespace temp
profile default;
-- grant/revoke role privileges
grant connect to bpm;
grant resource to bpm;
-- grant/revoke system privileges
grant create database link to bpm;
grant create public database link to bpm;
grant create view to bpm;
grant drop public database link to bpm;
grant unlimited tablespace to bpm;
grant all on lyoa.ly_im_news_2 to bpm;
grant all on lyoa.oa_system_message to bpm;

1.在orac数据中,给scott用户connect resource sysdb的权限 创建三个用户

登录 sys/ as sysdba

2.登录每个用户导入对应用户的表

导入用户的表 给与lyoa用户dba的权限 grant dba to lyoa

imp file=f:\lyoa.dmp full=y

3.用户没有授权需要登录 sys/ as sysdba 之后 sysdba为密码进行授权

以上所述是www.887551.com给大家介绍的oracle创建表空间、授权、创建用户、导入dmp文件,希望对大家有所帮助

(0)
上一篇 2022年3月21日
下一篇 2022年3月21日

相关推荐