Thursday, November 9, 2017

Simple db creation script

1. copy dbf file in oradata from backup


STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "OIDDB" RESETLOGS  NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 5
    MAXDATAFILES 500
    MAXINSTANCES 1
    MAXLOGHISTORY 1815
LOGFILE
  GROUP 1 (
    '/oradata/oiddb/log10a.log',
    '/oradata/oiddb/log10b.log'
  ) SIZE 10M,
  GROUP 2 (
    '/oradata/oiddb/log20a.log',
    '/oradata/oiddb/log20b.log'
  ) SIZE 10M
-- STANDBY LOGFILE
DATAFILE
  '/oradata/oiddb/system01.dbf',
  '/oradata/oiddb/sysaux01.dbf',
  '/oradata/oiddb/undotbs01.dbf',
  '/oradata/oiddb/users01.dbf'
CHARACTER SET US7ASCII;
ALTER DATABASE OPEN RESETLOGS;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp02.dbf'
     SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp01.dbf'
     SIZE 2000M REUSE AUTOEXTEND OFF;
ALTER TABLESPACE TEMP ADD TEMPFILE '/oradata/oiddb/temp03.dbf'
     SIZE 2000M REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--

No comments: