ORA-39002: invalid operation
I am using expdp, replacing the scripts of the exp.I get these error lines:
ORA-39002: invalid operation
ORA-39070: unable to open the log file.
ORA-29283: invalid file operation
My expdp order:
Directory of dumpfile = test.dmp for = export_meta content = metadata_only expdp system
Yes.CREATE DIRECTORY does not create the directory export_meta to you on disk.
Tags: Database
Similar Questions
-
The DDL extract fail with ORA-30511: invalid operation of DDL TRIGGER system
Hello
When I tried to do all DDL operation I can see the following trace in ggs_ddl_trace.log with the trace level 2.
It does not insert record in the GGS_DDL_HIST table.
everything seems only when ddl_status.sql has been run...
DDL replication is not the case.
Help, please.
SESS 30445-2012-04-12 11:16:09: DDL: start YVERT found [1147628]
SESS 30445-2012-04-12 11:16:09: DDL: object ID is [74635]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1: before: point in execution = [4]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: inString =]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1:
[SESS 30445-2012-04-12 11:16:09: DDLTRACE1:], type = target [0] = [1]
SESS 30445-2012-04-12 11:16:09: DDLTRACE2: insertToMarker: optype marker = [0], current_fragment = [0]
SESS 30445-2012-04-12 11:16:09: DDLTRACE2: insertToMarker: added the fragment part * 1 *]
SESS 30445-2012-04-12 11:16:09: DDLTRACE2:
[[SESS 30445-2012-04-12 11:16:09: DDLTRACE2:], new current fragment [], new length of it]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1: itemHeader: MD_TAB_DDLSTATEMENT (key1 = key2 [] = []) = [change the 'GGUSER' table. ["' Adds YASEEN" (column2 VARCHAR2 (30))], itemMode = [0]
SESS 30445-2012-04-12 11:16:09: DDLTRACE2: escape_string: retVal = ['alter table 'GGUSER'.] ["" YASEEN ' add\ (VARCHAR2\ (30\)------) of Column2 ']
SESS 30445-2012-04-12 11:16:09: DDLTRACE2: itemHeader: retVal = [, G1 =' alter table 'GGUSER'.] ["" YASEEN ' add\ (VARCHAR2\ (30\)------) of Column2 ',]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: inString =]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1:, G1 =' alter table 'GGUSER '. "" YASEEN ' add\ (column2 VARCHAR2\ (30\)------) ',
[SESS 30445-2012-04-12 11:16:09: DDLTRACE1:], type = target [4] = [1]
SESS 30445-2012-04-12 11:16:09: DDLTRACE2: insertToMarker: optype marker = [4], current_fragment = [0]
SESS 30445-2012-04-12 11:16:09: DDLTRACE2: insertToMarker: added the fragment part * 2 *]
SESS 30445-2012-04-12 11:16:09: DDLTRACE2:, G1 =' alter table 'GGUSER '. "" YASEEN ' add\ (column2 VARCHAR2\ (30\)------) ',
[SESS 30445-2012-04-12 11:16:09: DDLTRACE2:], new ongoing fragment [, G1 =' alter table 'GGUSER'.] ["" YASEEN ' add\ (VARCHAR2\ (30\)------) of Column2 ',], new length of it [66]
[SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: total_fragments =]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: total_fragments (in a loop) = [1]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: fragment # = [1] fragment = [, G1 =' alter table 'GGUSER'.] ["" YASEEN ' add\ (VARCHAR2\ (30\)------) of Column2 ',]
SESS 30445-2012-04-12 11:16:09: DDLTRACE1: insertToMarker: insertion in the history, objid [74635]
SESS 30445-2012-04-12 11:16:09: DDL: insertToMarker: ORA-30511: invalid DDL operation in the system triggers
SESS 30445-2012-04-12 11:16:09: DDL: getTableInfo: ORA-30511: invalid DDL operation in the system triggers
* SESS 30445-2012-04-12 11:16:09: DDL: trigger sys. GGS_DDL_TRIGGER_BEFORE: processing error DDL operation [change the 'GGUSER' table. ["' Adds to the YASEEN" (VARCHAR2 (30)) Column2], error ORA-30511: invalid DDL operation in the system triggers, stack error: ORA-06512: at 'GGUSER '. DDLREPLICATION', line 2486 *.
ORA-06512: at line 833 level
SESS 30445-2012-04-12 11:16:09: DDL: cleaning sequence marker [17]
SESS 30445-2012-04-12 11:16:09: DDL: cleaned [2] marker table rows
SESS 30445-2012-04-12 11:16:09: DDL: cleaning sequence DDL [17]
SESS 30445-2012-04-12 11:16:09: DDL: cleaned [0] lines of the DDL tableHello
The recyclebin database is empty. Otherwise please purge the recyclebin and then try to make the changes.
Thank you
Kamal. -
Hello
I try to import a dump of a database of newly created on Red Hat Enterprise Linux AS release 4 (Nahant Update 3) Operating System
where an oracle 10G (10.2.0.1.0) is installed.
Database is fully operational, but impdp does not work:
Generated error is the following:
ORA-39002: invalid operation
ORA-39070: unable to open the log file.
ORA-39145: Directory object parameter must be specified and no zero
ImpDp command:
Impdp microwave/wavemark remap_tablespace = user: WMRK_DATA DUMPFILE = expdp_ProdDB_2_LOCALDB.dmp impdp_ProdDB_2_LOCALDB_rows_UWAVE.log = LOGFILE PARFILE = impdp_ProdDB_2_LOCALDB_rows_UWAVE.par
I am located in the following directory:
/ Home/Oracle/Backup/Import/Data
By files and Dump are in the same directory where I'm calling from the impdp.
I did my homework and studied the error and included the directory in the command:
Then I moved parfile it to the import directory
And I'm calling impdp to import as well
and my new command line
Impdp microwave/wavemark remap_tablespace = the users rΘpertoire: WMRK_DATA = DUMPFILE = expdp_ProdDB_2_LOCALDB.dmp impdp_ProdDB_2_LOCALDB_rows_UWAVE.log = LOGFILE PARFILE = data impdp_ProdDB_2_LOCALDB_rows_UWAVE.par
but I got this error
With partitioning, OLAP and Data Mining options
ORA-39002: invalid operation
ORA-39070: unable to open the log file.
ORA-39087: directory name DATA is not valid
Directory data are valid. (I put t know why oracle has shown is that caps in the error message)
and what about log file?
Any input would be much appreciatedHI Charlov,
It does not appear that you have created a 'directory' in the database.
Must also have the operator you use of the read/write permissions on the directory (given in the Oracle database).
Example:
SQL > create data directory under ' / data/oraback ';
Created directory.
SQL > grant read, write on directory microwave data;
Grant succeeded.
Hope that answers your question. Now you should be able to run your import by using the directory.
Ji li
-
Impdp deliver oracle 10g express - ORA-39002, 39070 29283, 06512 29283
Dear all,
I have the following problem, try to import a dump:
D:\COSMOS_BATCH_RUNNER\Automation_oracle\Scripts\IMPORT DMP > impdp ses17/ses17 di
rectory = DMPDIR dumpfile = ses17.dmp
Import: Release 10.2.0.1.0 - Production on Friday, November 26, 2010 09:45:10
Copyright (c) 2003, 2005, Oracle. All rights reserved.
ConnectΘ α: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
ORA-39002: invalid opΘration-> invalid operation
ORA-39070: opening of the impossible logfile-> could not open the log file
ORA-29283: invalid opΘration on the file-> invalid operation on file
ORA-06512: Α 'SYS. UTL_FILE", line 475
ORA-29283: invalid opΘration on the file
I created a DMPDIR and issued read and write right to ses17 of the user before importing the dump.
When I have a look at the security of the folder referenced by DMPDIR, I must also have read and write access to it. (in windows when I right click on the folder-> properties-> Security (reading and writing are crossed).)
No idea how to import the dump file?
Thanks in advance,
ThomasAre what OS you on.
On Windows server, it may be that the user cannot write to this directory because of the restrictions of the user.
The error is generated because he wants to write a log file to the location of the DIRECTORY.Check also if UTL_FILE_DIR includes the directory entry (post its value here)
Workaround solution:
-Move the file to another directory and work from there
-
Hi gurus of the Oracle,.
Our version of oracle's 11 g RAC 2.
We write records into a file using utl_file.
According to the request, data should write to 160 files.
After writing to 50 records, his mistake to launch. as
BEGIN PROC_WRITE_TO_FILE; END;
*
ERROR on line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS." UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at "TEST. PROC_WRITE_TO_FILE', line 130 '.
ORA-06512: at line 1
SQL > SP2-0103: nothing in the SQL buffer to run.
My procedure is
-DECLERATION
BEGIN
OPEN C2;
LOOP
EXTRACT THE C2 IN P_WRITE;
WHEN THE EXIT C2% NOTFOUND;
L_NAME: = "WRITE" | P_WRITE | » _. TXT';
L_FILE: = UTL_FILE. FOPEN (L_DIR, L_NAME, 'W');
OPEN C1 (P_WRITE);
LOOP
FETCH C1 INTO P_OD_PLACE, P_OD_USER, P_ED_PERF, P_GM_LST, P_GM_FIRST, P_GM_MOD, P_GM_SUFF, P_BD_NUM, P_BD_FRET, P_BD_UNIT, P_BD_GOLE, P_BD_GEP, P_DAT_BOD, P_DAT_EFF, P_ED_RACE, P_ED_GENDER, P_LAND_DIST, P_LAND_LOT, P_ED_STAT_REASON ,P_OD_PRECINCT,P_OD_JANI_PREC,P_NB_PIST_CNG,P_NB_PIST_SEN,P_NB_PIST_VASER,P_NB_PIST_JUD,P_NB_PIST_COMMI,P_NB_PIST_SCHOL,P_NB_PIST_WD,P_NB_PIST_JANIB,P_NB_PIST_JANIC,P_NB_PIST_FIRE,P_NB_PIST_SCHOB,P_NB_PIST_SUPCM,P_NB_PIST_WATBD,P_NB_PIST_GOLEL P_GM_NAME, P_ED_JANI_CODE, P_DAT_ACCEPT, P_DAT_CHANGED, P_OD_COMBO, P_TX_DESC, P_DAT_LST_CTT, P_BD_NUM2, P_BD_FRET1, P_BD_UNIT2, P_BD_GOLE2, P_BD_ST, P_BD_GEP5, P_BD_GEP4, P_BD_FRET2, P_BD_FRET3, P_BD_COUNTRY;
WHEN EXIT C1% NOTFOUND;
UTL_FILE. PUT_LINE (L_FILE, P_OD_PLACE: ' |) ' || P_OD_USER |' | ' || P_ED_PERF |' | ' || P_GM_LST |' | ' || P_GM_FIRST |' | ' || P_GM_MOD |' | ' || P_GM_SUFF |' | ' || P_BD_NUM |' | ' || P_BD_FRET |' | ' || P_BD_UNIT |' | ' || P_BD_GOLE |' | ' || P_BD_GEP |' | ' || P_DAT_BOD |' | ' || P_DAT_EFF |' | ' || P_ED_RACE |' | ' || P_ED_GENDER |' | ' || P_LAND_DIST |' | ' || P_LAND_LOT |' | ' || P_ED_STAT_REASON |' | ' || P_OD_PRECINCT |' | ' || P_OD_JANI_PREC |' | ' || P_NB_PIST_CNG |' | ' || P_NB_PIST_SEN |' | ' || P_NB_PIST_VASER |' | ' || P_NB_PIST_JUD |' | ' || P_NB_PIST_COMMI |' | ' || P_NB_PIST_SCHOL |' | ' || P_NB_PIST_WD |' | ' || P_NB_PIST_JANIB |' | ' || P_NB_PIST_JANIC |' | ' || P_NB_PIST_FIRE |' | ' || P_NB_PIST_SCHOB |' | ' || P_NB_PIST_SUPCM |' | ' || P_NB_PIST_WATBD |' | ' || P_NB_PIST_GOLEL |' | ' || P_GM_NAME |' | ' || P_ED_JANI_CODE |' | ' || P_DAT_ACCEPT |' | ' || P_DAT_CHANGED |' | ' || P_OD_COMBO |' | ' || P_TX_DESC |' | ' || P_DAT_LST_CTT |' | ' || P_BD_NUM2 |' | ' || P_BD_FRET1 |' | ' || P_BD_UNIT2 |' | ' || P_BD_GOLE2 |' | ' || P_BD_ST |' | ' || P_BD_GEP5 |' | ' || P_BD_GEP4 |' | ' || P_BD_FRET2 |' | ' || P_BD_FRET3 |' | ' || P_BD_COUNTRY);
UTL_FILE. FFLUSH (L_FILE);
END LOOP;
CLOSE C1;
END LOOP;
CLOSE C2;
UTL_FILE. FCLOSE (L_FILE);
END;
/
Appreciate your suggestions.
Thank you and best regards,
REDA
You understand, but you can't do it? What? Move a single line in the right place?
* sigh * I wish I was your code monkey...
-DECLERATION
BEGIN
OPEN C2;
LOOP
EXTRACT THE C2 IN P_WRITE;
WHEN THE EXIT C2% NOTFOUND;
L_NAME: = "WRITE" | P_WRITE | » _. TXT';
L_FILE: = UTL_FILE. FOPEN (L_DIR, L_NAME, 'W');
OPEN C1 (P_WRITE);
LOOP
FETCH C1 INTO P_OD_PLACE, P_OD_USER, P_ED_PERF, P_GM_LST, P_GM_FIRST, P_GM_MOD, P_GM_SUFF, P_BD_NUM, P_BD_FRET, P_BD_UNIT, P_BD_GOLE, P_BD_GEP, P_DAT_BOD, P_DAT_EFF, P_ED_RACE, P_ED_GENDER, P_LAND_DIST, P_LAND_LOT, P_ED_STAT_REASON ,P_OD_PRECINCT,P_OD_JANI_PREC,P_NB_PIST_CNG,P_NB_PIST_SEN,P_NB_PIST_VASER,P_NB_PIST_JUD,P_NB_PIST_COMMI,P_NB_PIST_SCHOL,P_NB_PIST_WD,P_NB_PIST_JANIB,P_NB_PIST_JANIC,P_NB_PIST_FIRE,P_NB_PIST_SCHOB,P_NB_PIST_SUPCM,P_NB_PIST_WATBD,P_NB_PIST_GOLEL P_GM_NAME, P_ED_JANI_CODE, P_DAT_ACCEPT, P_DAT_CHANGED, P_OD_COMBO, P_TX_DESC, P_DAT_LST_CTT, P_BD_NUM2, P_BD_FRET1, P_BD_UNIT2, P_BD_GOLE2, P_BD_ST, P_BD_GEP5, P_BD_GEP4, P_BD_FRET2, P_BD_FRET3, P_BD_COUNTRY;
WHEN EXIT C1% NOTFOUND;
UTL_FILE. PUT_LINE (L_FILE, P_OD_PLACE: ' |) ' || P_OD_USER |' | ' || P_ED_PERF |' | ' || P_GM_LST |' | ' || P_GM_FIRST |' | ' || P_GM_MOD |' | ' || P_GM_SUFF |' | ' || P_BD_NUM |' | ' || P_BD_FRET |' | ' || P_BD_UNIT |' | ' || P_BD_GOLE |' | ' || P_BD_GEP |' | ' || P_DAT_BOD |' | ' || P_DAT_EFF |' | ' || P_ED_RACE |' | ' || P_ED_GENDER |' | ' || P_LAND_DIST |' | ' || P_LAND_LOT |' | ' || P_ED_STAT_REASON |' | ' || P_OD_PRECINCT |' | ' || P_OD_JANI_PREC |' | ' || P_NB_PIST_CNG |' | ' || P_NB_PIST_SEN |' | ' || P_NB_PIST_VASER |' | ' || P_NB_PIST_JUD |' | ' || P_NB_PIST_COMMI |' | ' || P_NB_PIST_SCHOL |' | ' || P_NB_PIST_WD |' | ' || P_NB_PIST_JANIB |' | ' || P_NB_PIST_JANIC |' | ' || P_NB_PIST_FIRE |' | ' || P_NB_PIST_SCHOB |' | ' || P_NB_PIST_SUPCM |' | ' || P_NB_PIST_WATBD |' | ' || P_NB_PIST_GOLEL |' | ' || P_GM_NAME |' | ' || P_ED_JANI_CODE |' | ' || P_DAT_ACCEPT |' | ' || P_DAT_CHANGED |' | ' || P_OD_COMBO |' | ' || P_TX_DESC |' | ' || P_DAT_LST_CTT |' | ' || P_BD_NUM2 |' | ' || P_BD_FRET1 |' | ' || P_BD_UNIT2 |' | ' || P_BD_GOLE2 |' | ' || P_BD_ST |' | ' || P_BD_GEP5 |' | ' || P_BD_GEP4 |' | ' || P_BD_FRET2 |' | ' || P_BD_FRET3 |' | ' || P_BD_COUNTRY);
UTL_FILE. FFLUSH (L_FILE);
END LOOP;
CLOSE C1;
UTL_FILE. FCLOSE (L_FILE);
END LOOP;
CLOSE C2;
END;
/
-
Case with where clause - ORA-00920: invalid relational operator
Hi all, when I try to run the following query, I get the following error...
ORA-00920: invalid relational operator
00920 00000 - "invalid relational operator.
* Cause:
* Action:
Error on line: column 16: 5
Anyone know what the problem with my request? Thanks in advance.
SELECT concat (year, period)
OF DD_ACTUALS_FACT
CASE WHERE period
WHEN 'JAN' THEN '01'
WHEN 'FEB' THEN '02'
WHEN 'MAR' THEN ' 03 "
WHEN "APR" THEN ' 04 "
WHEN 'CAN' THEN ' 05 "
WHEN "JUN" THEN '06'
WHEN 'JUL' THEN '07'
WHEN 'AUG' THEN '08'
WHEN 'MS' THEN '09'
WHEN 'OCT' THEN '10'
WHEN 'NOV' THEN '11'
WHEN 'DEC' THEN '12'
END as number 'months '.
ORDER OF CONCAT (year, number 'months') / / DESC
The problem is the number 'month' - you cannot give an "ACE" alias for an expression in a where clause clause.
You have not really given any condition, that a set of translations of period in a number.
Also, you didn't say what you're trying to do.
Maybe you want to:
SELECT concat (year, period)
OF DD_ACTUALS_FACT
WHERE something
ORDER OF CONCAT (year, period of the CASE
WHEN 'JAN' THEN '01'
WHEN 'FEB' THEN '02'
WHEN 'MAR' THEN ' 03 "
WHEN "APR" THEN ' 04 "
WHEN 'CAN' THEN ' 05 "
WHEN "JUN" THEN '06'
WHEN 'JUL' THEN '07'
WHEN 'AUG' THEN '08'
WHEN 'MS' THEN '09'
WHEN 'OCT' THEN '10'
WHEN 'NOV' THEN '11'
WHEN 'DEC' THEN '12'
END DESC)
/
-
Hello
I have a requirement to send the data in the table (retrieved via a select clause) through an email.
Here is the procedure that uses to send email that includes data from the table through trigger.
I don't find any problem during execution of the procedure and the relaxation.
but when inserting the data in table 1 (present to SCHEMA1 please refer to line 37 and 55) I get the following error and the message will not be delivered
ERRORS
ORA-29277: invalid SMTP Operation
ORA-06512: at "SYS." UTL_SMTP", LINE 55
ORA-06512: AT "SYS." UTL_SMTP", LINE 161
ORA-06512: AT "SYS." UTL_SMTP", LINE 452
ORA-06512: AT "SYS." UTL_SMTP", LINE 463
But when I remove the code from line 33 to 44
am able to send mail.
That is to say
/ * IMMEDIATE EXECUTION
"SELECT."
A.BATCHNO, B.PCSBOX, B.AMOUNT
Of
SCHEMA1. Table1: A, SChEMA2.TABLE2 B
WHERE
A.BATCHID = B.BATCHNO AND B.PRODOAID =' | PRODOAID
BULK COLLECT INTO BATCHNO, PCSBOX, AMOUNT;
FOR indx IN 1.BATCHNO. COUNTY
LOOP
UTL_SMTP. WRITE_DATA (A, BATCHNO (indx) |) ' -- '|| PCSBOX (indx) |' --' || Amount (indx) | UTL_TCP. CRLF);
END LOOP; */
I checked the sender and recipient addresses that they are fine.
so, this is my code
1 CREATE OR REPLACE PROCEDURE SEND_TABLE_DATA (FROMAD IN VARCHAR2: =' <[email protected]> ', )
TOAD 2 IN VARCHAR2: = ' < [email protected] > ',
3 under RESERVE IN VARCHAR2: = 'Data Table ',.
4 MESSAGE IN VARCHAR2: = "Dear all,
5 Docid : ' ,
DOCID 6 IN VARCHAR2,
DOCDT DATE 7.
8 PRODOAID IN NUMBER)
9, ACCORDING TO
10 TYPE NumList IS TABLE OF NUMBER;
11 TYPE NameList IS TABLE OF THE VARCHAR2 (32767).
12 BATCHNO NameList;
13 PCSBOX NumList;
AMOUNT 14 NumList;
15 SMTPHOST VARCHAR2 (255): = ' XX. XX. XX. XX ";
16. A UTL_SMTP. CONNECTION;
BEGIN 17
18 A: = UTL_SMTP. OPEN_CONNECTION(SMTPHOST,25);
19 UTL_SMTP. HELO (A, SMTPHOST);
20 UTL_SMTP. MAIL (A, FROMAD);
21 UTL_SMTP. RCPT (A, TOAD);
22 UTL_SMTP. OPEN_DATA (A);
UTL_SMTP 23. WRITE_DATA (A, UTL_TCP. CRLF);
24 UTL_SMTP. WRITE_DATA (A, UTL_TCP. CRLF. UTL_TCP. CRLF. UTL_TCP. CRLF);
25 UTL_SMTP. WRITE_DATA (, ' Date: ' |) TO_CHAR (SYSDATE, ' DD/MM/YYYY HH24:MI:SS'). UTL_TCP. CRLF);
26 UTL_SMTP. WRITE_DATA (, ' from: ' |) FROMAD | UTL_TCP. CRLF);
UTL_SMTP 27. WRITE_DATA (, ' from: ' |) TOAD | UTL_TCP. CRLF);
28 UTL_SMTP. WRITE_DATA (, ' subject: ' |) TOPIC | UTL_TCP. CRLF);
UTL_SMTP 29. WRITE_DATA (ONE, MESSAGE |) DOCID | "Documented on ' | DOCDT | UTL_TCP. CRLF);
30 UTL_SMTP. WRITE_DATA (A, UTL_TCP. CRLF. UTL_TCP. CRLF. UTL_TCP. CRLF);
UTL_SMTP 31. WRITE_DATA (A, "it's for your information" |) UTL_TCP. CRLF);
UTL_SMTP 32. WRITE_DATA (, ' BATCHNO ' |) ' -- '||' PCSBOX ' |' --' ||' AMOUNT '. UTL_TCP. CRLF);
33 IMMEDIATE EXECUTION
34 ' SELECT
35 A.BATCHNO, B.PCSBOX, B.AMOUNT
36 FROM
37 SCHEMA1. Table1: A, SChEMA2.TABLE2 B
38. WHERE THE
39 A.BATCHID = B.BATCHNO AND B.PRODOAID =' | PRODOAID
40 BULK COLLECT INTO BATCHNO PCSBOX, AMOUNT;
41 FOR indx IN 1.BATCHNO. COUNTY
42 LOOP
UTL_SMTP 43. WRITE_DATA (A, BATCHNO (indx) |) ' -- '|| PCSBOX (indx) |' --' || Amount (indx) | UTL_TCP. CRLF);
44 END OF LOOP;
UTL_SMTP 45. WRITE_DATA (A, CHR (13) |) CHR (13) | CHR (13));
UTL_SMTP 46. CLOSE_DATA (A);
UTL_SMTP 47. QUIT (A);
EXCEPTION OF 48
49 THEN THAN OTHERS THEN
50 UTL_SMTP. QUIT (A);
RAISE 51;
END 52;
53.
54, create or replace trigger trg_table_mail_sricity_prodoa
55 after insertion on SCHEMA1. TABLE1:
56 for each line
start at 57
(58) SENd_table_data
59 DOCID = >: new.docid,.
DOCDT 60 = >: new.docdt,.
PRODOAID 61 = >: new.prodoaid
(62);
end 63;
Can what changes I make to the code to meet my needs?
Please correct me if am wrong anywhere,
in the case where if a bad method used to send data (retrieved using a select clause)
Show me another method to achieve my requirement.
Thanks in advance,
Pradeep cordially.
Line 19 is not going. The HELO command is used to identify the SMTP client. The SMTP server knows its IP address and the host name. No need to tell him that via the HELO command. He wants to know who is the appellant. The order is intended to say "Hello, I am a customer
". "" See the SMTP RFC for more details. (and Yes, examples of the Oracle are wrong) Run immediately? Why? There is no true used dynamic SQL.
Collect in bulk? Why? There is not analysis or the treatment performed. Use a cursor loop FOR and call write data from the inside of the loop.
Also consider a fall 80's standard mainframe coding style (and abusing capital letters) and use modern standards that are common in Java. .NET, C/C++, etc. Specifically, as PL/SQL is derived and an implementation of the Ada language, look at Ada 95 quality and Style Guide for standards, and good logic.
-
SYS. Question UTL_FILE survey ORA-29283: invalid file operation
We have a cron to demand that gives the State of the database in our emails. Recently we have cloned the instance, and all by doing this, we bounced back the entire server.
After that we stopped getting emails of this instance. When I checked the crontab file and run the scripts manually. It showed the following error.
SQL > alter session SET smtp_out_server = "xxxx1:100";
declare
v_utl_filehandler UTL_FILE. TYPE_DE_FICHIER;
v_rawfile RAW (32767).
v_size NUMBER;
5 v_block NUMBER;
6 v_boolean BOOLEAN;
v_file_dir varchar2 (100);
7 8 v_transfer_location varchar2 (100): = "[email protected], [email protected], [email protected];
9 v_file_name varchar2 (100): = "mailattachment.doc";
10 starts
11 v_file_dir: = "MAIL_DIR";
12 v_utl_filehandler: = UTL_FILE. FOPEN (v_file_dir, v_file_name, "r");
13 UTL_FILE.fgetattr (v_file_dir, v_file_name, v_boolean, v_size, v_block);
14 UTL_FILE.get_raw (v_utl_filehandler, v_rawfile, v_size);
15 UTL_FILE. FCLOSE (v_utl_filehandler);
16
17 sys.utl_mail.send_attach_raw (sender = > '[email protected]')
18, recipients = > v_transfer_location
19, subject = > 'database of status of EBS UAT.
20, message = > "Dear Sir". CHR (13) | CHR (13) |
21 ' Please find attached file database state of EBS UAT. "| CHR (13) | CHR (13) |
22 'thank you ' | CHR (13) |
23 ' oracle@UATDB1'|| CHR (13) | CHR (13)
24, attachment = > v_rawfile
25, att_inline = > FALSE
26, att_filename = > v_file_name
(27);
28 end;
29.
declare
*
ERROR on line 1:
ORA-29283: invalid file operation
ORA-06512: at "SYS." UTL_FILE", line 536
ORA-29283: invalid file operation
ORA-06512: at the level of line 12
It was working fine before the cloning.
Published by: Gerard may 24, 2012 11:52I guess that the problem is caused by
v_utl_filehandler := UTL_FILE.FOPEN(v_file_dir, v_file_name, 'r');
Is the path to the directory "MAIL_DIR" exists in your database server?
The file 'mailattachment.doc' exists in this path?
You have read access to this path?You can check the path of the directory with:
select * from all_directories where directory_name='MAIL_DIR';
When the directory does not exist in this table, you need to create (such as s/n):
CREATE DIRECTORY MAIL_DIR AS 'yourdirectory';
To grant read access to the DBA, you need:
GRANT READ ON DIRECTORY MAIL_DIR TO
; (Overall precondition is that the oracle user (operating system - the user running your oracle instance) can access the given directory).
Published by: hm on 23.05.2012 22:52
-
Error: ORA-29283: invalid file so that registerdatabase operation
We get the error during the registration of the agent to the server
AGENT_HOME/bin/schagent - registerdatabase port > < host > <
Error:
Oracle Scheduler Agent registration
The agent registration failed!
Error: ORA-29283: invalid file operation
ORA-06512: at "SYS." UTL_FILE", line 536
ORA-29283: invalid file operation
Database version: 11.1.0.7.0
Someone at - he seen these errors?
Published by: Gaham on August 10, 2009 12:03 AM
Published by: Gaham on August 10, 2009 12:04 AMHello
This can happen if you have recently changed ORACLE_HOME for the database. We're currently tracking this as a bug.
To work around this problem, you can do
delete the PLANNER directory $ _WALLET_DIR;
-replace ORACLE_HOME with the full path to your new oracle home
- and use-instead of / for Windows
Create directory PLANNER$ _WALLET_DIR as "ORACLE_HOME/Planner/portfolio";Hope this helps,
Ravi. -
ORA-29283: invalid file operation
Hi friends,
I m getting ORA-29283: invalid file operation. I tried to use create directory option as well. I have to wriite the file to a specific location determined by the system setting
even I tried to write by specifying the path setting and direct read/write permision he throw the error.any even input will be highly appreciated.
Thank you
Create or replace procedure (table_csv)
in_succ_fail IN kcc_case_trans_fin_audit.success_or_fail%type by default NULL
in_team_id IN kcc_case_trans_fin_audit.ounit_identifier_kt%type by default NULL,
in_run_reference IN kcc_case_trans_fin_audit.run_reference%type by default NULL,
)
IS
v_file_path varchar2 (100) default Null;-to contain the path
v_file_name varchar2 (100) default Null; - to hold the name of the file
v_file_name_component varchar2 (20) default Null; - to contain the part of file name
v_string varchar2 (4000) default Null;
v_actual_start_date PROVISIONS.actual_start_date%type;
v_actual_end_date PROVISIONS.actual_end_date%type;
v_provid_identifier PROVISIONS.provid_identifier%type;
v_citem_identifier PROVISIONS.citem_identifier%type;
v_start_date COST_COMMITMENTS.start_date%type;
v_end_date COST_COMMITMENTS.end_date%type;
v_ccentr_identifier COST_COMMITMENTS.ccentr_identifier%type;
v_ccreas_identifier COST_COMMITMENTS.ccreas_identifier%type;
v_meaning coded_cost_reasons.meaning%type;
v_cost_centre_code cost_centres.cost_centre_code%type;
v_sch_start_date schedules.start_date%type;
v_sch_end_date schedules.end_date%type;
v_schedule_type schedules.schedule_type%type;
v_she_ccentr_identifier schedules.ccentr_identifier%type;
v_she_cost_centre_code cost_centres.cost_centre_code%type;
v_success_or_fail kcc_case_trans_fin_audit.success_or_fail%type;
v_file_audit UTL_FILE. TYPE_DE_FICHIER; -File pointer variable
File_Exception Exception; -User-defined exceptions
Cursor cur_kctfaudit is
Select ID, krestr_identifier, person_identifier,.
ounit_identifier_kt, new_ccentr_identifier
provis_identifier, ccommi_identifier, schedu_identifier
success_or_fail, error_message, run_reference
of kcc_case_trans_fin_audit
where success_or_fail = in_succ_fail
or ounit_identifier_kt = in_team_id
or run_reference = in_run_reference;
Begin
-To get the location of the directory, and then to make the name of the file.
v_file_path: = Adf_Getparam ('END', 'RFDR');
Select to_char (sysdate, 'ddmmyyhhmi') in the double v_file_name_component;
v_file_name: = 'kcc_restr_fin_audit_ ' | v_file_name_component |'. CSV';
If v_file_path is null then
Raise FILE_Exception;
End if;
-If the system "END/RFDR" parameter is not set then do not pass further and get out
If v_file_path is not null then
v_file_path: = v_file_path | » \';
v_file_audit: = UTL_FILE. FOPEN (v_file_path, v_file_name, 'W');
-v_file_audit: = UTL_FILE. FOPEN ("C: \ KCCTEST', v_file_name, 'W'");
-If the file to write has been opened successfully
IF utl_file.is_open (v_file_audit) THEN
-loops through each line of the file
I'm IN cur_kctfaudit LOOP
-The value null if the provis_identifier on the case_tran_fin_audit is null.
-a code here...
-to build the string with all the information to write to the file
v_string: = i.identifier | ','
|| baf_name_list (i.person_identifier, 'P'). ','
|| baf_name_list (i.ounit_identifier_kt, 'P'). ','
|| i.new_ccentr_identifier | ','
|| v_sch_start_date | ','
|| v_sch_end_date | ','
|| v_schedule_type | ','
|| v_she_cost_centre_code | ','
|| v_success_or_fail | ','
|| i.ERROR_MESSAGE | ','
|| i.krestr_identifier;
UTL_FILE. Put_line (v_file_audit, v_string, autoflush = > true);
END LOOP;
DBMS_OUTPUT. Put_line (' file Created: ' | v_file_name);
UTL_FILE. FCLOSE (v_file_audit);
END IF;
END IF;
EXCEPTION
WHEN utl_file.invalid_mode THEN
RAISE_APPLICATION_ERROR (-20051, 'invalid parameter Mode');
WHEN utl_file.invalid_path THEN
RAISE_APPLICATION_ERROR (-20052, 'Invalid File Location');
WHEN utl_file.invalid_filehandle THEN
RAISE_APPLICATION_ERROR (-20053, 'no valid Filehandle');
-WHEN utl_file.invalid_operation CAN
-RAISE_APPLICATION_ERROR (-20054, "Invalid File opération");
WHEN utl_file.internal_error THEN
RAISE_APPLICATION_ERROR (-20057, 'internal error');
WHEN utl_file.charsetmismatch THEN
RAISE_APPLICATION_ERROR (-20058, 'Open with FOPEN_NCHAR but later IO inconsistent');
WHEN utl_file.file_open THEN
RAISE_APPLICATION_ERROR (-20059, "file already open");
WHEN utl_file.invalid_maxlinesize THEN
RAISE_APPLICATION_ERROR (-20060, 'Row size exceeds 32 K');
WHEN utl_file.invalid_filename THEN
RAISE_APPLICATION_ERROR (-20061, "Invalid File Name");
WHEN utl_file.access_denied THEN
RAISE_APPLICATION_ERROR (-20062, "file access denied by ');
When FILE_Exception then
RAISE_APPLICATION_ERROR (-20002,' system END/RFDR parameter is not defined.) Set the system and try again! ');
dbms_output.put_line (' system END/RFDR parameter is not defined.) Set the system and try again! ');
WHILE others THEN
-dbms_output.put_line (sqlerrm);
RAISE_APPLICATION_ERROR (-20099, "UTL_FILE Unknown Error");
END table_csv;29283, 00000, "invalid file operation" // *Cause: An attempt was made to read from a file or directory that does // not exist, or file or directory access was denied by the // operating system. // *Action: Verify file and directory access privileges on the file system, // and if reading, verify that the file exists.
I have confidence in Oracle reports reality of the more acurrately, you.
View simplified code that produces the error and after CUT PASTE & showing evidence why Oracle is bad. -
IKM Partition Oracle Exchange Error loading - ORA-14006: invalid partition name
Hello
I use ODI Standalone Edition Version 11.1.1
I've created an interface, the target table's partition.
DDL script
CREATE TABLE big_table2)
ID NUMBER (10),
CREATED_DATE DATE,
lookup_id NUMBER (10),
given VARCHAR2 (50)
)
PARTITION OF RANGE (created_date)
(PARTITION big_table_2007 VALUES LESS THAN (MAXVALUE));
the performance of the interface error: -.
Internal CZ_SC_CONSULTING jar:file:/D:/Oracle/middleware/Oracle_ODI1/oracledi/client/jdev/extensions/Oracle.ODI.Navigator.jar!/com/Sunopsis/graphical/gif/State/f_error.gif 2015-01-28 10:58:38.0 2015-01-28 10:59:08.0 30 14006 ODI-1226: step INT_EXCH_PART fails after 1 attempt. ODI-1240: Flow INT_EXCH_PART fails during an operation of integration. This flow of charge table BIG_TABLE2 target.
ODI-1228: failed INT_EXCH_PART (integration) task on the target of ORACLE ODI_STAGE connection.
Caused by: java.sql.SQLException: ORA-14006: invalid partition name
ORA-06512: at line 2
Please can I know what is the problem.
Put your name of the partition in upper case and double coate as:
'BIG_TABLE_2007 '.
The capital should not be a problem, but it is better to be like that because it will store like this in the table USER or ALL_TAB_PARTITIONS.
This makes it easier to compare if you need to check if a partition already exists or not.
Hope this can help you.
-
ORA-20515: invalid Session
Hello
I find the rest of error messages in my glassfish.log file. Applications are working fine but do not know why this error comes from time to time, and then in the log file only.
Operating system: CentOS 6.4 64bits
Oracle 11G XE
Apex 4.2.3.00.08
Apex listener 2.0.5
3.1.2.2 Glasfish
I am also using Nginx as a reverse proxy server.
[#: 2013-11 - 06T 12: 02:10.103 - 0500 |] SEVERE | glassfish3.1.2 | null | _ThreadID = 83; _ThreadName = wire 2. ORA-20515: Invalid session
ORA-06512: at "APEX_040200.WWV_FLOW_DML", line 2045
ORA-06512: at "APEX_040200.HTMLDB_UTIL", line 2659
ORA-06512: at line 2
java.sql.SQLException: ORA-20515: Invalid session
ORA-06512: at "APEX_040200.WWV_FLOW_DML", line 2045
ORA-06512: at "APEX_040200.HTMLDB_UTIL", line 2659
ORA-06512: at line 2
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:505)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:223)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:205)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1043)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3612)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3713)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4755)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378)
at sun.reflect.GeneratedMethodAccessor74.invoke (unknown Source)
Any help will be much appreciated.
Habib
Hi Habib.
This error can occur when applications to APEX_UTIL. GET_BLOB_FILE to download the BLOB content on a page of DML form passes invalid or expired session id. You should be able to find support requests to APEX_UTIL. GET_BLOB_FILE or HTMLDB_UTIL. GET_BLOB_FILE in your web server log files.
Kind regards
Christian
-
ORA-01410: invalid ROWID - can not understand
Operating system: AIX v6
DB: 11.2.0.1
Hi guys,.
I try to update some two columns in a table, and I continually get the error ORA-01410 in my script.
Statistics on the table are:
Total lines: 24,445,779
Lines to be updated: 3 936 042
I can't do a simple UPDATE statement because it: 1) generate too many locks TX and kill the db and 2) may exhaust the cancellation.
And DEC would require a downtime which I could afford only 2 hours on a weekend.
That's why I coded the following sql script to update these columns and get the error ORA-01410.
I can't figure it out, this same script run without fault for a table of ~ 1 mill lines.SQL> DECLARE 2 CURSOR usr_csr IS 3 SELECT i.instance_id, 4 ist.state_datetime, 5 NVL(u.username, '?' ) username, 6 i.ROWID row_id 7 FROM instance_arch i, instance_states_arch ist, t_users u 8 WHERE i.current_state = ist.inst_state_id 9 AND ( i.create_date IS NULL OR i.user_name IS NULL ) 10 AND u.userid(+) = ist.state_initiator 11 ORDER BY i.ROWID; 12 13 TYPE usr_crs_rec IS TABLE OF usr_csr%ROWTYPE 14 INDEX BY PLS_INTEGER; 15 16 i_rec usr_crs_rec; 17 max_rec PLS_INTEGER := 10000; 18 i PLS_INTEGER; 19 i_loop PLS_INTEGER:=0; 20 i_tot PLS_INTEGER:=0; 21 i_null PLS_INTEGER:=0; 22 i_fixd PLS_INTEGER:=0; 23 BEGIN 24 OPEN usr_csr; 25 26 WHILE 1 = 1 LOOP 27 FETCH usr_csr 28 BULK COLLECT INTO i_rec 29 LIMIT max_rec; 30 31 EXIT WHEN usr_csr%NOTFOUND; 32 33 i_loop := i_loop + 1; 34 i_tot := i_tot + i_rec.COUNT; 35 36 FOR i IN 1 .. i_rec.COUNT 37 LOOP 38 IF i_rec( i ).username = '?' THEN 39 i_null := i_null + 1; 40 ELSE 41 i_fixd := i_fixd + 1; 42 END IF; 43 END LOOP; 44 45 FORALL i IN 1 .. i_rec.COUNT 46 UPDATE instance 47 SET create_date = i_rec( i ).state_datetime 48 , user_name = i_rec( i ).username 49 WHERE rowid = i_rec( i ).row_id; 50 51 COMMIT; 52 END LOOP; 53 DBMS_OUTPUT.PUT_LINE('*** Fixed User Names *** '||i_loop); 54 DBMS_OUTPUT.PUT_LINE('*** Fixed: '||i_fixd); 55 DBMS_OUTPUT.PUT_LINE('*** Null : '||i_null); 56 DBMS_OUTPUT.PUT_LINE('*** Total: '||i_tot ); 57 COMMIT; 58 END; 59 / DECLARE * ERROR at line 1: ORA-01410: invalid ROWID ORA-06512: at line 45
Any suggestions, corrections, links, jokes and sarcasm are accepted.
:)>
I can't figure it out, this same script run without fault for a table of ~ 1 mill lines.
>
I don't know it's possible. Are you sure that you have entered the right code?
You query the IDENTIFIER of the table "instance_arch" and use that ROWID to try to update the table of "instance".
Very probably no updates are never at the table 'instance' because the ROWID will match in the predicate.But the predicate test could use a ROWID that isn't a ROWID more valid because the record from the original table got deleted or migrated.
If your code will run may well but it certainly 'running perfectly.
ROWID operations are powerful but can do damage if you use the wrong ROWID.This is the query cursor you posted - using the table "instance_arch".
SELECT i.instance_id, 4 ist.state_datetime, 5 NVL(u.username, '?' ) username, 6 i.ROWID row_id 7 FROM instance_arch i, instance_states_arch ist, t_users u 8 WHERE i.current_state = ist.inst_state_id 9 AND ( i.create_date IS NULL OR i.user_name IS NULL ) 10 AND u.userid(+) = ist.state_initiator 11 ORDER BY i.ROWID;
It's the FORALL code you posted - using the "instance".
45 FORALL i IN 1 .. i_rec.COUNT 46 UPDATE instance 47 SET create_date = i_rec( i ).state_datetime 48 , user_name = i_rec( i ).username 49 WHERE rowid = i_rec( i ).row_id;
Just for the curious, here's a blog of Jonathan Lewis on ORA-01410: invalid rowid
http://jonathanlewis.WordPress.com/2007/09/16/index-rebuild/ -
Session beginning of OGG-00664 OIC error (status = 1017-ORA-01017: invalid)
All,
I make a problem while doing the initial load process.
ENV-
OEL32, 11.2.0.2 - SOURCE AND TARGET db TIME on a machine.
-------
GGSCI (localhost) 7 > discovers the eini13 report
2011-10-31 16:49:51 INFO OGG-01017 Wildcard resolution IMMEDIATE value because SOURCEISTABLE is used.
***********************************************************************
Oracle GoldenGate Capture for Oracle
Version 11.1.1.1 OGGCORE_11.1.1_PLATFORMS_110421.2040
Linux, x 86, 32-bit (optimized), Oracle 11 g on April 30, 2011 22:35:14
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
From 2011-10-31 16:49:51
***********************************************************************
Version of the operating system:
Linux
Version #1 SMP kills Jan 4 07:23:44 this version of 2011, 2.6.18 - 238.0.0.0.1.el5
Node: localhost.localdomain
Machine: i686
limit software
Address space size: unlimited unlimited
Heap size: unlimited unlimited
File size: unlimited unlimited
Time CPU: unlimited unlimited
Process ID: 4845
Description:
***********************************************************************
* In the course of a run with the following parameters *.
***********************************************************************
EXTRACT EINI13
WEST OF USERNAME, PASSWORD *.
Context of the source:
SourceModule: [ggdb.ora.sess]
SourceID: [/ scratch/sganti/view_storage/sganti_core_lin32/oggcore/OpenSys/src/gglib/ggdbora /]
ocisess.c]
SourceFunction: [OCISESS_try]
SourceLine: [500]
ThreadBacktrace: [12] elements
: [/ apps/oracle/product/gg_amer/extract (CMessageContext::AddThreadContext () + 0 x 26) [0]
x 8289366]]
: [/ apps/oracle/product/gg_amer/extract (CMessageFactory::CreateMessage (CSourceContex]
t *, unsigned int,...) (+0x817) [0x827fae7]]
: [/ apps/oracle/product/gg_amer/extract (_MSG_ERR_ORACLE_OCI_ERROR_WITH_DESC (CSourceC]
[(ONTEXTE *, int, const char *, const char *, CMessageFactory::MessageDisposition) + 0x8b) [0x824230b]]
: [/ apps/oracle/product/gg_amer/extract (OCISESS_try (int, OCISESS_context_def *, char))]
const *,...) (+0x376) [0x81cd156]]
: [/ apps/oracle/product/gg_amer/extract (OCISESS_logon (OCISESS_context_def *, con char))]
[(St *, const char *, const char *, int, int, int) + 0x8b4) [0x81ce604]]
: [/ apps/oracle/product/gg_amer/extract (DBOCI_init_connection_logon (const char *, cha))]
[(const r *, const char *, int, int, int, char *) + 0 x 58) [0x81bdce8]]
: [apps/oracle/product/gg_amer/extract [0x81c23da]]
: [/ apps/oracle/product/gg_amer/extract (gl_odbc_param (const char *, const char *, char))]
[)) + 0 x 36) [0x81c29b6]]
: [apps/oracle/product/gg_amer/extract [0x814bfec]]
: [apps/oracle/product/gg_amer/extract(main+0x1dc) [0x81529cc]]
: [lib/libc.so.6(__libc_start_main+0xdc) [0x476e9c]]
: [apps/oracle/product/gg_amer/extract(__gxx_personality_v0+0x1c5) [0 x 8120491]]
Beginning session 2011-10-31 16:49:51 OGG - 00664 OIC error (status = 1017-ORA-01017: invalid user name)
/ Password; connection refused).
2011-10-31 16:49:51 ERROR OGG-01668 PROCESS ABENDING.
GGSCI (localhost) 8 >Name of user and password invalid.
Your GoldenGate database user named West (and whatever your password)? Also, check the correct cases 11g password is case-sensitive default passwords.
-
ORA-29280: invalid directory path
do face a problem,
My requirement is I have to brought from a schema for a remote database my current schema some procedure, packages, functions scripts and compile them here in my current schema.
Basically, straight word what I have to do is, all functions, procedures, are there packages in the remote schema (that I can access by a datbase link) must be created in my current schema.
so I got what I was trying to make is just source codes to access all_sources and creating files in a code here directory.giving.
First, what I've done is created an Oracle Directory.
First I created a directory called "PROC_PKG_FUNC" in drive D, then I ran the following command.
SQL > create directory 'PROC_PKG_FUNC' as 'D:\'PROC_PKG_FUNC ';
Created directory.
CREATE or REPLACE PROCEDURE Get_Db_Ddl_Scripts as
v_file Utl_File.FILE_TYPE;
v_file_dir VARCHAR2 (50);
i_first_line NUMBER: = 1;
BEGIN
v_file_dir: = 'PROC_PKG_FUNC ';
FOR REC_OBJ IN
(SELECT a DISTINCT NAME, TYPE, DECODE (TYPE, 'FUNCTION', 'FUNCTIONS', 'PACKAGE', "PACKAGES", "PACKAGE BODY ', 'PACKAGES_BODY'," PROCEDURE", 'PROCEDURES', 'TYPE', 'TYPE', 'TYPE BODY', 'TYPES_BODY') v_file_dir)
FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE OWNER = 'FRISKDEVI41B. '
AND TYPE IN ('FUNCTION, PROCEDURE, 'PACKAGE', 'PACKAGE BODY', 'TYPE'))
LOOP
v_file: = Utl_File.FOPEN (card = > REC_OBJ.v_file_dir,)
filename = > REC_OBJ.NAME | ".sql",.
OPEN_MODE = > 'w ',.
max_linesize = > 32767);
i_first_line: = 1;
FOR REC IN (SELECT TEXT FROM ALL_SOURCE@FRISKDEVI41B_ORCL WHERE NAME = REC_OBJ.NAME AND TYPE = REC_OBJ. TYPE AND OWNER = 'FRISKDEVI41B' ORDER BY LINE)
LOOP
IF i_first_line = 1 THEN
Utl_File.put_line (v_file, "CREATE or REPLACE" |) REPLACE (REC. TEXT, CHR (10), NULL));
ELSE Utl_File.PUT_LINE (v_file, REPLACE (REC. TEXT, CHR (10), NULL));
END IF;
i_first_line: = i_first_line + 1;
END LOOP;
Utl_File.FCLOSE (v_file);
END LOOP;
END;
/
but when I try to run this am getting error,
ORA-29280: invalid directory path
ORA-06512: at "SYS." UTL_FILE", line 33
ORA-06512: at "SYS." UTL_FILE", line 436
ORA-06512: at "SYS." GET_DB_DDL_SCRIPTS', line 15
ORA-06512: at line 2
I know probbaly get this error because I am trying to create different directories, just like functions packages etc. under the external using this loop recording repertoire, but how would it be possible, please help.
Kind regards
ManuellaIn oracle when you say that CREATE or REPLACE the DIRECTORY you do not create a directory in the operating system, you simply create a reference to the directory in the operating system.
So I don't know what you're asking.
Maybe you are looking for
-
Satellite Pro 6100 - memory / disk HARD upgrade
Hello Ive got two questions regarding the upgrade of this laptop: My units equipped with a 60 GB hard drive. What is the maximum size possible? What is the bios (Im running the real 1.9) support? These days this drives 2.5 "are available up to 160 GB
-
Ideas: I had problems with google before but everything was OK after uninstalling all programs of google Error messages like end of google, but that was before I change web browser safari because some time cannot open internet explore it, but so far,
-
my auto jagat acharya before Mr 2 days ago my mail id * address email is removed from the privacy * is someone money malysia and packaging to use my ID with my parent down so close that party id and arrasted piracy malysia
-
smartband 10 Bluetooth unlock on Z3 does not work
Hello!Last updated my xperia Z3 Android 5.0.2.And the subject that's happened. I can not add the smartband as a Bluetooth device that is legal to unlock the phone without graphical key or a PIN. It is only possible to add my sony wireless headphones.
-
Paper jam in the printer HP Deskjet 3520 e-All-in-One (model SNPRH-1102)
I had been using HP Deskjet 3520 e-all-in-one printer over a year until yesterday the printer suddenly jammed paper. I have some ideas out of A4 paper to let the printer works normally again. I need printer for printing currently. Please help, anyone