Oracle8i その他の情報メモメモ(2002/07/11)
表領域から作っていきましょう!
sqlplus コマンドのアンチョコ(食べれません!)です。sysdba 位の権限でやんないと駄目っす。
コマンド 表領域の作成 create tablespace TBS01 datafile 'tbs01.dbf' size 100M
default storage (initial 50M next 50M minextents 1 maxextents 99 pctincrease 10) online;表領域の削除 drop tablespace TBS01 including contents; 表領域の拡張 alter tablespace TBS01 add datafile 'tbs01.dbf' size 100M reuse; 表領域の一覧 select * from dba_tablespaces; select * from dba_data_files; 表領域のサイズ select * from dba_data_files where tablespace_name='TBS01'; 表領域の未使用サイズ select sum(bytes) from dba_extents where tablespace_name='TBS01'; 表領域の削除後は、rmコマンドで dbf ファイルを消します。但し、順序を間違えるととんでも無い事に・・・
ここよい : http://ash.jp/db/ora_tbs.htm
sqlplus コマンドのアンチョコ(食べれません!)です。sysdba 位の権限でやるんかなー
コマンド ユーザの登録 create user joe identified by パスワード default tablespace TBS01; アクセス権 grant DBA to joe; ユーザの一覧 select * from all_users;
SQL*Loader を使用するらしいです。データの元となる「CSVファイル」と、それを制御する「制御ファイル」を作成します。
☆ CSVファイル・・・・。は、カンマ区切りのファイルを用意〜
☆制御ファイルの内容
load data infile CSV形式のファイル名 into table 表名 fields terminated by ',' optionally enclosed by '"' (列名1, 列名2, 列名3...)★実行方法
sqlload ユーザ名/パスワード 制御ファイル名