2006年10月12日

          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 @ 2006-10-12 09:49 康文 閱讀(387) | 評論 (0)編輯 收藏

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

          導航

          統計

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 梅河口市| 游戏| 菏泽市| 乌拉特后旗| 抚州市| 南宁市| 紫阳县| 武威市| 潼关县| 梓潼县| 广水市| 东台市| 镶黄旗| 罗定市| 金溪县| 高台县| 镇赉县| 景洪市| 新巴尔虎左旗| 屏边| 新沂市| 临颍县| 神木县| 微博| 临泉县| 筠连县| 唐海县| 西乌珠穆沁旗| 个旧市| 凤山市| 育儿| 苗栗县| 阿瓦提县| 通辽市| 霍林郭勒市| 阿尔山市| 虎林市| 科技| 白河县| 公安县| 绍兴市|