Stepping out in a new direction. I currently have several Oracle 8 and 7 databases that I have written nightly clean-up scripts for. Until now, I have done this using a combination of SQL, Unix shell scripting and Cron job calls.
What I want to do is create a stored procedure, and then call it with DBMS_JOBS. I connected to the database using Oracle 7.3.4's Schema Manager and selected to create a new procedure. I gave it a name and selected the appropriate schema. For the source of the procedure, I entered the following:
Really simple code. I create the procedure and it comes back invalid. When I check the errors, it says the following:
The two books I have are pretty worthless. I am going to try and go get the DBA Handbook and the Complete Reference today, but was wondering if anyone could see what is wrong.
Thanks in advance... Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.
What I want to do is create a stored procedure, and then call it with DBMS_JOBS. I connected to the database using Oracle 7.3.4's Schema Manager and selected to create a new procedure. I gave it a name and selected the appropriate schema. For the source of the procedure, I entered the following:
Code:
BEGIN
DELETE FROM C_SALES
WHERE DATE_OF_SALE < SYSDATE - 400;
COMMIT;
DELETE FROM C_OFFERS
WHERE DATE_OF_SALE < SYSDATE - 400;
COMMIT;
DELETE FROM C_CONTACTS
WHERE DATE_OF_CONTACT < SYSDATE - 400;
COMMIT;
END;
Code:
PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following:
(;is with authid deterministic parallel_enable as compress compiled wrapped
The symbol "is" was substituted for "BEGIN" to continue.
The two books I have are pretty worthless. I am going to try and go get the DBA Handbook and the Complete Reference today, but was wondering if anyone could see what is wrong.
Thanks in advance... Terry M. Hoey
th3856@txmail.sbc.com
While I don't mind e-mail messages, please post all questions in these forums for the benefit of all members.