一.需求 数据库有个表car,需要为这个表建立一个视图view_car,并新建一个用户user01,赋予查询这个视图的权限 二.实施步骤 1.以管理员clgl登陆数据库,新建视图view_car: create or replace view view_car as select * from CAR; 2.新建用户user01 create user user01 identified by "123456"; 3.授予用户user01权限 grant select on view_
--01: 创建PACS用户,并且初始密码为PACScreate user PACS identified by "PACS"; --02: 赋予该用户登录数据库的权限.grant create session to PACS; --03: 赋予该用户查看RIS下的视图V_HIS_RESULT的权限. grant select on RIS.V_HIS_RESULT to PACS; --04:创建同义词,新创建的用在查询数据库的时候,不需要带库名create public synon
; grant create session to ufo; grant create tablespace to ufo; grant create table to ufo; grant drop any table to ufo; grant insert any table to ufo; grant update any table to ufo; grant all privileges to ufo; create tablespace test datafile 'D:\app\
用DNINMSV31账户登录数据库进行如下操作: CREATE USER NORTHBOUND IDENTIFIED BY NORTHBOUND DEFAULT TABLESPACE "TBS_DNINMSV31" TEMPORARY TABLESPACE "TEMP2" QUOTA UNLIMITED ON "TBS_DNINMSV31"; GRANT "CONNECT" TO NORTHBOUND;ALTER USER N
创建用户和表空间: 1.登录linux,以oracle用户登录(如果是root用户登录的,登录后用 su - oracle命令切换成oracle用户) 2.以sysdba方式来打开sqlplus,命令如下: sqlplus / as sysdba 3.创建临时表空间: --查询临时表空间文件的绝对路径.如果需要的话,可以通过查询来写定绝对路径.一般用${ORACLE_HOME}就可以了 select name from v$tempfile; create temporary tablespac
视图是一种虚表,使用CREATE VIEW语句来定义视图,该视图是基于一个或多个表或视图的逻辑表.一个视图本身不包含任何数据, 视图所基于的表称为基表. 视图就相当于一条select 语句,定义了一个视图就是定义了一个sql语句, 视图不占空间,使用视图不会提高性能,但是能简化sql语句 . 创建视图: create view 视图名; 如: create or replace view v_test as select * from test where age=10; create or