window上, 用命令行爲oracle 創建db(簡版,不創建新實例)

記錄下, 在window上創建 oracle DB 的最簡命令(不建立新實例,直接在原有實例上創建db)sql

1. 在oracle服務器上,命令行執行sqlplus服務器

    sqlplus /nologoracle

SQL> conn /as sysdbaapp

2.  建立表空間ide

create tablespace XXX_data datafile 'D:\app\Administrator\virtual\XXX.dbf' size 100m;

 

三、建立用戶&密碼&指定默認表空間spa

create user xxx identified by password default tablespace XXX_data;

四、受權命令行

grant connect,resource,dba to XXX;

 

五、查看錶空間 code

select name from v$database;

 

6. 以後用就能夠使用這個db了。blog

相關文章
相關標籤/搜索