Oracleデータベースの新規作成、ユーザーの削除

2888 ワード

1.
--
select username,sid,serial#,osuser from v$session ;
--
alter system kill session '154,349';
2.
-- (TEST)
DROP USER TEST CASCADE ;
3.
--    (TEST)

CREATE USER TEST
  ACCOUNT UNLOCK
  IDENTIFIED BY test
  DEFAULT TABLESPACE USERS;
  GRANT IMP_FULL_DATABASE TO TEST;
  GRANT RESOURCE TO TEST;
  GRANT CONNECT TO TEST;
  ALTER USER TEST DEFAULT ROLE ALL;
  GRANT CREATE VIEW TO TEST;
  GRANT SELECT ON DBA_DATA_FILES TO TEST;
  GRANT SELECT ON DBA_FREE_SPACE TO TEST;
  GRANT QUERY REWRITE TO TEST;
  GRANT CREATE SESSION TO TEST;
  GRANT GLOBAL QUERY REWRITE TO TEST;
  GRANT CREATE MATERIALIZED VIEW TO TEST;
  GRANT UNLIMITED TABLESPACE TO TEST;
  GRANT CREATE TRIGGER TO TEST;