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?? // 指定存儲對象使用的默認空間表 默認是 system

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

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

          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)限

          進入 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 、更改用戶密碼

          進入 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 閱讀(3021) 評論(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ù)  更多評論
            

          主站蜘蛛池模板: 阿拉善盟| 化德县| 宝清县| 松江区| 政和县| 乡城县| 安仁县| 漳州市| 吉林省| 五原县| 桦甸市| 壤塘县| 南汇区| 江口县| 红原县| 兰溪市| 荃湾区| 永登县| 百色市| 武义县| 梁平县| 济阳县| 青河县| 太康县| 若尔盖县| 北碚区| 新泰市| 广南县| 南通市| 固镇县| 防城港市| 新疆| 吉木萨尔县| 崇明县| 丰城市| 莲花县| 孙吴县| 承德市| 肥乡县| 宾川县| 蓝田县|