av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

深入講述Oracle 9i創(chuàng)建表空間

下面是有關(guān)Oracle 9i創(chuàng)建表空間,用戶,授權(quán),角色.常用的SQL語句,用sys帳號登陸,連接身份選SYSDBA,執(zhí)行如下語句

目前創(chuàng)新互聯(lián)已為上千多家的企業(yè)提供了網(wǎng)站建設(shè)、域名、網(wǎng)絡(luò)空間、網(wǎng)站托管、服務(wù)器租用、企業(yè)網(wǎng)站設(shè)計、樂昌網(wǎng)站維護等服務(wù),公司將堅持客戶導(dǎo)向、應(yīng)用為本的策略,正道將秉承"和諧、參與、激情"的文化,與客戶和合作伙伴齊心協(xié)力一起成長,共同發(fā)展。

// 創(chuàng)建表空間

drop tablespace test;

create tablespace test

DATAFILE 'D:\oracle\oradata\test\test.dbf'

size 10M AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED;

alter user scott quota unlimited on test;

commit;

創(chuàng)建了一個名為test的表空間,數(shù)據(jù)庫文件創(chuàng)建 在D:\oracle\oradata\test\test.dbf,并給scott 帳號授權(quán)使用表空間。

//創(chuàng)建scott用戶 并分配表空間

drop user scott cascade;

create user scott

identified by tiger

default tablespace test

quota 100M on test;

commit;

//創(chuàng)建完畢后授權(quán)

Grant connect,resource,create session,create table,create sequence,create any view,EXP_FULL_DATABASE, IMP_FULL_DATABASE, DBA,to scott;

//sql plus 中執(zhí)行.sql 文件

@d:\xzsp_hrb_oracle_doc.sql

//創(chuàng)建一個名為manager的角色

create role manager;

//給manager這個角色授于相應(yīng)的系統(tǒng)權(quán)限

grant create table,create view,create session to manager;

//授予針對某個對象的權(quán)限如查詢某個表的權(quán)限

grant select on 表名字 to manager; //可以把一個權(quán)限同時賦予多個角色或者用戶,但不能把多個權(quán)限同時賦予多個角色或者用戶,需分開執(zhí)行。

//把manager這個角色分配給scott,xzsp兩個帳號。

grant manager to scott,xzsp;

//修改帳號scott密碼為tiger

alert user scott identified by tiger;

//scott用戶建的表,如果想給其他用戶權(quán)限則必須用scott用戶登陸后執(zhí)行如下語句,即使你是DBA也不把

一個用戶(scott)所創(chuàng)建的表賦予給另外一個用戶(xzsp)操作的權(quán)限,除非scott用戶給DBA授權(quán)。

grant select on 表名字 to xzsp;

grant select on employees to scott,xzsp;

//用scott用戶登陸 給system授權(quán)

grant select on student to system with grant option;

//用system 登陸,再把查詢student的權(quán)限授予另外一個用戶。

grant select on scott.student to xzsp;

//system同時可取消xzsp用戶的該權(quán)限。

revoke select on scott.student from xzsp;

權(quán)限傳遞的級聯(lián):scott用戶把權(quán)限給A(同時允許A傳遞給其他用戶 with grand option),A把權(quán)限再傳遞給B,如果scott用戶撤消A的權(quán)限,則B也會失去相應(yīng)的權(quán)限。

grant update (department_name,location_id) on departments to scott,xzsp; //授予用戶修改某個表中指定字段的權(quán)限。

grant select,insert on departments to scott with grant option; //把查詢,增加departments表的權(quán)限給scott用戶并允許他把權(quán)限授予給其他擁護。

grant select on scott.departments to public; //授予public 角色查詢scott下departments表的權(quán)限。

//訪問其他數(shù)據(jù)庫對象(database links)

create public database link hq.acme.com using 'sales';

select * from [email protected] //emp為表名

CREATE USER 創(chuàng)建一個用戶(通常由DBA來完成)。

GRANT 給于其他用戶使用你自己對象的權(quán)限。

CREATE ROLE 創(chuàng)建一個權(quán)限的集合,即角色。

ALTER USER 修改一個用戶的密碼。

REVOKE 撤消一個用戶在某個對象上的權(quán)限,如 表 視圖等。

----------------------查看用戶權(quán)限-----------------------------------

--------------------------------------------------------------------------

1.查看所有用戶:

select * from dba_users;

select * from all_users;

select * from user_users;

2.查看用戶或角色系統(tǒng)權(quán)限:

select * from dba_sys_privs;

select * from user_sys_privs;

3.查看用戶對象權(quán)限:

select * from dba_tab_privs;

select * from all_tab_privs;

select * from user_tab_privs;

4.查看所有角色:

select * from dba_roles;

5.查看用戶或角色所擁有的角色:

select * from dba_role_privs;

select * from user_role_privs;

【編輯推薦】

  1. Oracle性能診斷不能不知的秘籍
  2. 使用dtu遠程連接Oracel 9i數(shù)據(jù)庫的方法
  3. Windows2000服務(wù)器下安裝Oracle9i與10g
  4. Oracle多表查詢優(yōu)化的代碼示例
  5. Oracle更改的默認端口號剖析

網(wǎng)頁名稱:深入講述Oracle 9i創(chuàng)建表空間
標題網(wǎng)址:http://uogjgqi.cn/article/cdcejoe.html
掃二維碼與項目經(jīng)理溝通

我們在微信上24小時期待你的聲音

解答本文疑問/技術(shù)咨詢/運營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流