spool g:\oralog\orachema.log
CONNECT / as sysdba
shutdown immediate
startup pfile=&2\dbs\p_build_ecperf.ora

DISCONNECT

CONNECT system/manager
DROP TABLESPACE C_cust_space INCLUDING CONTENTS;
DROP TABLESPACE C_supp_space INCLUDING CONTENTS;
DROP TABLESPACE C_site_space INCLUDING CONTENTS;
DROP TABLESPACE C_parts_space INCLUDING CONTENTS;

CREATE TABLESPACE C_cust_space
	DATAFILE '&1\oradata\ecperf\C_cust' SIZE 1000M
-- 2003.1.5 hirose 30M -> 1000M
--	DATAFILE '&1\oradata\ecperf\C_cust' SIZE 30M  
--	DATAFILE '&1\oradata\ecperf\C_cust' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE C_supp_space
	DATAFILE '&1\oradata\ecperf\C_supp' SIZE 1000M
-- 2003.1.5 hirose 30M -> 1000M
--	DATAFILE '&1\oradata\ecperf\C_supp' SIZE 30M
--	DATAFILE '&1\oradata\ecperf\C_supp' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE C_site_space
	DATAFILE '&1\oradata\ecperf\C_site' SIZE 1000M
-- 2003.1.5 hirose 30M -> 1000M
--	DATAFILE '&1\oradata\ecperf\C_site' SIZE 30M
--	DATAFILE '&1\oradata\ecperf\C_site' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE C_parts_space
	DATAFILE '&1\oradata\ecperf\C_parts' SIZE 1000M
-- 2003.1.5 hirose 30M -> 1000M
--	DATAFILE '&1\oradata\ecperf\C_parts' SIZE 30M
--	DATAFILE '&1\oradata\ecperf\C_parts' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

commit;

-- 2002.12.21
--CONNECT / as sysdba
--@&2\Rdbms\admin\catalog.sql;
--@&2\Rdbms\admin\catexp7.sql
--@&2\Rdbms\admin\catproc.sql
--@&2\Rdbms\admin\caths.sql

connect system/manager
@&2\sqlplus\admin\pupbld.sql

commit;

CONNECT ecperf/ecperf
@sql/schema_C

DISCONNECT

CONNECT / as sysdba
shutdown immediate
startup pfile=&2\dbs\p_build_ecperf.ora

DISCONNECT

CONNECT system/manager
DROP TABLESPACE O_cust_space INCLUDING CONTENTS;
DROP TABLESPACE O_ords_space INCLUDING CONTENTS;
DROP TABLESPACE O_ordl_space INCLUDING CONTENTS;
DROP TABLESPACE O_item_space INCLUDING CONTENTS;

CONNECT / as sysdba
startup pfile=&2\dbs\p_build_ecperf.ora

DISCONNECT


CONNECT system/manager

CREATE TABLESPACE O_cust_space
	DATAFILE '&1\oradata\ecperf\O_cust' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE O_ords_space
	DATAFILE '&1\oradata\ecperf\O_ords' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE O_ordl_space
	DATAFILE '&1\oradata\ecperf\O_ordl' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE O_item_space
	DATAFILE '&1\oradata\ecperf\O_item' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

commit;

DISCONNECT

CONNECT ecperf/ecperf
@sql/schema_O

DISCONNECT

CONNECT / as sysdba
shutdown immediate
startup pfile=&2\dbs\p_build_ecperf.ora

DROP TABLESPACE M_parts_space INCLUDING CONTENTS;
DROP TABLESPACE M_bom_space INCLUDING CONTENTS;
DROP TABLESPACE M_wo_space INCLUDING CONTENTS;
DROP TABLESPACE M_lo_space INCLUDING CONTENTS;
DROP TABLESPACE M_inv_space INCLUDING CONTENTS;

CONNECT system/manager
CREATE TABLESPACE M_parts_space
	DATAFILE '&1\oradata\ecperf\M_parts' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE M_bom_space
	DATAFILE '&1\oradata\ecperf\M_bom' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE M_wo_space
	DATAFILE '&1\oradata\ecperf\M_wo' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE M_lo_space
	DATAFILE '&1\oradata\ecperf\M_lo' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE M_inv_space
	DATAFILE '&1\oradata\ecperf\M_inv' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

commit;

CONNECT ecperf/ecperf
@sql/schema_M

DISCONNECT

CONNECT / as sysdba
shutdown immediate
startup pfile=&2\dbs\p_build_ecperf.ora

DISCONNECT

CONNECT system/manager
DROP TABLESPACE S_comp_space INCLUDING CONTENTS;
DROP TABLESPACE S_sc_space INCLUDING CONTENTS;
DROP TABLESPACE S_po_space INCLUDING CONTENTS;
DROP TABLESPACE S_site_space INCLUDING CONTENTS;
DROP TABLESPACE S_supp_space INCLUDING CONTENTS;

DISCONNECT

CONNECT system/manager
CREATE TABLESPACE S_comp_space
	DATAFILE '&1\oradata\ecperf\S_comp' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE S_sc_space
	DATAFILE '&1\oradata\ecperf\S_suppcomp' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE S_po_space
	DATAFILE '&1\oradata\ecperf\S_po' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE S_site_space
	DATAFILE '&1\oradata\ecperf\S_site' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

CREATE TABLESPACE S_supp_space
	DATAFILE '&1\oradata\ecperf\S_supp' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

commit;

DISCONNECT

CONNECT ecperf/ecperf
@sql/schema_S

DISCONNECT

CONNECT / as sysdba
shutdown immediate
startup pfile=&2\dbs\p_build_ecperf.ora

DISCONNECT

CONNECT system/manager
DROP TABLESPACE U_space INCLUDING CONTENTS;

DISCONNECT

CONNECT system/manager
CREATE TABLESPACE U_space
	DATAFILE '&1\oradata\ecperf\U_tables' SIZE 100M
	EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M NOLOGGING;

DISCONNECT

CONNECT ecperf/ecperf
@sql/schema_U

commit;

spool off

quit
