Data Base Oracle 常用命令
阿新 • • 發佈:2017-08-12
改密 ide 角色 sysdba space 存儲 示例 table reat
Data Base Oracle 常用命令
1.登錄:(不需要密碼,屬於管理員權限)
conn /as sysdba
2.查看數據庫存儲位置:
select name from v$datafile;
3.創建表空間:
語法:create tablespace 表空間名稱 datafile ‘數據文件的路徑‘ size 大小;
示例:create tablespace test_db datafile ‘D:\ORACLE\ORADATA\ORCL\test_db.dbf‘ size 3000m;
4.創建用戶:
語法:create user 用戶名 identified by 密碼 default tablespace 用戶默認使用哪一個表空間;
示例:create user test_db identified by test_db default tablespace test_db;
5.修改密碼:
6.解鎖:
7.加鎖:
8.授權:
語法:grant 角色1,角色2 to 用戶名;
示例:grant dba, connect to test_db;
Data Base Oracle 常用命令