My task is that I need to check my DB-table every day. Rows older than 10 years have to be deleted automatically and if the state of my row didn't change since 5 days an automatic email should be sent. I already have a script in my WebApplication, but the problem is that clients have to run my Application to execute the Script inside. Its not that smart. I googled a lot but couldnt find some good solutions with good examples.
Does someone has a good solution for my problem? How do i trigger a PHP Script from Oracle if conditions are true?
EDIT:
For my automatic delete concept i have a solution.
But for my Email problem i have found something:
grant execute on UTL_MAIL to public;
BEGIN
EXECUTE IMMEDIATE 'ALTER SESSION SET smtp_out_server = ''127.0.0.1''';
UTL_MAIL.send(sender => '[email protected]',
recipients => '[email protected]',
subject => 'Test Mail',
message => 'Hello World',
mime_type => 'text; charset=us-ascii');
END;
Unfortunetly i get the following error msg:
*24247. 00000 - "network access denied by access control list (ACL)" *Cause: No access control list (ACL) has been assigned to the target host or the privilege necessary to access the target host has not been granted to the user in the access control list. Action: Ensure that an access control list (ACL) has been assigned to the target host and the privilege necessary to access the target host has been granted to the user.
Any ideas what im doing wrong and how i can fix this ?
- Edit:
FIXED my smtp_out_server was the wrong one. I simply got the server by using this query:
SELECT * FROM dba_network_acls;
Thank you all for every single information and help attempt!!
-CAN BE CLOSED-