十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團隊
量身定制 + 運營維護+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
1、首先,點擊電腦win按鈕,彈出菜單中點擊安裝好的oracle客戶端文件夾,找到【Enterprise Manager Console】,點擊進入即可。
網(wǎng)站建設哪家好,找創(chuàng)新互聯(lián)!專注于網(wǎng)頁設計、網(wǎng)站建設、微信開發(fā)、小程序設計、集團企業(yè)網(wǎng)站建設等服務項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了柯橋免費建站歡迎大家使用!
2、打開oracle客戶端后,找到需要進入的服務名稱,并點擊。
3、點擊后,彈出登錄窗口,用sys用戶進行登錄,因為sys是DBA用戶,權限最高,可以進行創(chuàng)建用戶等操作。
4、登錄后,樹形菜單中找到安全--用戶,在用戶上右鍵操作,彈出菜單中點擊創(chuàng)建。
5、彈出創(chuàng)建用戶名和密碼窗口中,一般信息中,名稱:是用戶名,口令:就是密碼,表空間:選擇自己創(chuàng)建的表空間名稱即可。
6、需要給創(chuàng)建的用戶分配角色權限,分配基本的操作權限即可,如圖所示,在日后使用中缺少權限可以繼續(xù)分配所需權限即可。
7、設置完成后,點擊創(chuàng)建,就是提示創(chuàng)建用戶成功,完成效果圖。
create user [username] identified by [password] 創(chuàng)建新的用戶
grant 權限1、權限2...to 用戶 給創(chuàng)建用戶權限
ex:grant create session to [username] 此時只能連接到數(shù)據(jù)庫
grant connect,resource to [username] 此時權限能滿足要求
alter user [username] identified by [password] 修改用戶密碼
alter user [username] password expired 下次登錄時提示修改密碼
alter user [username] account lock 鎖住用戶
alter user [username] account unlock 解鎖鎖用戶
grant select,delete on scott.emp to [username] 把scott下emp表的兩個權限給用戶
revoke select ,delete on scott.emo from [username] 回收權限
//創(chuàng)建用戶并指定表空間
create user username identified by password
default tablespace user_data
temporary tablespace user_temp;
//給用戶授予權限
grant connect,resource to username;
//以后以該用戶登錄,創(chuàng)建的任何數(shù)據(jù)庫對象都屬于user_temp 和user_data表空間,
這就不用在每創(chuàng)建一個對象給其指定表空間了
撤權:
revoke 權限... from 用戶名;
刪除用戶命令
drop user user_name cascade;
在進行procedure執(zhí)行的時候,用的是PL/SQL工具中的test,調(diào)試方法進行執(zhí)行,因為有輸入?yún)?shù),但是報了個錯:
“note:debugging requires the debug connect session system privilege”.
原因是用戶權限不夠,使用以下命令授予權限:
GRANT debug any procedure, debug connect session TO username
其實只需要授予debug connect session 就可以了,已經(jīng)過測試。
可以邀請學生注冊。首先先進入oracle的官網(wǎng),不論是中文的官網(wǎng)還是英文的都可以。點擊注冊就行. 可以邀請學生注冊甲骨文云 / Oracle Cloud,每年能邀請 200 人注冊,同樣無需信用卡,無需手機驗證,學生賬號與老師的一樣,有等值 300 美元的贈金,有效期為 365 天,即一年。注冊流程如下:
在【數(shù)據(jù)中心列表】中,點擊工具欄【注冊】按鈕組的下拉子按鈕【注冊Oracle數(shù)據(jù)中心】,如果管理中心是Oracle類型的,直接點擊工具欄【注冊】按鈕,即可打開“注冊Oracle數(shù)據(jù)中心”的界面。
一般來說,oracle數(shù)據(jù)庫安裝后,里面有很多個默認賬號和密碼,比較常用的是:賬號:scott 密碼:tiger 賬號:system 密碼:manager 賬號:sys 密碼:任意字符。
當我們想創(chuàng)建一個賬號時,可以使用sys登錄sysdba后,創(chuàng)建用戶(需要授權),代碼如下
create user 用戶名 identified by "密碼";
授權:grant create session to 用戶名;
grant create table to 用戶名;
grant create tablespace to 用戶名;
grant create view to 用戶名;
我們一般使用的是用scott登錄sysdba,這時候有可能出現(xiàn)賬戶未解鎖的狀態(tài),這時候可以用
alter user scott account unlock;
來解鎖賬戶。解鎖之后可能會要求你改密碼:可以用
alter user scott identified by tiger;
再登錄
conn scott/tiger;
一般來說,oracle數(shù)據(jù)庫安裝后,里面有很多個默認賬號和密碼,比較常用的是:賬號:scott 密碼:tiger 賬號:system 密碼:manager 賬號:sys 密碼:任意字符。\x0d\x0a當我們想創(chuàng)建一個賬號時,可以使用sys登錄sysdba后,創(chuàng)建用戶(需要授權),代碼如下\x0d\x0acreate user 用戶名 identified by "密碼"; \x0d\x0a授權:grant create session to 用戶名; \x0d\x0a grant create table to 用戶名; \x0d\x0a grant create tablespace to 用戶名; \x0d\x0a grant create view to 用戶名;\x0d\x0a我們一般使用的是用scott登錄sysdba,這時候有可能出現(xiàn)賬戶未解鎖的狀態(tài),這時候可以用\x0d\x0a\x0d\x0aalter user scott account unlock;\x0d\x0a\x0d\x0a來解鎖賬戶。解鎖之后可能會要求你改密碼:可以用\x0d\x0aalter user scott identified by tiger;\x0d\x0a\x0d\x0a再登錄\x0d\x0aconn scott/tiger;
在sys下建,scott,沒有創(chuàng)建用戶的權限。
建用戶:
create user user_name identified by password;
賦權限:
grant resource,connect to user_name;
現(xiàn)在就可以登陸了:sqlplus user_name/password