Compile procedure on 8.1.7 Win OK - on 9.2.0.4.0 SUN Error
Hi,
I have got a problem with compiling procedure on database 9.2.0.4.0 SUN. This same procedure compile without problems on 8.1.7 Win. Links, hints will be helpful. The procedure and error are below:
CREATE OR REPLACE PROCEDURE BUDZET2003.P_IM_PR_PRZYCH_PE_TMP(USER IN CHAR)
is
BEGIN
insert into IM_PR_PRZYCH_TMP
Select PROJEKTY_ID, PROJEKTY_NAZWA,PROJEKTY_NADRZ_ID,PROJEKTY_OPERATOR,PROJEKTY_FORMULA,'',PROJEKTY_SORT2,
WYDZIAL, ODPOWIEDZIALNY, WAZNY_OD, WAZNY_DO, ZASILANIE, SYSDATE, USER ,''
FROM W2_PR_PRZYCH_EE_C
start with PROJEKTY_id = 'PE'
Connect by prior PROJEKTY_id = PROJEKTY_NADRZ_ID
WHERE
PROJEKTY_ID NOT IN
(SELECT PROJEKTY_ID
FROM W2_PR_PRZYCH)
END;
4/1 PL/SQL: SQL Statement ignored
10/53 PL/SQL: ORA-00907:
Thanks
jozefp
Hi,
usually I expect people to do a little research and I do not give everything chewed.
Point 4:
go to the
<b>Oracle9i Database Migration Release 2 (9.2)</b>
go to the chapter 3
<b>Upgrading a Database to the New Oracle9i Release</b>
go to the point:
<b>Upgrade the Database Manually</b>
Exactly from here:
http://download.oracle.com/docs/cd/B10501_01/server.920/a96530/upgrade.htm#1009200
Keep in mind
1) that the <i>EXACT </i>procedure you are following it is not indicated in this manual
2) you have to think a little ( do you have all the windows services created on the destination system? if not, you have to create them ... )
3) this procedure is not supported by SAP. It is a valid option but not supported by them. You have to practice until you get all the points correctly
Similar Messages
-
Problem in compiling procedure from another schema
Hi all
I have got 2 schemas, say A and B.
Schema A owns a procedure P which selects data from table T1 ( external table ) and updates table T2.
i have granted Schema B
1) read, write privilege on the directory that table T1 refrences.
2) all on table T1
3) all on table T2
4) execute on P
I have created public synonyms for T1, T2 and P ( same name ).
Now when i try to compile procedure P from schema B I get error
ORA-01031: insufficient privileges
Where am i wrong?
Please HelpYou'll need CREATE ANY PROCEDURE privilege for that.
Is there any reason why you don't post the one thing on which you are asking about : the alter procedure statement?
(apart from also not posting the version, which you always should include)
Sybrand Bakker
Senior Oracle DBA -
Compiling Procedures/Packages/Functions
I'm fairly new to the arena of compiling Procedures/Packages/Funcitons but I was given the task of updating a development DB with a lot of newly created/updated Objects. I have created a shell script to go through all the new files and create or replace all the new objects in sqlplus. My question is how to compile all the newly created objects and their dependencies correctly? I have been using SQL Developer to verify that everything has compiled but I see that some are marked invalid which I assume is because a dependency was compiled after it. What would be my best way to making sure everything is valid? I hope this makes sense but any help would be appreciated.
You can use a script like this to build your own sql statement to compile the invalid objects. You can add your own statement for other object types at the end with a union, ie TYPE body.
You will probably need to run it repeated until all objects are VALID. You can put it in a PL/SQL block with a loop and execute immediate so reduce the manual work.
--PACKAGE
select 'alter package ' || object_name || ' compile;' from user_objects
WHERE Status = 'INVALID'
and object_type= 'PACKAGE'
union
-- PACKAGE BODY
select 'alter package ' || object_name || ' compile body;' from user_objects
WHERE Status = 'INVALID'
and object_type= 'PACKAGE BODY'
union
--PROCEDURE
select 'alter procedure ' || object_name || ' compile;' from user_objects
WHERE Status = 'INVALID'
and object_type= 'PROCEDURE'
union
--FUNCTION
select 'alter function ' || object_name || ' compile;' from user_objects
WHERE Status = 'INVALID'
and object_type= 'FUNCTION'
union
--TRIGGER
select 'alter trigger ' || object_name || ' compile;' from user_objects
WHERE Status = 'INVALID'
and object_type= 'TRIGGER'
union
--VIEW
select 'alter view ' || object_name || ' compile;' from user_objects
WHERE Status = 'INVALID'
and object_type= 'VIEW' -
Two days ago, I loaded Light Room 6. Today I went back to Light Room 5. LR 6 corrupted an entire folder of images, and caused errors on my Raid 5 causing win 7 to run "Chk Dsk" and fix the errors to the operating system. LR 5 has not shut down for the last 5 hours. LR 6 has a serious bug. Anyone else experiencing this problem. Yesterday I was on tech support, waiting for 3 hours, finally they picked up and informed me there department was closing and someone else would call me on Monday. So, I'm working today and all day Sunday to make up for the down time using LR 6.
I don't know if the bug exists in the program or the "Creative Cloud.
Question: Does anyone know why if I bought Light Room 6 [NOT Light Room CC with the monthly rental], I have to enter my serial number if I want to use it?Entering the serial number is probably part of the registration process.
Just out of curiosity, what were you doing on LR6 when the folder of images became corrupted? -
Win 7 64 bit: iTunes won't install, get error code 2324 or installer says I am not logged on as administrator: only one user and it is an administrator user.
Hey there k8ei,
Thank you for using Apple Support Communities
I found this article for you to help troubleshoot installing iTunes named Trouble installing iTunes or QuickTime for Windows found here http://support.apple.com/kb/HT1926.
Here is a general overview on where the troubleshooting will take you:
General installation troubleshooting
1. Empty your Temp directory and restart
2. Completely remove iTunes and related components
3. Install the latest version of iTunes
Additional troubleshooting
After performing each of the steps below, you will need to completely remove iTunes and related components and then install iTunes again to determine whether the issue is resolved.
1. Make sure you have administrator account access
2. Make sure your folder names don't contain strange characters
3. Get the latest Windows updates
4. Disable other conflicting software
All the very best,
Sterling -
Security question: Can you decompile a PL/SQL compiled procedure?
I am wondering if anyone would be able to tell me if it is possible to decompile a compiled oracle PL/SQL procedure.
Scenario:
I create some data encryption code in PL/SQL that contains an encryption key string. I compile the PL/SQL as a stored procedure and store that binary object as a BLOB in the database. If a hacker can snag a whole database that would include this BLOB and he figures out that the BLOB might contain the key, can he get access to the key by decompiling somehow the BLOB back into PL/SQL statements?
Thanks in advance!!
Gary Glover, CISSP
[email protected]Gary, when a hacker gets into your database (with sysdba rights), your are pretty much screwed - even with encrypted code and data.
To obtain that level of access, the hacker must be good. And persistant. Thus you can expect that he will compromise the rest of the stuff inside the database.
Alternatively, your database security was shoddy - trying to patch security via encrypting code in the database is a poor second.
It is also a question of time and effort vs. benefits. Spend 80% attempting to secure the code in the database, and 20% securing the database? Or 90% securing the database and 10% securing the code and data in the database? -
Error in Compiling Procedure within a Procedure ?
I am currently using oracle 11g, and I am getting the error when compiling the following procedure.
Please adv, what am I missing?
If a remove the following lines, then procedure is compiled.
BEGIN
BEGIN my_ctx_procedure(MSHOLD_CODE);
END;
Thanks a lot.
Luqman
create or replace PROCEDURE TEST1
(FDATE1 DATE, FDATE2 DATE,MSHOLD_CODE IN VARCHAR)
IS
BEGIN
BEGIN my_ctx_procedure(MSHOLD_CODE);
END;
CURSOR c1 IS
SELECT * from sholders
where SHOLD_CODE IN
(select * from IN_LIST);
BEGIN
OPEN C1;
END TEST1;
ERROR
LINE/COL ERROR
7/8 PLS-00103: Encountered the symbol "C1" when expecting one of the
following:
:= . ( @ % ;What exactly are you trying to do?
run the my_ctx_procedure(MSHOLD_CODE) proc prior to opening the cursor?
If so:
create or replace PROCEDURE TEST1
(FDATE1 DATE, FDATE2 DATE,MSHOLD_CODE IN VARCHAR)
IS
CURSOR c1 IS
SELECT * from sholders
where SHOLD_CODE IN
(select * from IN_LIST);
BEGIN
my_ctx_procedure(MSHOLD_CODE);
OPEN C1;
END TEST1;
/Your error comes because you put BEGIN and then tried to declare a cursor. You can't declare an explicit cursor inside the main bit of the code; you have to do it in the declaration section (ie. the bit between DECLARE / CREATE Procedure ... IS and the BEGIN)
Edited by: Boneist on 10-Jul-2009 11:31
I suggest you read through this: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/toc.htm to gain a better understanding of PL/SQL -
I have the following procedure that I am trying to complile, logged in as TMMGR:
CREATE OR REPLACE PROCEDURE UPDATE_TMS_LOAD AS
v_err_msg VARCHAR2(150);
CURSOR cur_load IS
SELECT * from tmmgr.load;
BEGIN
FOR load_rec IN cur_load LOOP
BEGIN
INSERT INTO SFITRAN.TMS_LOAD
( ID
, SCHED_NUM
, BILL
, LOCATION_ID
, TRLR_TYPE_ID
, CARRIER_ID
, MILES
, EARLY_DEP
, LATE_DEP
, STATUS
, FREIGHT_COST
, FREIGHT_COST_CUR
, NO_STOP
, BEST_DEP
, WEIGHT
, CUBE
, PCS
, PALLETS
, FREIGHT_NET
, FREIGHT_NET_CUR
, ADJUSTED_COST
, ADJUSTED_COST_CUR
, LINE_ADJUSTED_COST
, LINE_ADJUSTED_COST_CUR
, LAYOVER
, TRIP_END_DATE
, LINEHAUL_COST)
VALUES (load_rec.ID
, load_rec.SCHED_NUM
, load_rec.BILL
, load_rec.LOCATION_ID
, load_rec.TRLR_TYPE_ID
, load_rec.CARRIER_ID
, load_rec.MILES
, load_rec.EARLY_DEP
, load_rec.LATE_DEP
, load_rec.STATUS
, load_rec.FREIGHT_COST
, load_rec.FREIGHT_COST_CUR
, load_rec.NO_STOP
, load_rec.BEST_DEP
, load_rec.WEIGHT
, load_rec.CUBE
, load_rec.PCS
, load_rec.PALLETS
, load_rec.FREIGHT_NET
, load_rec.FREIGHT_NET_CUR
, load_rec.ADJUSTED_COST
, load_rec.ADJUSTED_COST_CUR
, load_rec.LINE_ADJUSTED_COST
, load_rec.LINE_ADJUSTED_COST_CUR
, load_rec.LAYOVER
, load_rec.TRIP_END_DATE
, load_rec.LINEHAUL_COST);
EXCEPTION
WHEN DUP_VAL_ON_INDEX THEN
-- If the record exist then update it
UPDATE SFITRAN.TMS_LOAD
SET ID = load_rec.ID
, SCHED_NUM = load_rec.SCHED_NUM
, BILL = load_rec.BILL
, LOCATION_ID = load_rec.LOCATION_ID
, TRLR_TYPE_ID = load_rec.TRLR_TYPE_ID
, CARRIER_ID = load_rec.CARRIER_ID
, MILES = load_rec.MILES
, EARLY_DEP = load_rec.EARLY_DEP
, LATE_DEP = load_rec.LATE_DEP
, STATUS = load_rec.STATUS
, FREIGHT_COST = load_rec.FREIGHT_COST
, FREIGHT_COST_CUR = load_rec.FREIGHT_COST_CUR
, NO_STOP = load_rec.NO_STOP
, BEST_DEP = load_rec.BEST_DEP
, WEIGHT = load_rec.WEIGHT
, CUBE = load_rec.CUBE
, PCS = load_rec.PCS
, PALLETS = load_rec.PALLETS
, FREIGHT_NET = load_rec.FREIGHT_NET
, FREIGHT_NET_CUR = load_rec.FREIGHT_NET_CUR
, ADJUSTED_COST = load_rec.ADJUSTED_COST
, ADJUSTED_COST_CUR = load_rec.ADJUSTED_COST_CUR
, LINE_ADJUSTED_COST=load_rec.LINE_ADJUSTED_COST
, LINE_ADJUSTED_COST_CUR
=load_rec.LINE_ADJUSTED_COST_CUR
, LAYOVER = load_rec.LAYOVER
, TRIP_END_DATE = load_rec.TRIP_END_DATE
, LINEHAUL_COST = load_rec.LINEHAUL_COST
WHERE id = load_rec.id
AND sched_num = load_rec.sched_num;
END;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
v_err_msg := SUBSTR(SQLERRM, 1, 150);
DBMS_OUTPUT.PUT_LINE(v_err_msg);
END UPDATE_TMS_LOAD;
When I compile, I get an error saying the SFITRAN.TMS_LOAD table does not exist. What am I doing wrong?Thanks for your reply. This is strange, I had this procedure working yesterday and then this morning I had to change something so I dropped the SFITRAN.TMS_LOAD table and since then I can't compile. When I was able to compile yesterday, I did not have to login as SFITRAN and do the grants.
I am having problems trying to login as SFITRAN. I checked dba_users and this user has a password of EXTERNAL, so when I tried to login I used / as the password with no luck. -
Hi All,
I am using oracle 10.2.
i am new to procedures.
i created procedure.
That procedure created with some errors.
i got message as Warning: Procedure created with compilation errors.
i want to know where is the error. so i want to compile it. where i can compile the procedure?
which option i can use?
thanksTo show the errors, either
- immediately type 'SHOW ERRORS' after you receive the error message
- or issue 'select * from user_errors where name='<name of procedure in error>'
To compile a procedure
alter procedure <procedurename> compile;
Sybrand Bakker
Senior Oracle DBA -
Hi to All,
While creating a procedure I got a "ORA-00942: table or view does not exist" the table is there I can do a describe do a select, but some reason it does not see it if referenced in the procedure, if I use the same statement in "DECLARE" instead of "CREATE OR REPLACE" it sees the table and no error is given.
Below is the code:
FFS> DESC STE_V1SITE
Name
SITE_ID_NU
ST_NU
SITE_NU
SITE_FMLY_ID_NU
PRE_SITE_ID_NU
SITE_DS
FFS> CREATE OR REPLACE PROCEDURE temp IS
2
3 CURSOR site_ds_cur (
4 P_site_id IN NUMBER
5 , P_Thru_Dt IN DATE
6 ) IS
7 SELECT site.site_ds
8 FROM ste_v1site site
9 WHERE site.site_id_nu = P_site_id ;
10
11 TYPE site_ds_typ IS
12 TABLE OF ste_v1site.site_ds%TYPE
13 INDEX BY BINARY_INTEGER;
14
15 site_ds_tbl site_ds_typ;
16
17 BEGIN
18 NULL;
19
20 END;
21 /
Warning: Procedure created with compilation errors.
FFS> SHO ERROR
Errors for PROCEDURE TEMP:
LINE/COL ERROR
7/3 PL/SQL: SQL Statement ignored
8/10 PL/SQL: ORA-00942: table or view does not exist
11/3 PL/SQL: Item ignored
12/12 PLS-00201: identifier 'STE_V1SITE' must be declared
FFS>
FFS> DECLARE
2 CURSOR site_ds_cur (
3 P_site_id IN NUMBER
4 , P_Thru_Dt IN DATE
5 ) IS
6 SELECT site.site_ds
7 FROM ste_v1site site
8 WHERE site.site_id_nu = P_site_id ;
9
10 TYPE site_ds_typ IS
11 TABLE OF ste_v1site.site_ds%TYPE
12 INDEX BY BINARY_INTEGER;
13
14 site_ds_tbl site_ds_typ;
15
16 BEGIN
17 NULL;
18 END;
19 /
PL/SQL procedure successfully completed.
FFS> CREATE OR REPLACE PROCEDURE temp IS
2 BEGIN
3 NULL;
4 END;
5 /
Procedure created.
Thanks to all those who provide help...
Habeebsomthing like this
SQL> declare
2 cursor c(pdeptno number) is select empno,ename from emp
3 where deptno=pdeptno;
4 begin
5 for i in c(10) loop
6 dbms_output.PUT_LINE(i.empno||' : '||i.ename);
7 end loop;
8 end;
9 /
7782 : CLARK
7839 : KING
7934 : MILLER
PL/SQL procedure successfully completed. -
Error compiling procedure send mail
Hi all,
I have this error message (on 10.2 version)
Table or view doesn't exist
At this line
+ select dd.directory_name into directory_name from dba_directories dd+
+ where dd.directory_path = line and rownum = 1;+
But I don't know how can resolve it.
This is the all procedure
[http://forums.oracle.com/forums/]
CREATE OR REPLACE PROCEDURE P_SPEDEMAIATTA ( from_name IN VARCHAR2,
to_names IN VARCHAR2,
subject IN VARCHAR2,
message IN VARCHAR2 default null,
html_message IN VARCHAR2 default null,
cc_names IN VARCHAR2 default null,
bcc_names IN VARCHAR2 default null,
filename1 varchar2 default null,
filetype1 varchar2 default 'text/plain',
filename2 varchar2 default null,
filetype2 varchar2 default 'text/plain',
filename3 varchar2 default null,
filetype3 varchar2 default 'text/plain',
V_CODIERRO OUT VARCHAR2,
V_DESCERRO OUT VARCHAR2)
is
-- Change the SMTP host name and port number below to your own values,
-- if not localhost on port 25:
smtp_host varchar2(256) := 'SMTP.INET.IT';
smtp_port number := 25;
-- Change the boundary string, if needed, which demarcates boundaries of
-- parts in a multi-part email, and should not appear inside the body of
-- any part of the e-mail:
boundary constant varchar2(256) := 'CES.Boundary.DACA587499938898';
recipients varchar2(32767);
directory_path varchar2(256);
file_name varchar2(256);
crlf varchar2(2):= chr(13) || chr(10);
mesg varchar2(32767);
conn UTL_SMTP.CONNECTION;
type varchar2_table is table of varchar2(256) index by binary_integer;
file_array varchar2_table;
type_array varchar2_table;
i binary_integer;
my_code number;
my_errm varchar2(32767);
-- Function to return the next email address in the list of email addresses,
-- separated by either a "," or a ";". From Oracle's demo_mail. The format
-- of mailbox may be in one of these:
-- someone@some-domain
-- "Someone at some domain" <someone@some-domain>
-- Someone at some domain <someone@some-domain>
FUNCTION get_address(addr_list IN OUT VARCHAR2) RETURN VARCHAR2 IS
addr VARCHAR2(256);
i pls_integer;
FUNCTION lookup_unquoted_char(str IN VARCHAR2,
chrs IN VARCHAR2) RETURN pls_integer IS
c VARCHAR2(5);
i pls_integer;
len pls_integer;
inside_quote BOOLEAN;
BEGIN
inside_quote := false;
i := 1;
len := length(str);
WHILE (i <= len) LOOP
c := substr(str, i, 1);
IF (inside_quote) THEN
IF (c = '"') THEN
inside_quote := false;
ELSIF (c = '\') THEN
i := i + 1; -- Skip the quote character
END IF;
GOTO next_char;
END IF;
IF (c = '"') THEN
inside_quote := true;
GOTO next_char;
END IF;
IF (instr(chrs, c) >= 1) THEN
RETURN i;
END IF;
<<next_char>>
i := i + 1;
END LOOP;
RETURN 0;
END;
BEGIN
addr_list := ltrim(addr_list);
i := lookup_unquoted_char(addr_list, ',;');
IF (i >= 1) THEN
addr := substr(addr_list, 1, i - 1);
addr_list := substr(addr_list, i + 1);
ELSE
addr := addr_list;
addr_list := '';
END IF;
i := lookup_unquoted_char(addr, '<'>');
IF (i >= 1) THEN
addr := substr(addr, 1, i - 1);
END IF;
END IF;
i := lookup_unquoted_char(addr, '@');
IF (i = 0 and smtp_host != 'localhost') THEN
i := instr(smtp_host, '.', -1, 2);
addr := addr || '@' || substr(smtp_host, i + 1);
END IF;
addr := '<'>';
RETURN addr;
END;
-- Procedure to split a file pathname into its directory path and file name
-- components.
PROCEDURE split_path_name(file_path IN VARCHAR2, directory_path OUT VARCHAR2,
file_name OUT VARCHAR2) IS
pos number;
begin
-- Separate the filename from the directory name
pos := instr(file_path,'/',-1);
if pos = 0 then
pos := instr(file_path,'\',-1);
end if;
if pos = 0 then
directory_path := null;
else
directory_path := substr(file_path,1,pos - 1);
end if;
file_name := substr(file_path,pos + 1);
end;
-- Procedure to append a file's contents to the e-mail
PROCEDURE append_file(directory_path IN VARCHAR2, file_name IN VARCHAR2,
file_type IN VARCHAR2, conn IN OUT UTL_SMTP.CONNECTION) IS
generated_name varchar2(30) := 'CESDIR' || to_char(sysdate,'HH24MISS');
directory_name varchar2(30);
file_handle utl_file.file_type;
bfile_handle bfile;
bfile_len number;
pos number;
read_bytes number;
line varchar2(1000);
data raw(200);
my_code number;
my_errm varchar2(32767);
begin
begin
-- Grant access to the directory, unless already defined, and open
-- the file (as a bfile for a binary file, otherwise as a text file).
begin
line := directory_path;
select dd.directory_name into directory_name from dba_directories dd
where dd.directory_path = line and rownum = 1;
exception
when no_data_found then
directory_name := generated_name;
end;
if directory_name = generated_name then
execute immediate 'create or replace directory ' || directory_name ||
' as ''' || directory_path || '''';
execute immediate 'grant read on directory ' || directory_name ||
' to public';
end if;
if substr(file_type,1,4) != 'text' then
bfile_handle := bfilename(directory_name,file_name);
bfile_len := dbms_lob.getlength(bfile_handle);
pos := 1;
dbms_lob.open(bfile_handle,dbms_lob.lob_readonly);
else
file_handle := utl_file.fopen(directory_name,file_name,'r');
end if;
-- Append the file contents to the end of the message
loop
-- If it is a binary file, process it 57 bytes at a time,
-- reading them in with a LOB read, encoding them in BASE64,
-- and writing out the encoded binary string as raw data
if substr(file_type,1,4) != 'text' then
if pos + 57 - 1 > bfile_len then
read_bytes := bfile_len - pos + 1;
else
read_bytes := 57;
end if;
dbms_lob.read(bfile_handle,read_bytes,pos,data);
utl_smtp.write_raw_data(conn,utl_encode.base64_encode(data));
pos := pos + 57;
if pos > bfile_len then
exit;
end if;
-- If it is a text file, get the next line of text, append a
-- carriage return / line feed to it, and write it out
else
utl_file.get_line(file_handle,line);
utl_smtp.write_data(conn,line || crlf);
end if;
end loop;
-- Output any errors, except at end when no more data is found
exception
when no_data_found then
null;
when others then
my_code := SQLCODE;
my_errm := SQLERRM;
dbms_output.put_line('Error code ' || my_code || ': ' ||
my_errm);
end;
-- Close the file (binary or text)
if substr(file_type,1,4) != 'text' then
dbms_lob.close(bfile_handle);
else
utl_file.fclose(file_handle);
end if;
if directory_name = generated_name then
execute immediate 'drop directory ' || directory_name;
end if;
end;
begin
-- Load the three filenames and file (mime) types into an array for
-- easier handling later
file_array(1) := filename1;
file_array(2) := filename2;
file_array(3) := filename3;
type_array(1) := filetype1;
type_array(2) := filetype2;
type_array(3) := filetype3;
-- Open the SMTP connection and set the From and To e-mail addresses
conn := utl_smtp.open_connection(smtp_host,smtp_port);
utl_smtp.helo(conn,smtp_host);
recipients := from_name;
utl_smtp.mail(conn,get_address(recipients));
recipients := to_names;
while recipients is not null loop
utl_smtp.rcpt(conn,get_address(recipients));
end loop;
recipients := cc_names;
while recipients is not null loop
utl_smtp.rcpt(conn,get_address(recipients));
end loop;
recipients := bcc_names;
while recipients is not null loop
utl_smtp.rcpt(conn,get_address(recipients));
end loop;
utl_smtp.open_data(conn);
-- Build the start of the mail message
mesg := 'Date: ' || TO_CHAR(SYSDATE,'dd Mon yy hh24:mi:ss') || crlf ||
'From: ' || from_name || crlf ||
'Subject: ' || subject || crlf ||
'To: ' || to_names || crlf;
if cc_names is not null then
mesg := mesg || 'Cc: ' || cc_names || crlf;
end if;
if bcc_names is not null then
mesg := mesg || 'Bcc: ' || bcc_names || crlf;
end if;
mesg := mesg || 'Mime-Version: 1.0' || crlf ||
'Content-Type: multipart/mixed; boundary="' || boundary || '"' ||
crlf || crlf ||
'This is a Mime message, which your current mail reader may not' || crlf ||
'understand. Parts of the message will appear as text. If the remainder' || crlf ||
'appears as random characters in the message body, instead of as' || crlf ||
'attachments, then you''ll have to extract these parts and decode them' || crlf ||
'manually.' || crlf || crlf;
utl_smtp.write_data(conn,mesg);
-- Write the text message or message file, if any
if message is not null then
mesg := '--' || boundary || crlf ||
'Content-Type: text/plain; name="message.txt"; charset=US-ASCII' ||
crlf ||
'Content-Disposition: inline; filename="message.txt"' || crlf ||
'Content-Transfer-Encoding: 7bit' || crlf || crlf;
utl_smtp.write_data(conn,mesg);
if instr(message,'/') = 1 or instr(message,':\') = 2 or
instr(message,'\\') = 1 then
split_path_name(message,directory_path,file_name);
append_file(directory_path,file_name,'text',conn);
utl_smtp.write_data(conn,crlf);
else
utl_smtp.write_data(conn,message || crlf);
end if;
end if;
-- Write the HTML message or message file, if any
if html_message is not null then
mesg := '--' || boundary || crlf ||
'Content-Type: text/html; name="message.html"; charset=US-ASCII' ||
crlf ||
'Content-Disposition: inline; filename="message.html"' || crlf ||
'Content-Transfer-Encoding: 7bit' || crlf || crlf;
utl_smtp.write_data(conn,mesg);
if instr(html_message,'/') = 1 or instr(html_message,':\') = 2 or
instr(html_message,'\\') = 1 then
split_path_name(html_message,directory_path,file_name);
append_file(directory_path,file_name,'text',conn);
utl_smtp.write_data(conn,crlf);
else
utl_smtp.write_data(conn,html_message || crlf);
end if;
end if;
-- Append the files
for i in 1..3 loop
-- If the filename has been supplied ...
if file_array(i) is not null then
split_path_name(file_array(i),directory_path,file_name);
-- Generate the MIME boundary line according to the file (mime) type
-- specified.
mesg := crlf || '--' || boundary || crlf;
if substr(type_array(i),1,4) != 'text' then
mesg := mesg || 'Content-Type: ' || type_array(i) ||
'; name="' || file_name || '"' || crlf ||
'Content-Disposition: attachment; filename="' ||
file_name || '"' || crlf ||
'Content-Transfer-Encoding: base64' || crlf || crlf ;
else
mesg := mesg || 'Content-Type: application/octet-stream; name="' ||
file_name || '"' || crlf ||
'Content-Disposition: attachment; filename="' ||
file_name || '"' || crlf ||
'Content-Transfer-Encoding: 7bit' || crlf || crlf ;
end if;
utl_smtp.write_data(conn,mesg);
-- Append the file contents to the end of the message
append_file(directory_path,file_name,type_array(i),conn);
utl_smtp.write_data(conn,crlf);
end if;
end loop;
-- Append the final boundary line
mesg := crlf || '--' || boundary || '--' || crlf;
utl_smtp.write_data(conn,mesg);
-- Close the SMTP connection
utl_smtp.close_data(conn);
utl_smtp.quit(conn);
exception
when utl_smtp.transient_error or utl_smtp.permanent_error then
my_code := SQLCODE;
my_errm := SQLERRM;
V_CODIERRO := SQLCODE;
V_DESCERRO := SQLERRM;
begin
utl_smtp.quit(conn);
exception
when utl_smtp.transient_error or utl_smtp.permanent_error then
null;
end;
-- raise_application_error(-20000,
-- 'Failed to send mail - SMTP server down or unavailable: Error code ' ||
-- my_code || ': ' || my_errm);
when others then
my_code := SQLCODE;
my_errm := SQLERRM;
V_CODIERRO := SQLCODE;
V_DESCERRO := SQLERRM;
raise_application_error(-20000,
'Failed to send mail: Error code ' || my_code || ': ' || my_errm);
end;
Edited by: mosquito70 on Jan 22, 2009 12:33 PMThank's,
but the problem is that I have the system user password but I haven't that of sys.
So, if I try to run the statment
grant select on dba_directories to myuser;
I have the this code error ORA-01031
How can resolve, without use all_directories?
Thank's
Bye -
Error while compiling procedure
Hai All
I have created a procedure its get created and while executing its get an error
My Requirement
I have a table called attendance and the fields are
Empcode var,name var intime date,outtime date ,WTime number, ETime number ,L_in number, L_out number
So Now i need to calculate How many minutes the employees come late for working hours The shifts starts at 0815 and the grace mins Is 5 min SO after 0820 i need to calculate L_In and The shifts closed At 1645 and Now i need to calculate How many min Before He is going
MY Procedure
create or replace PROCEDURE L_TIME(in_time dail_att.intime%type
,out_time dail_att.outtime%type,
id_in in dail_att.idein%type,
id_out out dail_att.ideout%type,
F_date dail_att.attend_Date%type)
IS
BEGIN
If to_char(in_time,'hh24mi') > 0820 and to_char(out_time,'hh24mi') < 1650 then
if id_in is null then
update dail_att set idein= (to_char(intime,'hh24mi')-0820) where attend_date= f_date;
else
update dail_att set ideout= (to_char(outtime,'hh24mi')-1650)where attend_date=f_date;
end if;
While iam executin like this
execute L_TIME ('01-jan-2010 0820','01-jan-2010 1520','01-jan-2010');
I got an error How to solve these error
Thanks In Advance
Srikkanth.MAssuming your parameter are based on DATE table columns...
you are passing in VARCHAR into the procedure. These needs to be implicitly converted to a DATE, depending on your NLS settings. It's better to pass in DATEs instead of strings.
to_date ('01-jan-2010 0820','dd-mon-yyyy hh24mi')In your procedure compare DATEs to DATEs; don't convert them to Char. You rely a lot on implicit datatype conversion, like this one
to_char(in_time,'hh24mi') > 0820 Here you compare Char with a NUMBER....
Next time also post the exception that you are getting. -
Different compilation procedure for 2.6.29.3?
I compiled a custom kernel with the new 2.6.29.3 kernel today but this time I do not have a bzImage file in arch/x86/boot. Instead, I have a vmlinux file at the top level of the kernel source folder. Is this the image file I am supposed to boot from or am I missing something?
Everytime I compile a kernel, the image is called vmlinuz.
Before configuring, I run: make mrproper && make menuconfig
After configuring, I run: make && make modules_install && make install -
Win 8.1 OneDrive upload stalls, no indicator, no error
Now that OneDrive offers 1TB of storage, I am attempting to upload all of my music, videos, and pictures - about 225GB of data. This is not working. OneDrive mysteriously stalls the upload. There are no indications of the upload stalling/stopping/pausing.
I know it is stalled ONLY because I'm looking at network traffic and it is ZERO!
If I check the Win 8 OneDrive app, the app indicates there "2 actions in progress..." Bringing the OneDrive app into context by clicking it, CPU utilization rises dramatically. Sometimes to 80-90% range. Bring anything else back into
the foreground, CPU util drops to a couple of %. There is no impact by having/not having and upload in progress. CPU util is a bug in the OneDrive app. Intermittent, btw, for anybody that wants to file a bug on it.
If I check the systray icon in Desktop by floating my mouse over it, the tooltip says, "Uploading 87.2 GB of 149.3 GB (58%)" (btw, due to restarts, it adusted the 225GB down to 150GB). However that's wrong. Nothing is actually uploading.
If I click the systray icon a small console pops up with the syncing icon appearing and the following text displayed:
"Uploading - 58% complete
4904 items remaining
Sync
Pause syncing
Open OneDrive in File Explorer"
Again, this is wrong as there is ZERO network traffic.
If I click the "Pause syncing" link, OneDrive is confused and thinks an error occurred. It displays the exclamation mark inside a yellow triangle and states:
"File syncing is paused
4904 items couldn't be uploaded
View sync problems
Resume syncing
Open OneDrive in File Explorer"
Obviously this is wrong, there was no error. Why it now displays the status as "paused", when clearly based on network traffic it was already paused, I don't know. It's been paused all along. If I click the "Resume syncing"
link, the sync will indeed resume to the maximum rate of my outbound internet connection (about 6.5Mbps). However, when I come back to my PC after an hour or so, I find the same state: No network traffic, but OneDrive is indicating a sync is in
progress.
I have gone through all the power options to disable sleep, disable hibernation, disable drive shutdown, disable monitor shutoff, etc. I went through network adapter advanced config and disabled power off (which is for power savings).
First off, while a sync is in progress, Windows should be smart enough to know NOT to shut down or enter low power modes, but due to bugs, that is not the case. Second, even after modifying the power profile and keeping my PC and all ancillary hardware
alive, OneDrive still pauses and does so without any indicators anywhere. OneDrive appears to think the transfer is still going.
I have verified all updates are installed. I have rebooted my PC. I've sat here and watched over it hoping to catch the problem, but have never seen it occur while I'm active on my PC. I've verified this same problem occurs on other PCs.
I'm out of ideas.
What is the point of having 1TB of storage if I can't upload anything to it? Uploading this much data at 6.5Mbps will take days. I cannot sit here and babysit my PC for days on end to find a workaround for Windows/OneDrive bugs.
Please help.
Regards,
MichaelMichael
One drive questions need to be asked here. On a different note I would make sure Onedrive is completely backed
up AFAIK it is not.
Wanikiya and Dyami--Team Zigzag -
I have contacted adobe CusServ 5 times. Each time I get a different answer. One even went so far as giving me a new, full product serial number which still would not allow updates to be applied. Their only solution is to pay for the "cloud". I don't need the "cloud". My CS5 does everything I need and has worked great up until my computer died. It was running win7 ultimate. My new computer runs win 8.1. Not the pro version. Should I go to Corel, maybe they are more helpful? Help please!
I have looked at the other similar issues here and the answers are all similar. 1)Contact CS agent. Useless, they say come here to the forum. 2)apply SN from previous product. Did that and loaded CS4 also. No help. 3)Get a new serial number. got a new SN for a full product from one of the CS agents. Same problem.
I have deactivated, activated. I have uninstalled and re-installed several times. The CS agents I have spoken to were useless, the only way I could get them to try anything was to suggest that the problem was beyond their competency. I refuse to pay $30 a month for the functionality I have all ready purchased. Adobe is degenerating. I hope more people reject the "cloud" concept.Hi Guys,
Ive got the same problems as you, Win XP SP2 on RAID 1 hard disk set on an AMD raid controller, but I have no driver to roll-back to.
Ive installed Photoshop CS3 and also Acrobat Standard 8 (which used to run fine on an old system), but all i get now is the blank window with the menu and title bar and thats all.
Can some one help? (will this licensing patch resolve the issue - and where can i get it from?)
Thanks
Maybe you are looking for
-
Google Analytics in iWeb (continued thread from 'Anchor Tabs in iWeb')
Cyclosaurus wrote: --it's more precise than widget placement (if you add text the y-axis placemnt will change of course screwing up the entire alignment, which is why this royally screwed up without built-in anchor tags) I'm glad you got it. I have a
-
Is Coverflow no longer available in iTunes on the iMac ?
Is Coverflow no longer available in iTunes on the iMac ?
-
Mac mini "Overtemp" signal and sleep received regularly.
mac mini "Overtemp" signal received regularly. been researching the regular "Overtemp signal" received by my mini (Mac Mini PPC G4/PowerMac 10,1, 1.42GHz, 1G RAM, Tiger 10.4.11) followed by forced sleep since around the time i updated adobe flash a m
-
Mixing geospatial queries with business rules
Is there an easy way to incorporate a Spatial-/Locator-based geo-spatial query into an Oracle Business Rules rule? For example (pardon my psuedo-code): IF pub within 2 miles of my house AND pub sells cider THEN walk to pub If not then is there anothe
-
Printing in ink backup mode on 7960
Despite replacing all 3 ink cartridges with 3 brand new ones (which was costly), my 7960 printer continues to display the message "Printing in ink backup printing mode." I made sure to remove the protective tape and seated them solidly when I install