Home > Database > Mysql Tutorial > body text

Oracle数据库创建用户并授权

WBOY
Release: 2016-06-07 15:38:15
Original
2099 people have browsed it

首先在命令行界面下用sys或system用户登录数据库,具体方法是: 1)运行:cmd 2)sqlplus → 回车 3)sys/ as sysdba → 回车 → 回车 执行创建用户的sql语句: create user username identified by password ; 执行授权的sql语句: grant connect,resource,

首先在命令行界面下用sys或system用户登录数据库,具体方法是:

1)运行:cmd

2)sqlplus → 回车

3)sys/ as sysdba → 回车 → 回车

执行创建用户的sql语句:

create user username identified by password;

执行授权的sql语句:

grant connect,resource,dba,exp_full_database,imp_full_database to username;

Oracle拥有多个角色,不同的角色拥有的权限不尽相同,用户可以根据自己的需要选择赋予不同的权限。上述例句是针对开发者而言,开发者需要足够的权限。

connect角色拥有的权限有:ALTER SESSION, CREATE CLUSTER, CREATE DATABASE LINK, CREATE SEQUENCE, CREATE SESSION, CREATE STNONYM, CREATE TABLE, CREATE VIEW

resource角色拥有的权限有:CREATE CLUSTER, CREATE INDEXTYPE, CREATE OPERATOR, CREATE PROCEDURE, CREATE SEQUENCE, CREATE TABLE, CREATE TRIGGER, CREATE TYPE

dba拥有所有的管理权限

exp_full_database 主要是用户Oracle数据的导出

imp_full_database 主要是用于Oracle数据的导入

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!