Aviso: Este artigo ainda é um rascunho!
CriaTbs
PROMPT Obrigatorio que seja conectado como usuario SYSTEM disconnect; connect SYSTEM; prompt Criando tablespace TOTALI_DATA ##create tablespace TOTALI_DATA
datafile 'c:\oracle\TOTALI_DATA.ORA' size 500M
##default storage ( initial 500K next 50k pctincrease 0 maxextents 300 ) ##/ CREATE TABLESPACE TOTALI_DATA LOGGING DATAFILE '/ora01/oradata/totali/TOTALI_DATA01.dbf' SIZE 600M AUTOEXTEND ON NEXT 50M MAXSIZE 2000M, '/ora01/oradata/totali/TOTALI_DATA02.dbf' SIZE 600M AUTOEXTEND ON NEXT 50M MAXSIZE 2000M DEFAULT STORAGE ( INITIAL 50K NEXT 50K MINEXTENTS 1 PCTINCREASE 1 ) EXTENT MANAGEMENT DICTIONARY; prompt Criando tablespace TOTALI_INDEX ##create tablespace TOTALI_INDEX
datafile 'c:\oracle\TOTALI_INDEX.ORA' size 500M
##default storage ( initial 500k next 50k pctincrease 0 maxextents 300 ) ##/ CREATE TABLESPACE TOTALI_INDEX LOGGING DATAFILE '/ora02/oradata/totali/TOTALI_INDEX01.dbf' SIZE 600M AUTOEXTEND ON NEXT 50M MAXSIZE 2000M, '/ora02/oradata/totali/TOTALI_INDEX02.dbf' SIZE 600M AUTOEXTEND ON NEXT 50M MAXSIZE 2000M, '/ora02/oradata/totali/TOTALI_INDEX03.dbf' SIZE 600M AUTOEXTEND ON NEXT 50M MAXSIZE 2000M DEFAULT STORAGE ( INITIAL 50K NEXT 50K MINEXTENTS 1 PCTINCREASE 1 ) EXTENT MANAGEMENT DICTIONARY;
CriaUsu
create user TOTALI identified by "2000" default tablespace totali_data temporary tablespace temp; grant connect, resource, create public synonym, drop public synonym, create role, create user, drop user to TOTALI; grant SELECT_CATALOG_ROLE to TOTALI with ADMIN OPTION; grant CONNECT to TOTALI with ADMIN OPTION; grant CREATE SESSION to TOTALI with ADMIN OPTION; grant CREATE ANY TRIGGER to TOTALI with ADMIN OPTION; grant ALTER ANY TRIGGER to TOTALI with ADMIN OPTION; grant CREATE ANY PROCEDURE to TOTALI with ADMIN OPTION; grant LOCK ANY TABLE to TOTALI with ADMIN OPTION; grant unlimited tablespace to TOTALI; grant exp_full_database to TOTALI; grant imp_full_database to TOTALI;