欢迎来到代码驿站!

Oracle

当前位置:首页 > 数据库 > Oracle

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

时间:2021-04-18 09:48:57|栏目:Oracle|点击:

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 lyoa/lyoa@localhost/orcl file=F:\lyoa.dmp full=y

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

上一篇:Oracle 实现将查询结果保存到文本txt中

栏    目:Oracle

下一篇:ORACLE中如何找到未提交事务的SQL语句详解

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

本文地址:http://www.codeinn.net/misctech/103583.html

推荐教程

广告投放 | 联系我们 | 版权申明

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ:914707363 | 邮箱:codeinn#126.com(#换成@)

Copyright © 2020 代码驿站 版权所有