Home » RDBMS Server » Server Utilities » Constraint Creation
Constraint Creation [message #74068] Thu, 02 September 2004 00:34 Go to next message
Avra
Messages: 65
Registered: July 2004
Member
Hi... Is it possible to view the DDL statement for constraint creation,that has been issued at the time of import?... Can I be able to view the details about the constraint from a .dmp file without importing it in oracle?.... Pls help

thanks
Re: Constraint Creation [message #74071 is a reply to message #74068] Thu, 02 September 2004 03:31 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
use the indexfile option.
bash-2.03$  imp dbadmin/password file=expdat.dmp indexfile=somefile.sql fromuser=dbadmin touser=dbadmin

Import: Release 9.2.0.4.0 - Production on Thu Sep 2 07:33:14 2004

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.4.0 - Production

Export file created by EXPORT:V09.02.00 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses WE8ISO8859P1 character set (possible charset conversion)
. . skipping table "A"

. . skipping table "B"

. . skipping table "BONUS"

. . skipping table "DEPT"

. . skipping table "EMP"

. . skipping table "SALGRADE"

Import terminated successfully without warnings.
bash-2.03$ cat somefile.sql

REM  CREATE TABLE "DBADMIN"."A" ("ID" NUMBER) PCTFREE 10 PCTUSED 40
REM  INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST
REM  GROUPS 1) TABLESPACE "USERS" LOGGING NOCOMPRESS ;
REM  ... 0 rows
REM  CREATE TABLE "DBADMIN"."B" ("ID" NUMBER) PCTFREE 10 PCTUSED 40
REM  INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST
REM  GROUPS 1) TABLESPACE "USERS" LOGGING NOCOMPRESS ;
REM  ... 0 rows
REM  CREATE TABLE "DBADMIN"."BONUS" ("ENAME" VARCHAR2(10), "JOB"
REM  VARCHAR2(9), "SAL" NUMBER, "COMM" NUMBER) PCTFREE 10 PCTUSED 40
REM  INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST
REM  GROUPS 1) TABLESPACE "USERS" LOGGING NOCOMPRESS ;
REM  ... 0 rows
REM  CREATE TABLE "DBADMIN"."DEPT" ("DEPTNO" NUMBER(2, 0), "DNAME"
REM  VARCHAR2(14), "LOC" VARCHAR2(13)) PCTFREE 10 PCTUSED 40 INITRANS 1
REM  MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1)
REM  TABLESPACE "USERS" LOGGING NOCOMPRESS ;
REM  ... 4 rows
REM  ALTER TABLE "DBADMIN"."DEPT" ADD PRIMARY KEY ("DEPTNO") USING INDEX
REM  PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1
REM  FREELIST GROUPS 1) TABLESPACE "USERS" LOGGING ENABLE ;
REM  CREATE TABLE "DBADMIN"."EMP" ("EMPNO" NUMBER(4, 0), "ENAME"
REM  VARCHAR2(10), "JOB" VARCHAR2(9), "MGR" NUMBER(4, 0), "HIREDATE" DATE,
REM  "SAL" NUMBER(7, 2), "COMM" NUMBER(7, 2), "DEPTNO" NUMBER(2, 0))
REM  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536
REM  FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "USERS" LOGGING NOCOMPRESS ;
REM  ... 14 rows
REM  ALTER TABLE "DBADMIN"."EMP" ADD PRIMARY KEY ("EMPNO") USING INDEX
REM  PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1
REM  FREELIST GROUPS 1) TABLESPACE "USERS" LOGGING ENABLE ;
REM  CREATE TABLE "DBADMIN"."SALGRADE" ("GRADE" NUMBER, "LOSAL" NUMBER,
REM  "HISAL" NUMBER) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
REM  STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE
REM  "USERS" LOGGING NOCOMPRESS ;
REM  ... 5 rows

Previous Topic: Import 8i to 8 personnel edition
Next Topic: Import/Export
Goto Forum:
  


Current Time: Wed Jul 03 17:18:18 CDT 2024