Oracle建立資料庫及授權

2021-06-16 08:22:57 字數 632 閱讀 6657

1.首先,建立(新)使用者:

create user username identified by password;

username:新使用者名稱的使用者名稱

password: 新使用者的密碼

也可以不建立新使用者,而仍然用以前的使用者,如:繼續利用scott用

2.建立表空間:

create tablespace tablespacename datafile 'd:\data.dbf' size ***m;

tablespacename:表空間的名字

d:\data.dbf':表空間的儲存位置

***表空間的大小,m單位為兆(m)

3.將空間分配給使用者:

alert user username default tablespace tablespacename;

將名字為tablespacename的表空間分配給username

4.給使用者授權:

grant create session,create table,create sequence,unlimited tablespace to username;

5.然後再以樓主自己建立的使用者登入,登入之後建立表即可。

conn username/password;

Oracle資料庫建立 刪除使用者及使用者授權

建立使用者指定表空間並授權 create user testuser identified by testuser default tablespace tests data alter user testuseraccount unlock grant connect,resource to te...

Oracle資料庫建立使用者並授權

首先在命令列介面下用sys或system使用者登入資料庫,具體方法是 1 執行 cmd 2 sqlplus 回車 3 sys as sysdba 回車 回車 執行建立使用者的sql語句 create user username identified by password 執行授權的sql語句 gr...

MySQL資料庫建立使用者及授權操作

1 登入mysql的root賬號 使用root使用者登入 mysql u root p2 使用命令建立使用者create user username host identified by password 1 username 建立的使用者名稱 2 host 指定使用者可以通過主機登入的位址 本地則...