This Is A FineDay

            BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            93 隨筆 :: 0 文章 :: 69 評論 :: 0 Trackbacks

          Oracle10g 的創(chuàng)建用戶名

          1、 ? linux oracle 的啟動

          oracle 身份登錄 ?

          啟動 ?? lsnrctl start

          登錄 ?? sqplus /nolog

          連接數(shù)據(jù)庫 ?? connect? /as?? sysdba

          啟動數(shù)據(jù)庫 ?? startup

          關(guān)閉數(shù)據(jù)庫 ?? shutdown immediate

          2、 ? 在數(shù)據(jù)中創(chuàng)建用戶名

          啟動數(shù)據(jù)庫后創(chuàng)建用戶名

          連接超級用戶 ?? connect system/admin??? system 系統(tǒng)用戶名字 ? admin 密碼

          創(chuàng)建用戶名字 ?? create user sha identified by admin?? 用戶名: sha 密碼 :admin

          ?????? ? ? 可以寫 ?? Default tablespace user?? // 指定存儲對象使用的默認(rèn)空間表 默認(rèn)是 system

          ?????????????? Temporary tablespace temp; // 保存臨時對象所使用的空間表 默認(rèn)是 system

          ??????? 上面的倆行,可以寫 空間表為 user 臨時為 temp ;不寫就默認(rèn)

          3、 ? 添加用戶的權(quán)限

          Grant 是授予權(quán)限的 如:

          ???? Grant create session to sha // 授予 sha 連接數(shù)據(jù)的權(quán)限

          ? 系統(tǒng)權(quán)限如下:

          系統(tǒng)特權(quán)

          允許執(zhí)行的操作

          Create session

          連接數(shù)據(jù)庫

          Create sequence

          創(chuàng)建序列

          Create synonym

          創(chuàng)建同名對象

          Create table

          創(chuàng)建表

          Create any table

          創(chuàng)建任何模式的表

          Drop table

          刪除表

          Create procedure

          創(chuàng)建存儲過程

          Execute any procedure

          執(zhí)行任何模式的存儲過程

          Create user

          創(chuàng)建用戶

          Create view

          創(chuàng)建視圖

          Drop user

          刪除用戶

          Drop any table

          刪除任何模式的表

          4、 ? 向用戶授予系統(tǒng)特權(quán)

          Grant execute any procedure to sha with admin option?

          此句意思為為 sha 用戶創(chuàng)建系統(tǒng)特權(quán)并且可以用 sha 為別的用戶授予權(quán)限

          連接 sha 用戶 ? connect sha/admin

          可以創(chuàng)建別的用戶

          5 、查看用戶權(quán)限

          進(jìn)入 sha 用戶 connect sha/admin

          Select * from user_sys_privs; 可以查看到一個列表,

          列代表 用戶名 權(quán)限 是否可以給別的用戶附加權(quán)限( N Y ?

          行代表 權(quán)限都有那些

          6 、撤銷用戶授予的權(quán)限

          必須連接 connect system/admin

          撤銷權(quán)限 ? revoke 是系統(tǒng)撤銷權(quán)限的關(guān)鍵詞

          Revoke execute any procedure from sha

          7 、更改用戶密碼

          進(jìn)入 sha 用戶 ? connect sha/admin

          Password?????? 輸入舊密碼 ? 輸入新密碼倆邊 ?? OK

          或者 alter user sha identified by xinmima

          8 、刪除用戶

          Connect system/admin

          Drop user sha

          9 、為用戶授予角色

          Grant dba to sha

          Grant connect to sha

          Linux 下的 plsql? 創(chuàng)建用戶

          create user sha identified by admin

          Default tablespace user

          Temporary tablespace temp;

          Granr unlimited tablespace to sha ?? ?// 權(quán)限

          Grant dba to sha ????????????????? // 角色

          Grant connect to sha

          ?

          posted on 2008-04-16 00:58 Peter Pan 閱讀(3020) 評論(5)  編輯  收藏 所屬分類: DB

          評論

          # re: oracle10g創(chuàng)建用戶 2009-03-11 12:32 代虹
          創(chuàng)建用戶  回復(fù)  更多評論
            

          #  2009-08-13 01:50
          喜歡  回復(fù)  更多評論
            

          # wo yao jia 2009-08-31 18:46 陳孝知
          反對感豆腐干豆腐干反對感第三方的  回復(fù)  更多評論
            

          # re: oracle10g創(chuàng)建用戶[未登錄] 2010-09-28 19:43
          收藏夾
            回復(fù)  更多評論
            

          # re: oracle10g創(chuàng)建用戶[未登錄] 2010-09-28 19:43
          收藏夾  回復(fù)  更多評論
            

          主站蜘蛛池模板: 阿坝县| 乌海市| 乌兰县| 蒲江县| 游戏| 阿尔山市| 长岛县| 顺昌县| 凤台县| 屯留县| 玉树县| 田东县| 芜湖县| 介休市| 周至县| 牡丹江市| 宜兰市| 兴义市| 东光县| 吴忠市| 淮安市| 宣汉县| 临泽县| 陵川县| 高平市| 黑河市| 松原市| 上饶县| 灌云县| 新邵县| 巨野县| 沂源县| 南昌市| 连州市| 民权县| 邻水| 义乌市| 清徐县| 宕昌县| 安阳市| 玉环县|