Aside

Templates para DATABASE ORACLE

Limpar os databases em uma instancia standalone ORACLE
shutdown abort;
startup mount exclusive restrict;
drop database;

— Exemplo de arquivo init.ora

TPL_DB.__db_cache_size=256M
TPL_DB.__java_pool_size=25M
TPL_DB.__large_pool_size=25M
TPL_DB.__pga_aggregate_target=256M
TPL_DB.__sga_target=1G
TPL_DB.__shared_io_pool_size=0
TPL_DB.__shared_pool_size=128M
TPL_DB.__streams_pool_size=0
*.audit_trail=’db’
*.control_files=’/u01/oradata/TPL_DB/controlfile/control01.ctl’,’/u01/oradata/TPL_DB/controlfile/control02.ctl’
*.cursor_sharing=’EXACT’
*.db_block_size=8192
*.db_domain=”
*.db_name=’TPL_DB’
*.log_archive_dest_1=’LOCATION=/u01/oradata/TPL_DB/archivelog’
*.log_archive_format=’arch_%r_%t_%s.arc’
*.memory_target=2G
*.open_cursors=1080
*.optimizer_mode=’ALL_ROWS’
*.processes=1000
*.remote_login_passwordfile=’exclusive’
TPL_DB.undo_tablespace=’UNDO_TS01′

cd $ORACLE_HOME

orapwd file=orapwTPL_DB.ora password=q1w2e3r4 entries=50 force=y

sqlplus “/ as sysdba”

startup nomount
CREATE DATABASE TPL_DB
    USER SYS identified by q1w2e3r4
USER SYSTEM identified by q1w2e3r4
LOGFILE
  GROUP 1 (
    ‘/u01/oradata/TPL_DB/redolog/redo01_01.log’,
    ‘/u01/oradata/TPL_DB/redolog/redo01_02.log’
  ) SIZE 300M,
  GROUP 2 (
    ‘/u01/oradata/TPL_DB/redolog/redo02_01.log’,
    ‘/u01/oradata/TPL_DB/redolog/redo02_02.log’
  ) SIZE 300M,
  GROUP 3 (
    ‘/u01/oradata/TPL_DB/redolog/redo03_01.log’,
    ‘/u01/oradata/TPL_DB/redolog/redo03_02.log’
  ) SIZE 300M
  MAXLOGFILES 320
  MAXLOGMEMBERS 4
  MAXDATAFILES 1000
  MAXINSTANCES 10
  MAXLOGHISTORY 1168
  CHARACTER SET UTF8
  DATAFILE ‘/u01/oradata/TPL_DB/datafile/datafile/system_01.dbf’ size 500M autoextend on next 10M maxsize unlimited extent management local
  SYSAUX datafile ‘/u01/oradata/TPL_DB/datafile/datafile/sysaux_01.dbf’ size 300M
  UNDO tablespace UNDO_TS01 datafile ‘/u01/oradata/TPL_DB/datafile/datafile/undo_ts01_01.dbf’ size 500M
  default temporary tablespace temp tempfile ‘/u01/oradata/TPL_DB/datafile/datafile/temp_ts01_01.dbf’ size 500M;

@$ORACLE_HOME/rdbms/admin/catalog.sql
@$ORACLE_HOME/rdbms/admin/catproc.sql

create tablespace tstools01
DATAFILE ‘/u01/oradata/TPL_DB/datafile/tstools01_01.dbf’ size 512M
extent management local uniform size 512k
segment space management auto;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s