日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Oracle 用户 对 表空间 配额(quota ) 说明

發(fā)布時間:2024/4/14 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Oracle 用户 对 表空间 配额(quota ) 说明 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

?

?

. 官網(wǎng)的說明

?

Oracle 官網(wǎng)對quota的定義如下:

??????????? A limit on a resource, such as a limit on the amount of database storage used by a database user. A database administrator can set tablespace quotas for each Oracle Database username.

?

有關(guān)Oracle Quota 這塊,只在Oracle 的安全管理這塊搜到了一些內(nèi)容。

??????????? Managing Security for Oracle Database Users

??????????? http://download.oracle.com/docs/cd/E11882_01/network.112/e16543/users.htm#DBSEG10220

?

?

1.1 ??Assigning a Tablespace Quota for the User

??????????? You can assign each user a tablespace quota for any tablespace (except a temporary tablespace). Assigning a quota accomplishes the following:

1Users with privileges to create certain types of objects can create those objects in the specified tablespace.

2Oracle Database limits the amount of space that can be allocated for storage of a user's objects within the specified tablespace to the amount of the quota.

?

??????????? By default, a user has no quota on any tablespace in the database. If the user has the privilege to create a schema object, then you must assign a quota to allow the user to create objects. At a minimum, assign users a quota for the default tablespace, and additional quotas for other tablespaces in which they can create objects.

?

??????????? The following CREATE USER statement assigns the following quotas for the test_ts and data_ts tablespaces:

?

CREATE USER jward

?IDENTIFIED BY password

?DEFAULT TABLESPACE data_ts

?QUOTA 100M ON test_ts

?QUOTA 500K ON data_ts

?TEMPORARY TABLESPACE temp_ts

?PROFILE clerk;

?

-- 在創(chuàng)建用戶的時候,就指定用戶在特定表空間上的配額

?

??????????? You can assign a user either individual quotas for a specific amount of disk space in each tablespace or an unlimited amount of disk space in all tablespaces. Specific quotas prevent a user's objects from using too much space in the database.

-- 配額的指定可以禁止用戶的對象使用過多的表空間

?

??????????? You can assign quotas to a user tablespace when you create the user, or add or change quotas later. (You can find existing user quotas by querying the USER_TS_QUOTAS view.)

??????????? If a new quota is less than the old one, then the following conditions remain true:

??????????? 1If a user has already exceeded a new tablespace quota, then the objects of a user in the tablespace cannot be allocated more space until the combined space of these objects is less than the new quota.

??????????? 2If a user has not exceeded a new tablespace quota, or if the space used by the objects of the user in the tablespace falls under a new tablespace quota, then the user's objects can be allocated space up to the new quota.

?

1.2 ?Restricting the Quota Limits for User Objects in a Tablespace

??????????? You can restrict the quota limits for user objects in a tablespace by using the ALTER USER SQL statement to change the current quota of the user to zero.

??????????? After a quota of zero is assigned, the objects of the user in the tablespace remain, and the user can still create new objects, but the existing objects will not be allocated any new space.

??????????? For example, you could not insert data into one of this user's exiting tables. The operation will fail with an ORA-1536 space quota exceeded for tables error.

?

1.3 ?Granting Users the UNLIMITED TABLESPACE System Privilege

??????????? To permit a user to use an unlimited amount of any tablespace in the database, grant the user the UNLIMITED TABLESPACE system privilege. This overrides all explicit tablespace quotas for the user. If you later revoke the privilege, then you must explicitly grant quotas to individual tablespaces. You can grant this privilege only to users, not to roles.

??????????? Before granting the UNLIMITED TABLESPACE system privilege, you must consider the consequences of doing so.

?

Advantage:

??????????? You can grant a user unlimited access to all tablespaces of a database with one statement.

?

Disadvantages:

??????????? 1The privilege overrides all explicit tablespace quotas for the user.

??????????? 2You cannot selectively revoke tablespace access from a user with the UNLIMITED TABLESPACE privilege. You can grant selective or restricted access only after revoking the privilege.

?

?

1.4 ?Listing All Tablespace Quotas

??????????? Use the DBA_TS_QUOTAS view to list all tablespace quotas specifically assigned to each user. For example:

