laalaal
2001-08-24 13:27:42
0
4338

수동으로 DB만들기 예제.


create database 예제:::::::::::::::::

connect internal

startup nomount pfile=/data2/oraedu/dba301/윤/initDBA301.ora

create database DBA301
datafile '/data2/oraedu/dba301/u01/system_01.dbf' size 80m
logfile '/data2/oraedu/dba301/u01/log1a.rdo' size 150k,
'/data2/oraedu/dba301/u01/log2a.rdo' size 150k,
'/data2/oraedu/dba301/u01/log3a.rdo' size 150k,
character set KO16KSC5601;

create tablespace rbs
datafile '/data2/oraedu/dba301/u03/rbs_01.dbf' size 5m;

create tablespace temp
datafile '/data2/oraedu/dba301/u04/temp_01.dbf' size 2m;

create tablespace users
datafile '/data2/oraedu/dba301/u03/users_01.dbf' size 5m;

create tablespace query
datafile '/data2/oraedu/dba301/u03/query_01.dbf' size 1m;

create tablespace indextbs
datafile '/data2/oraedu/dba301/u01/indextbs_01.dbf' size 500k;

create rollback seqment temprbs;
alter rollback seqment temprbs online;

create rollback segment rbs01
storage (initial 150k next 150k optimal 900k minextents 6)
tablespace rbs;

create rollback segment rbs02
storage (initial 150k next 150k optimal 900k minextents 6)
tablespace rbs;
alter rollback segment rbs01 online;
alter rollback segment rbs02 online;


alter rollback segment temprbs offline;
drop rollback segment temprbs;

@?/rdbms/admin/catalog
@?/rdbms/admin/catproc

alter user SYSTEM
temporary tablespace temp;

connect SYSTEM/MANAGER

@?/rdbms/admin/catdbsyn 혹은 @?/sqlplus/admin/catdbsyn
@?/rdbms/admin/pupbld


connect internal

create user scott identified by tiger
default tablespace users
temporary tablespace temp;

grant connect, resource to scott;

connect scott/tiger

@?/rdbms/brwdemo.sql

connect internal

alter tablespace query read only;

shutdown;

laalaal~
0
  • 댓글 0

  • 로그인을 하시면 댓글을 등록할 수 있습니다.