Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: imp 00038 when modifying exp file and running imp

Re: imp 00038 when modifying exp file and running imp

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sun, 11 Apr 1999 22:52:19 +0200
Message-ID: <923864067.18763.0.rover.d4ee154e@news.demon.nl>


Hi Brian,

From your description I understand you need to edit the DDL. Why not have imp creating a file with all DDL commands. The easiest way to do this is running imp with the following command line

imp <username/pwd> file=/expdat.dmp full=y show=y log=<any file name> This file will contain all DDL commands, and only needs minor editing. Alternatively, you could consider using the utility by Steve Hauser, uglyDDL, which he has advertised several times in this newsgroup. It appears, also from this newsgroup, the first few characters of the export file contain info about the character set the file is written in. I can understand imp starts complaining as soon as it doesn't find this info in the file.

Hth,

Sybrand Bakker, Oracle DBA
Viewer wrote in message <7equ41$rf7$1_at_news3.spacestar.net>...
>
>Viewer wrote in message <7eqk44$iid$1_at_news3.spacestar.net>...
>>Fellow DBA's,
>>
>>I know this isn't supported by Oracle (what fun things are?) but I want to
>>modify an export file
>>and then run it through imp. On the export I tell it I only want the DDL,
>>grants etc, not the actual data.
>>I then edit the file and even if I change just one letter and save it I
get
>>the following when I try
>>to imp.
>>
>>Import file: ./expdat.dmp >
>>Enter insert buffer size (minimum is 4096) 30720>
>>IMP-00038: Could not find environment character set handle
>>IMP-00021: operating system error - error code (dec 2, hex 0x2)
>>IMP-00000: Import terminated unsuccessfully
>>
>>My question is how does Oracle know I've changed the file? How can I get
>>around this? What I'm trying
>>to do here is to revoke selects on objects going through import. I know
>that
>>I could do the password
>>switcharoo and do it this way but in a 7*24 database the users aren't to
>>happy with having their
>>passwords changed in the middle of the day.
>>
>>Thanks
>
>
>After I posted this I wrote a better description of what's happening. Here
>it is:
>
>
>I have a file generated by an Oracle utility export. It is an ascii file
>and when I change even one character in the
>file it becomes invalid for use in import.
>
>Here's the file as it appears with cat -v after I export it from the
>database.
>
>^C^@^AEXPORT:V07.03.03
>DORACLE
>RTABLES
>1024
>0
>^@ Sun Apr 11
>14:22:54 1999
>CONNECT OPS$ORACLE
>TABLE "INFTPGM"
>CREATE TABLE "INFTPGM" ("PGM_ID" NUMBER(5, 0), "PRJ_ID" NUMBER(5, 0) NOT
>NULL, "PGM_CREATE_NM" VARCHAR2(25), "PGM_CMPLT_TIME"
>DATE, "PGM_UNIX_EXE_TXT" VARCHAR2(50) NOT NULL, "PGM_UNIX_EXE_PARAM"
>VARCHAR2(256), "PGM_SCHD_RQST_FLG" CHAR(1), "PGM_SCHD_S
>TART_TYP" CHAR(1) NOT NULL, "PGM_SCHD_ENV_TYP" CHAR(1) NOT NULL,
"PGM_DB_ID"
>NUMBER(2, 0) NOT NULL) PCTFREE 10 PCTUSED 40 IN
>ITRANS 1 MAXTRANS 255 STORAGE(INITIAL 3153920 NEXT 1048576 MINEXTENTS 1
>MAXEXTENTS 121 PCTINCREASE 0 FREELISTS 1 FREELIST GRO
>UPS 1) TABLESPACE "TOOLS"
>ENDTABLE
>ENDTABLE
>EXIT
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
>
>
>And here's the file right after I change even one character:
>
>^C^AEXPORT:V07.03.03
>DORACLE
>RTABLES
>1024
>0
> Sun Apr 11
>14:22:54 1999
>CONNECT OPS$ORACLE
>TABLE "NFTPGM"
>CREATE TABLE "INFTPGM" ("PGM_ID" NUMBER(5, 0), "PRJ_ID" NUMBER(5, 0) NOT
>NULL, "PGM_CREATE_NM" VARCHAR2(25), "PGM_CMPLT_TIME"
>DATE, "PGM_UNIX_EXE_TXT" VARCHAR2(50) NOT NULL, "PGM_UNIX_EXE_PARAM"
>VARCHAR2(256), "PGM_SCHD_RQST_FLG" CHAR(1), "PGM_SCHD_S
>TART_TYP" CHAR(1) NOT NULL, "PGM_SCHD_ENV_TYP" CHAR(1) NOT NULL,
"PGM_DB_ID"
>NUMBER(2, 0) NOT NULL) PCTFREE 10 PCTUSED 40 IN
>ITRANS 1 MAXTRANS 255 STORAGE(INITIAL 3153920 NEXT 1048576 MINEXTENTS 1
>MAXEXTENTS 121 PCTINCREASE 0 FREELISTS 1 FREELIST GRO
>UPS 1) TABLESPACE "TOOLS"
>ENDTABLE
>ENDTABLE
>EXIT
>
>
>Notice that as after I saved the modified file the ^@ character is missing.
>Also, when I go to do a wq in vi on the
>file after making the change I get:
>
>tryme.dmp" File exists - use "w! tryme.dmp" to overwrite
>
>This is strange to me since I own the file and have made sure that before I
>made any
>changes that the permissions were set to 777. What's happenning here?
>
>Thanks for any help!
>
>Brian Motzer
>Senior Oracle DBA
>
>
>
>
>
>
>
>
>
>
Received on Sun Apr 11 1999 - 15:52:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US