?

SELECT * FROM DBA_TS_QUOTAS; ? TABLESPACE??? USERNAME??? BYTES???? MAX_BYTES??? BLOCKS??? MAX_BLOCKS ----------??? ---------? --------?? ----------?? -------?? ---------- USERS???????? JFEE????????????? 0?????? 512000???????? 0????????? 250 USERS???????? DCRANNEY????????? 0?????????? -1????? ???0?????????? -1

?

??????????? When specific quotas are assigned, the exact number is indicated in the MAX_BYTES column. This number is always a multiple of the database block size, so if you specify a tablespace quota that is not a multiple of the database block size, then it is rounded up accordingly. Unlimited quotas are indicated by -1.

?

?

. ?Quota 說明

??????????? 配額大小指的是用戶指定使用表空間的的大小。在1.1 節(jié)里提到,默認情況下,用戶對所有表空間都是沒有配額的,即不受空間的限制。 查看幾個用戶的創(chuàng)建腳本來驗證一下:

?

?

CREATE USER SYSTEM

? IDENTIFIED BY <password>

? DEFAULT TABLESPACE SYSTEM

? TEMPORARY TABLESPACE TEMP

? PROFILE DEFAULT

? ACCOUNT UNLOCK;

? -- 2 Roles for SYSTEM

? GRANT AQ_ADMINISTRATOR_ROLE TO SYSTEM WITH ADMIN OPTION;

? GRANT DBA TO SYSTEM WITH ADMIN OPTION;

? ALTER USER SYSTEM DEFAULT ROLE ALL;

? -- 5 System Privileges for SYSTEM

? GRANT GLOBAL QUERY REWRITE TO SYSTEM;

? GRANT CREATE MATERIALIZED VIEW TO SYSTEM;

? GRANT CREATE TABLE TO SYSTEM;

? GRANT UNLIMITED TABLESPACE TO SYSTEM WITH ADMIN OPTION;

? GRANT SELECT ANY TABLE TO SYSTEM;

?

?

CREATE USER DAVE

? IDENTIFIED BY <password>

? DEFAULT TABLESPACE USERS

? TEMPORARY TABLESPACE TEMP

? PROFILE DEFAULT

? ACCOUNT UNLOCK;

? -- 2 Roles for DAVE

? GRANT CONNECT TO DAVE;

? GRANT RESOURCE TO DAVE;

? ALTER USER DAVE DEFAULT ROLE ALL;

? -- 1 System Privilege for DAVE

? GRANT UNLIMITED TABLESPACE TO DAVE;

?

??????????? 從這2個腳本來看,默認情況下,都會對用戶賦 unlimited tablespace 的權(quán)限。這是是在創(chuàng)建的時候指定的,當我們的用戶創(chuàng)建好之后,我們也可以修改用戶的配額。

?

有關(guān)用戶的配額的操作說明

1. 創(chuàng)建用戶時,指定限額

?

SQL> conn / as sysdba;

Connected.

SQL> create user anqing identified by anqing default tablespace users temporary tablespace temp quota 10M on users;

User created.

?

查詢用戶配額的信息:

SQL> select tablespace_name,username,max_bytes from? DBA_TS_QUOTAS where username='ANQING';

?

TABLESPACE_NAME????? USERNAME??? MAX_BYTES

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

USERS??????????????????? ANQING?????? 10485760

?

?

2.更改用戶的表空間限額:

?

不對用戶做表空間限額控制:

?

SQL> grant unlimited tablespace to anqing;

Grant succeeded.

?

這種方式是全局性的. 即修改用戶多所有表空間的配額。

?

如果我們想改某個具體的,即針對用戶的某個特定的表空間,可以使用如下SQL

?

SQL> alter user anqing quota unlimited on users;

User altered.

?

查看配額:

SQL> select tablespace_name,username,max_bytes from? DBA_TS_QUOTAS where username='ANQING';

?

TABLESPACE_NAME??????????????? USERNAME??? MAX_BYTES

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

USERS????????????????????????? ANQING???????????? -1

?

這時候max_bytes -1,即不受限制。

?

?

3. 回收用戶對表空間的配額:

同樣兩種方式,

?

全局:

SQL> revoke unlimited tablespace from anqing;

