Manager User

          create user test1 identified by test1;
          grant connect,create table to test1;
          conn cyts_cc/cyts_cc@orcl2000;
          create table(
          id int)
          tablespace user;
          ERROR 位于第 1 行:
          ORA-01950: 表空間'USERS'中無權限
          conn cyts_cc/cyts_cc@orcl2000;
          alter user test1 quota 1M on users;
          create tab
          (id int);
          success
          alter user test1 account lock;
          conn test1/test1@orcl2000;
          ERROR:
          ORA-28000: the account is locked
          1 Database Schema
          ?a schema is a named collection of objects
          ?b user is created and a corresponding schema is created
          ?c user can be associated only with one schema
          ?d username and schema are often userd interchangely.
          2 Checklist for creating users
          ? a idntfigy tablespaces in which the usr nedds to store objects
          ? b decide on quotas for each tablespace
          ? c assign a default tablespace and temporary tablespace.if you do not specify at the time of create user,system tablespace will be the defalut tablespace and temporary.it will affect the performance of the oralce.
          ? d create user
          ? e grant privileges and roles to user
          ? desc dba_users;
          ? select * from dba_users;
          3 Creating a new user:
          Database Authentiacation
          ?set the initial password
          ? create user aaron
          ? identified by soccer
          ? default tablespace data
          ? temporary tablespace temp
          ? guota 15m on data
          ? password expire;

          ? alter database default temporary tablespace temp;
          4 Creating a new user operating System Authentication
          ? os_authent_prefix initialllization parameter specifies the format of the username
          ? defauts to ops$
          ??? create user arron
          ??? identified externally
          ??? default tablespace users
          ??? temporary tablespace temp
          ??? quota 15m on data
          ??? password expire;

          ??? conn /
          ??? show parameter os
          ??? os_authent_prefix??????????????????? string?????????????????????????? OPS$
          ??? create user ops$test3
          ????? identified externally
          ????? default tablespace us
          ????? temporary tablespace
          ????? quota 10m on users
          ??? thee test2 is an user of os ,which the oracle is installed.
          5 Changing user quota on tablespace
          ?alter user test3 quota 4m on users;
          ?you cann't grant quota on temp and undotbs.
          ?
          ?alter quota 0 on uers -- means that no new table space can be allocated and cannot change the exist object in the tablespaces
          6 drop user
          ?you cannot drop user who has connected to oracle
          ? drop user (cascade)
          7 Obtaining User information
          ?information about uers can be obtained by qerying the data dictionary
          ? dba_users
          ? 名稱??????????????????????????
          -----------------------------
          USERNAME??????????????????????
          USER_ID???????????????????????
          PASSWORD??????????????????????
          ACCOUNT_STATUS????????????????
          LOCK_DATE?????????????????????
          EXPIRY_DATE???????????????????
          DEFAULT_TABLESPACE????????????
          TEMPORARY_TABLESPACE??????????
          CREATED???????????????????????
          PROFILE???????????????????????
          INITIAL_RSRC_CONSUMER_GROUP???
          EXTERNAL_NAME?????????????????
          ? dba_ts_quotas
          ?? 名稱??????????
          ?---------------
          ?TABLESPACE_NAME
          ?USERNAME??????
          ?BYTES?????????
          ?MAX_BYTES?????
          ?BLOCKS????????
          ?MAX_BLOCKS????

          posted on 2006-10-12 09:49 康文 閱讀(388) 評論(0)  編輯  收藏 所屬分類: 數據庫

          <2006年10月>
          24252627282930
          1234567
          891011121314
          15161718192021
          22232425262728
          2930311234

          導航

          統計

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 黑河市| 梅州市| 同江市| 巨野县| 比如县| 临清市| 和平县| 玉树县| 贡山| 浏阳市| 阿巴嘎旗| 内乡县| 三江| 常宁市| 阳西县| 芜湖县| 石嘴山市| 长丰县| 西昌市| 阳原县| 长兴县| 昭通市| 宁安市| 东安县| 丰都县| 山丹县| 大宁县| 杨浦区| 通化市| 汤原县| 句容市| 建湖县| 嵊泗县| 芜湖县| 肥西县| 黎城县| 浪卡子县| 海南省| 广饶县| 宜丰县| 正蓝旗|