rem
rem  Name
rem storage.sql - define a storage templates for a GVC tables and indexes
rem    
rem  Synopsis
rem     Used internally by GVC software OR
rem     sql*plus: sqlplus <db>/<pswd> @storage.sql
rem
rem  Description
rem     This file contains commands used to specify default
rem     storage parameters for tables and indexes.
rem
rem  Parameters
rem        None.
rem
rem  Remarks
rem     This file may be customized to control where/how tables and indexes
rem     are created. A sample space template is as follows:
rem
rem         rem space large
rem         create table gvc_temp (a char(2))
rem         tablespace USERS
rem             pctfree 5 pctused 90
rem             storage (initial     8K
rem                      next        100K
rem                      minextents  1
rem                      maxextents  9999
rem                      pctincrease 50)
rem         /
rem         drop table gvc_temp
rem         /
rem
rem     The remark line defines the space name. it must be of the format
rem     "rem space <name>". The "create ..." line is skipped and the
rem     remainder of the command up to the "/" character are added to
rem     end of the internal GVC create table or create index commands.
rem
rem     Currently the gvc software only recognizes a few space names. They
rem     are as follows:
rem         "large":    used for primary tables and network error tables
rem         "def_tab":  used for indirect tables
rem         "feat_num": used to create any feat_num index on any
rem                     non-system table.
rem         "def_indx": used to create all other indexes.
rem
rem     If anyone wishes to make changes to this file, they may do so
rem     and test the changes by executing it from sqlplus.
rem			"SQL> @storage.sql"
rem		Note the "drop ..." commands which follow any "create ..." command
rem		do the necessary clean up.
rem
rem		Note also that system tables and indexes are created using the scripts
rem		gvc_schm.sql and gvc_sys.sql
rem
rem  Modification history
rem Mnemonic    Release 	Date        Who
rem ORAV6       gvc_i8906   89sep21     jb
rem     needed since oracle got rid of space definitions.
rem
rem	ORAV6		gvc_i8906	89dec14		jb
rem		corrected pctincrease for default indexes (from 500 to 50)
rem
rem	AR_ADB		arrow		92apr23		oh
rem		added vendor specific sql
rem
rem	AR_SPTL		arrow		92may07		Orest Halustchak
rem		added g_si table/index creates
rem
rem	VT_DB		victor		93may10		Orest Halustchak
rem		update to be compatible with 2.1 schema
rem
rem	SPR:12314	corona		95mar07		Orest Halustchak
rem		update g_si_primary to match columns in g_sys_idx.sql
rem
rem	SPR:12324	corona		95mar21		Mike Tardif
rem		Added tablespace controls over G_TMP tables.
rem
rem	VSDO		curie		01Apr09		Barbara Zoladek
rem		Added table and index space for g_geometry tables.
rem
rem	SPR:307637	curie		01Aug22		Barbara Zoladek
rem		Addedd g_geometry_prim_index.
rem
rem	SPR:310004	curie		01Sep26		Waldemar Kosmider
rem		Added parameter sdo_indx_dims to the parameters clause when
rem		creating the R-Tree index
rem
rem	ID: storage.sql 4.3.1.4 2001/09/26 23:08:05 waldemar
rem  -----------------------------------------------------------------
rem

set echo on

rem space large.oracle		/* storage for all primary, network error tables  */
create table gvc_temp (feat_num number(10,0))
tablespace USERS
pctfree 5 pctused 90
initrans 1 maxtrans 255
storage (initial     8K
         next        100K
         minextents  1
         maxextents  9999
         pctincrease 50)
/
rem space feat_num.oracle		/* index for all "feat_num" columns */
create index gvc_temp_feat_num on gvc_temp(feat_num)
tablespace USERS
pctfree 5
storage (initial     10K
         next        25K
         minextents  1
         maxextents  9999
         pctincrease 50)
/

rem get rid of the table and the index
drop table gvc_temp
/
rem space def_tab.oracle		/* default (indirect) table space   */
create table gvc_temp (a char(2))
tablespace USERS
pctfree 5 pctused 90
initrans 1 maxtrans 255
storage (initial     4K
         next        20K
         minextents  1
         maxextents  9999
         pctincrease 50)
/
rem space tmp_tab.oracle		/* default (g_tmp) table space   */
create table gvc_temp (a char(2))
tablespace USERS
pctfree 5 pctused 90
initrans 1 maxtrans 255
storage (initial     4K
         next        20K
         minextents  1
         maxextents  9999
         pctincrease 50)
/
rem space def_indx.oracle				/* default index space  */
create index gvc_temp_a on gvc_temp(a)
tablespace USERS
pctfree 5
storage (initial     4K
         next        10K
         minextents  1
         maxextents  9999
         pctincrease 50)
/
rem space f_geometry_table.oracle		/* g_geometry create */
create table f_geometry ( feat_num        number(10,0)) 
tablespace USERS
pctfree 5 pctused 90
storage 
(initial     4K
next        25K
minextents  1
maxextents  9999
pctincrease 50)
/
rem space f_geometry_index.oracle		/* g_geometry index */
create index f_geometry_spidx on g_geometry (geometry)
'tablespace=USERS initial=4K next=20K minextents=1 maxextents=9999 pctincrease=50'
/
rem space f_geometry_prim_index.oracle		/* g_geometry index */
create index f_geometry_prim_index on g_geometry (feat_num, plan, g_version)
tablespace USERS 
pctfree 5 
storage 
(initial 4K 
next 20K 
minextents 1 
maxextents 9999 
pctincrease 50)
/

rem                                         /* drop table and index */
drop table gvc_temp
/