Revoke succeeded.

?

在查看配額,已經(jīng)沒有了相關(guān)信息:

SQL> select tablespace_name,username,max_bytes from? DBA_TS_QUOTAS where username='ANQING';

no rows selected

?

?

針對某個特定的表空間:

SQL> alter user anqing quota 0 on users;

User altered.

?

?

?

?

?

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

Blog http://blog.csdn.net/tianlesoftware

Email: dvd.dba@gmail.com

DBA1 群:62697716(滿);?? DBA2 群:62697977(滿)?? DBA3 群:62697850(滿)??

DBA 超級群:63306533(滿);? DBA4 群: 83829929? DBA5群: 142216823???

聊天 群:40132017?? 聊天2群:69087192

--加群需要在備注說明Oracle表空間和數(shù)據(jù)文件的關(guān)系,否則拒絕申請

?

轉(zhuǎn)載于:https://www.cnblogs.com/hibernate315/archive/2011/05/11/2399034.html

總結(jié)

以上是生活随笔為你收集整理的Oracle 用户 对 表空间 配额(quota ) 说明的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 欧美成人黄色 | 四季av在线一区二区三区 | 国产网友自拍视频 | 在线观看欧美亚洲 | 涩涩免费网站 | 欧美13p | 绝顶高潮合集videos | wwwxxx日本人| 亚洲不卡在线播放 | 密臀av在线播放 | 伊人福利 | 91嫩草欧美久久久九九九 | 你懂的网址在线 | 国产又粗又猛又爽视频 | 91亚洲一区二区三区 | 天天干天天做天天操 | 麻豆观看 | 亚洲一二三四视频 | 日本吃奶摸下激烈网站动漫 | 中文字幕在线免费看 | 秋霞视频一区二区 | 日韩视频在线观看免费 | 亚洲欧美国产日韩精品 | 五月天婷婷丁香花 | 日本黄色大片在线观看 | 欧美s码亚洲码精品m码 | 亚洲精品国产电影 | 日韩免费二区 | 成人免费视频久久 | 国产成人在线观看免费网站 | 国产一区二区高清视频 | 美女扒开内看个够网站 | 超碰中文在线 | 亚洲AV无码一区二区三区性 | 国产精品无码专区av在线播放 | 91丨porny丨九色 | 黄色片女人 | www.777色| 欧美综合激情网 | 久久久久亚洲AV | av黄色免费在线观看 | 欧美亚州 | 欧美h网站| 欧美激情 一区 | 99热这里只有精品久久 | 2017天天干 | 国产成人精品一区二区三区免费 | 久久视频免费 | 日本欧美中文字幕 | 美女张开腿让人桶 | 亚洲日本中文字幕在线 | www视频在线观看免费 | 2025国产精品 | 白石茉莉奈番号 | av高清在线观看 | 男人日女人网站 | 狠狠操网| 日本边添边摸边做边爱 | 色婷婷久久五月综合成人 | 国产精品一区二区三区久久 | 国产中文字幕乱人伦在线观看 | 日韩精品无码一区二区 | 97精品视频在线 | 亚洲手机在线观看 | 国产精品麻豆视频 | 毛片在线观看网站 | 中文字幕av专区dvd | 99九九热 | 成人免费视频久久 | 女性女同性aⅴ免费观女性恋 | 亚州a级片 | 欧美视频免费看欧美视频 | 91视频大全 | 久久夜色网 | 日韩av线观看 | av网址在线看 | 精品久久久999 | 国产裸体无遮挡 | 亚洲综合图片区 | 国精产品一区一区三区视频 | 捆绑最紧bdsm视频 | 亚洲成人视屏 | 精品国产黄色片 | 国产精品国产三级国产三级人妇 | 91午夜免费视频 | 亚洲成a人片77777精品 | 欧美色久| 99精品久久精品一区二区 | 免费看成人aa片无码视频羞羞网 | 欧美亚洲国产一区 | 国产又黄又粗又硬 | 精品无码一区二区三区爱欲 | 亚洲三级视频在线观看 | 久久亚洲欧洲 | 日本精品一区 | 国产精品入口66mio | 日本三区在线 | 91免费黄色| 香蕉a视频|