Oracle 常用命令

Oracle 常用的指令簡單以 FAQ 的方式記錄一下:

查看 有哪些 DB(show databases)
select * from v$dbfile
查看有哪些 Table(show tables)
select * from v$tablespace
建立 DB(Tablespace)
create tablespace NAME datafile 'FILENAME.dbf' size 20M; (Create DB)
建立一個新的 USER, 並授權可連線, 建 table 等
  • create user USERNAME identified by PASSWORD;
  • grant connect to USERNAME;
  • grant resource to USERNAME;
  • conn USERNAME/PASSWOD;
  • create table t1 (c1 int);
  • insert into t1 values(1);
  • commit;

其它的等遇到問題再來做記錄囉~

閱讀全文〈Oracle 常用命令〉