Manejo de oracle

Páginas: 4 (969 palabras) Publicado: 22 de diciembre de 2010
---------- CREACION DE ESQUEMA Y TABLESPACE ------------------

CREATE TABLESPACE "FERNANDEZ_DATA"
LOGGING
DATAFILE 'C:\ORACLE\ORADATA\OR92\FERNANDEZ_DATA1.ora' SIZE 50M
REUSE AUTOEXTEND
ONNEXT 10240K MAXSIZE 32767M EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLESPACE "FERNANDEZ_INDEX"
LOGGING
DATAFILE 'C:\ORACLE\ORADATA\OR92\FERNANDEZ_INDEX1.ora' SIZE 50M
REUSEAUTOEXTEND
ON NEXT 10240K MAXSIZE 32767M EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO;

CREATE USER "FERNANDEZ" PROFILE "DEFAULT"
IDENTIFIED BY "FERNANDEZ" DEFAULT TABLESPACE"FERNANDEZ_DATA"
TEMPORARY TABLESPACE "TEMP"
QUOTA UNLIMITED ON "FERNANDEZ_DATA"
QUOTA UNLIMITED ON "FERNANDEZ_INDEX"
QUOTA UNLIMITED ON "TEMP"
ACCOUNT UNLOCK;
GRANT "CONNECT" TO "FERNANDEZ";
GRANT"RESOURCE" TO "FERNANDEZ";
REVOKE UNLIMITED TABLESPACE FROM "FERNANDEZ";

-------------CREACION DE TABLAS-----------------------------

create table FERNANDEZ.FE1_MECANICA(
cod_meca_pk numberconstraint nn_FE1MEC01 not null,
tx_nombre varchar2(400) constraint nn_FE1MEC02 not null,
tx_direccion varchar2(400) constraint nn_FE1MEC03 not null,
tx_esta number constraint nn_FE1MEC04 not null
);create index IX_FE1MEC01 ON FERNANDEZ.FE1_MECANICA
(cod_meca_pk);

comment on table FERNANDEZ.FE1_MECANICA IS 'Informacion acerca de la mecanica';
comment on columnFERNANDEZ.FE1_MECANICA.COD_MECA_PK IS 'Codigo de Mecanica';
comment on column FERNANDEZ.FE1_MECANICA.TX_NOMBRE IS 'Nombre de Mecanica';
comment on column FERNANDEZ.FE1_MECANICA.TX_DIRECCION IS 'Direccion de Mecanica';comment on column FERNANDEZ.FE1_MECANICA.TX_ESTA IS 'Estado de Mecanica';

create table FERNANDEZ.FE2_MECANICOS(
cod_meco_pk number constraint nn_FE2MEC01 not null,
cod_meca_pk number,
tx_apeMatvarchar2(400) constraint nn_FE2MEC02 not null,
tx_apePat varchar2(400) constraint nn_FE2MEC03 not null,
num_telefono number constraint nn_FE2MEC04 not null
);

create index IX_FE2MEC01 ON...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Manejo de fechas oracle-sql server
  • Guia Y Manejo De Oracle Application Express
  • ORACLE
  • Oracle
  • Oracle
  • oracle
  • Oracle
  • Oracle

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS