「Oracle入門」表領域作成、オブジェクト確認のコマンド

1.表領域作成
CREATE TABLESPACE “TABLESPACE_CFT” DATAFILE
‘/var/data/cft.dbf’ SIZE 2G AUTOEXTEND ON MAXSIZE 4G
LOGGING ONLINE PERMANENT BLOCKSIZE 2048
EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO;

2.テーブル一覧
SELECT * FROM USER_USERS;

3.表領域一覧
SELECT TABLESPACE_CFT,FILE_NAME FROM DBA_DATA_FILES;

4.ユーザの確認
SELECT * FROM ALL_USERS WHERE USERNAME = ‘YAMADA’;

5.所有オブジェクト確認
SELECT * FROM USER_OBJECTS
WHERE OBJECT_TYPE IN (‘PROCEDURE’,’FUNCTION’,’PACKAGE’,’PACKAGEBODY’,’TRIGGER’);

6.ストアドプロシージャを実行する
EXECUTE CFT_PROCEDURE;

Comments are closed.