domingo, 23 de noviembre de 2014

Creando una base de datos manualmente

Creando una base de datos manualmente en linux
  • Establecer el ORACLE_SID

export ORACLE_SID=dbtest

  • Crear el archivo de parametros de inicialización

en linux/unix se crea en la carpeta
$ORACLE_HOME/dbs

cat initdbtest.ora
##############################################################################
# Example INIT$ORACLE_SID.ORA file
#
# This file is provided by Oracle Corporation to help you start by providing
# a starting point to customize your RDBMS installation for your site.
#
# NOTE: The values that are used in this file are only intended to be used
# as a starting point. You may want to adjust/tune those values to your
# specific hardware and needs. You may also consider using Database
# Configuration Assistant tool (DBCA) to create INIT file and to size your
# initial set of tablespaces based on the user input.
###############################################################################

# Change '<ORACLE_BASE>' to point to the oracle base (the one you specify at
# install time)

db_name='dbtest'
memory_target=1G
processes = 150
audit_file_dest='/u01/app/oracle/admin/dbtest/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_create_file_dest=+DATA
db_recovery_file_dest=+FRA
db_recovery_file_dest_size=2G
diagnostic_dest='/u01/app/oracle'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
# You may want to ensure that control files are created on separate physical
# devices
control_files='+DATA','+FRA'

  • Crear el directorio audit_file_dest
en $ORACLE_BASE/admin/$ORACLE_SID/adump
mkdir /u01/app/oracle/admin/dbtest/adump

  • Iniciar la instancia
SQL> startup nomount

En caso de que se utilice Oracle Managed Files se debe definir el parametro
db_create_file_dest=+DATA en el archivo de parametros de inicialización para poder simplificar el trabajo de la siguiente manera.

SQL> CREATE DATABASE dbtest
USER SYS IDENTIFIED BY oracle_4U
USER SYSTEM IDENTIFIED BY oracle_4U
EXTENT MANAGEMENT LOCAL
DEFAULT TEMPORARY TABLESPACE temp
UNDO TABLESPACE undotbs1
DEFAULT TABLESPACE users;

Database created.

https://docs.oracle.com/cd/B28359_01/server.111/b28310/create003.htm#ADMIN11073

No hay comentarios.:

Publicar un comentario