0% found this document useful (0 votes)
44 views

Database Creation - Test3: Define Show Parameter DB - Name Echo $ORACLE - SID

The document provides steps to create a database named TEST3 including: 1) Creating the database and configuring initialization parameters 2) Creating tablespaces and setting the default tablespace 3) Running catalog scripts to create default tables and views 4) Importing data and running catalog cleanup utilities 5) Configuring the database in archive log mode and opening it for use.

Uploaded by

majesdras77
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Database Creation - Test3: Define Show Parameter DB - Name Echo $ORACLE - SID

The document provides steps to create a database named TEST3 including: 1) Creating the database and configuring initialization parameters 2) Creating tablespaces and setting the default tablespace 3) Running catalog scripts to create default tables and views 4) Importing data and running catalog cleanup utilities 5) Configuring the database in archive log mode and opening it for use.

Uploaded by

majesdras77
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

DATABASE CREATION – TEST3

1 Create the database

1.1 Criar o BD.


1- Dropar o banco que estava sendo usado para teste;
shutdown immediate;
startup nomount
alter database mount exclusive;
alter system enable restricted session;
define
show parameter db_name
echo $ORACLE_SID
drop database;

Arrumar o init.ora Segundo configuraçao de um banco 9i


3- Criar o banco;
startup nomount pfile=’/oracle/product/9.2.0.5/dbs/initTEST3.ora’;
spool createDB.log;
set time on;
set echo on;
create database TEST3
logfile GROUP 1 ('/db013/stage/redo01/TEST3/TEST3.redo_01a.log',
'/db013/stage/redo02/TEST3/TEST3.redo_01b.log') SIZE 50M,
GROUP 2 ('/db013/stage/redo01/TEST3/TEST3.redo_02a.log',
'/db013/stage/redo02/TEST3/TEST3.redo_02b.log') SIZE 50M,
GROUP 3 ('/db013/stage/redo01/TEST3/TEST3.redo_03a.log',
'/db013/stage/redo02/TEST3/TEST3.redo_03b.log')SIZE 50M,
GROUP 4 ('/db013/stage/redo01/TEST3/TEST3.redo_04a.log',
'/db013/stage/redo02/TEST3/TEST3.redo_04b.log')SIZE 50M
character set WE8ISO8859P1
national character set utf8
datafile '/db013/stage/db01/TEST3/TEST3.TS_SYSTEM_01.dbf'
size 500M
extent management local
undo tablespace UNDO_01
datafile '/db013/stage/db03/TEST3/TEST3.TS_UNDO_01.dbf'
SIZE 300M REUSE AUTOEXTEND OFF
default temporary tablespace temp
tempfile '/db013/stage/db02/TEST3/TEST3.TS_TEMP_01_01.dbf'
SIZE 300M REUSE AUTOEXTEND OFF;

db_creation_steps.doc Template Version 1 Last Updated: 12/8/2021 1


alter user sys identified by use4dba0nly;
alter user system identified by use4dba0nly;

CREATE TABLESPACE TOOLS LOGGING


DATAFILE '/db013/stage/db02/TEST3/TEST3.TS_TOOLS_01.dbf'
SIZE 100M AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K
SEGMENT SPACE MANAGEMENT AUTO;

CREATE TABLESPACE USERS LOGGING


DATAFILE '/db013/stage/db02/TEST3/TEST3.TS_USERS_01.dbf'
SIZE 100M AUTOEXTEND OFF
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K
SEGMENT SPACE MANAGEMENT AUTO;

ALTER DATABASE DEFAULT TABLESPACE USERS;

4- Criar o catalog;

IMPORTANT PATHS:
/oracle/product/9.2.0.5/rdbms/admin

@/oracle/product/9.2.0.5/rdbms/admin/catoctk.sql

spool createDBCatalog.log
select “start : “|| to_char(sysdate, “DD/MM/YYYY HH24:MI:SS”) start_date
from dual
/
@catalog.sql; ( @?/rdbms/admin/catalog.sql)(?=oracle home)
@catblock.sql; (@?/rdbms/admin/catblock.sql)
@catproc.sql; (@?/rdbms/admin/catproc.sql)
@catoctk.sql; (@?/rdbms/admin/catoctk.sql)
@owminst.plb; (@?/rdbms/admin/owminst.plb)
select “start : “|| to_char(sysdate, “DD/MM/YYYY HH24:MI:SS”) start_date
from dual
/
spool off;
db_creation_steps.doc Template Version 1.0 Last Updated: 12/8/2021
IBM – SPRINT account
2
connect SYSTEM/use4dba0nly
set echo on
@?/sqlplus/admin/pupbld.sql;
@?/sqlplus/admin/help/hlpbld.sql

Shutdown immediate;
startup;
select “utl_recomp_begin: “|| to_char(sysdate, “HH:MI:SS”) from dual;
execute utl_recomp.recomp_serial();
select “utl_recomp_end .: “|| to_char(sysdate, “HH:MI:SS”) from dual;

7- Fazer o import:
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
echo $NLS_LANG
imp system file= TEST3exp.dmp1 log=imp_FULL_TEST3_1.log full=y
ignore=Y

9- Rodar o utlrp;
@?/rdbms/admin/utlrp

12- Colocar o banco em modo archive;

shutdown immediate;
startup mount exclusive;
alter database archivelog;
alter database open;

2 Configure the listener and test the service.

tdah0776.test.sprint.com
a2i4900/Marcelo29

db_creation_steps.doc Template Version 1.0 Last Updated: 12/8/2021


IBM – SPRINT account
3

You might also like