Thursday, August 24, 2017


Escalate Oracle SR

Step 1 - Insert the template below into the Service Request, including all **** lines. This will ensure correct visibility and content.
******************* Management Attention Request *******************
Reason for request, including business impact of the problem that requires management attention
Business or implementation milestone, critical date(s) (milestone date or resolve by date), along with the type of business or implementation milestone
Name of the customer requesting callback; contact information: phone number, pager, email address

******************* Management Attention Request *******************
Step 2 – Call the Global Support 800#.  You may choose #1 for Existing SR or #2 for New SR.


Tel : 0112430430

Type : 8007111005


Step 3 – Request Support Management Attention. "The magical phrase that pays":  Here is my existing Service Request #, I would like to speak with and receive a callback from the Support Manager. This used to be called the Escalation/Duty Manager 9+ years ago.


Step 4 – Your contact information will be verified and the Support Manager will be identified and notified for callback. It’s not a hot-transfer. Oracle Support strives that the Support Manager shall respond with a sense of urgency and contact you back in 30 minutes or less.







Tuesday, August 22, 2017

Log files in $APPLCSF/$APPLLOG directory

    When Concurrent Request is submitted, log and output files are stored in $APPLCSF/$APPLOG and $APPLCSF/$APPLOUT directories respectively. Apart from *.req files, some other files are also getting stored in $APPLCSF/$APPLOG directory. I would like to give brief description about these files. These are the following files which are getting stored in that directory.
(a) l<Request ID>.req
This is the Concurrent Request log file. When any concurrent request is submitted, request log file is created in this directory with file name as l<Request ID>.req
(b) Events####.log
adstrtal.sh script writes the log information in to this file, when ever there is any problem with starting of any Application Service.
(c) Error####.log
This file contains the Java Exception Errors.
(d) #####.log
This file keeps the information of starting of Apache Listener.
(e) f60webmx_dump_<PID>
This file is created when ever any Client Forms Session ends abruptly. When user forms session got crash or terminated abruptly that diagnostics information is written into this dump file.  If you want to get rid out of this dump files. Please execute the following stepsSet the FORMS60_CATCHTERM = 0 in Registry (NT) or Environment Variable (Unix/Linux) and bounce the Forms Services
(f) em_<PID>.rti
This file contains Client run time process information. These files are used by Oracle Application Manager and Enterprise Manager for Forms Monitoring Services and are generated by Forms runtime processes. For each f60webmx session, there is one .rti file is created. These files are written to the directory set by parameter $FORMS60_RTI_DIR.  By default these are written into $APPLCSF/$APPLLOG directory. RTI files should be automatically cleaned up when user logs out of the forms session, in case user logs out of the forms sessions abruptly. Then these files are not cleaned up properly. So then you may need to clear these files manually. We can delete the files, but we should not delete these files when users are active
em –> enterprise manager
<PID> –> Process ID of Client
rti –< Run time information In some cases,
we need to delete the FNDCPPUR program log files and output files manually to free up the disk space. Here I am giving UNIX commands to find out and deleting the old files. If your FNDCPPUR program is scheduled to run daily and given AGE Mode value as 7, purge Program has to delete the files which are older than 7 days. But if program did not delete the files, use this command to find out those files.
Find the Concurrent Request Log and Output files which are not deleted
 find $APPLCSF/$APPLLOG -mtime +7 -name “*.req”
find $APPLCSF/$APPLOUT -mtime +7 -name “*.out
Delete the Concurrent Request log and output files which are older than 7 Days
 find $APPLCSF/$APPLLOG -mtime +7 -name “*.req” -exec rm “{}” “;”
find $APPLCSF/$APPLOUT -mtime +7 -name “*.out” -exec rm “{}” “;”
Delete other files in $APPLCSF/$APPLLOG directory
find $APPLCSF/$APPLLOG -mtime +7 -name “*.log” -exec rm “{}” “;”
find $APPLCSF/$APPLLOG -mtime +7 -name “*.mgr” -exec rm “{}” “;”
find $APPLCSF/$APPLLOG -mtime +7 -name “f60webmx*” -exec rm “{}” “;”
find $APPLCSF/$APPLLOG -mtime +7 -name “*.rti” -exec rm “{}” “;”
Reference:
 (1) What Are .RTI and .FLI Files? Doc ID: Note: 470850.1
(2) Oracle Forms in Applications FAQ Doc ID: Note: 177610.1

Oracle 11g: Access Control List and ORA-24247

From a more DBA point of view, I would like to go in more detail in response to Marcel’s blog about APEX web service references and ACL.
With ACL’s, Oracle offers more fine-grained access control for users to access external network resources.
The packages UTL_MAIL, UTL_SMTP, UTL_HTTP, UTL_TCP etc. allow communication beyond the database server to the outside world, but when granted access, all hosts can be accessed. This can be interpreted as a security flaw as no login is required when using UTL_TCP for example. DBA’s are advised to revoke the execute privileges from public on these kind of packages.
Since Oracle 11g, the Access Control List is introduced. You not only can control who has access to these packages by granting, but now you can also control which resources they can call.
For instance, when a user is granted to send emails using UTL_MAIL, you can also control that he/she is only able to send through a specified mail server.
At first this looks like a obstacle (ORA-24247), but since the Voyager worm struck Oracle databases a year ago, it is introduced as an extra security measurement.
I will use the UTL_MAIL package as an example, please scroll to the end of this blog to enable UTL_MAIL as it is disabled by default.

ORA-24247: network access denied by access control list (ACL)

If a user is not allowed to connect to a specific server due to ACL restrictions, the following message will appear: ORA-24247: network access denied by access control list (ACL).
I will walk through the solution by using UTL_MAIL as an example; try to execute the following as SCOTT:
SQL> connect scott/tiger
Connected.
begin
  utl_mail.send(
  sender     => 'scott@tiger.com',
  recipients => 'john@doe.org',
  message    => 'Hello World'
  );
end;
ERROR at line 1:
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_MAIL", line 654
ORA-06512: at "SYS.UTL_MAIL", line 671
ORA-06512: at line 1
This is because the SCOTT does not have the privilege to access the mail/smtp server. So it must be added to the ACL.

ACL: Access Control List

The ACL is created as a file and it’s file name is used as the key in the process of adding and removing privileges.

Create ACL and privileges

Now first create an ACL as SYS (or any other user with DBMS_NETWORK_ACL_ADMIN execute granted), this will hold the privileges. You can add as many privileges as you like to this file, but I would recommend to split privileges in the ACL to specific tasks or users. You must create an ACL with at least one privilege, so lets start with the ‘connect’ privilege for user SCOTT, (also a role can be added as principal):
begin
  dbms_network_acl_admin.create_acl (
    acl         => 'utl_mail.xml',
    description => 'Allow mail to be send',
    principal   => 'SCOTT',
    is_grant    => TRUE,
    privilege   => 'connect'
    );
    commit;
end;

Add Privilege

Great, now that the ACL is created, you can add more privileges like the ‘resolve’ privilege:
begin
  dbms_network_acl_admin.add_privilege (
  acl       => 'utl_mail.xml',
  principal => 'SCOTT',
  is_grant  => TRUE,
  privilege => 'resolve'
  );
  commit;
end;

Assign ACL

Cool, you granted SCOTT to connect and resolve, but you have not defined to which resources he is allowed to connect:
begin
  dbms_network_acl_admin.assign_acl(
  acl  => 'utl_mail.xml',
  host => 'smtp server host name or address'
  );
  commit;
end;

Try again

SQL> connect scott/tiger
Connected.
begin
  utl_mail.send(
  sender     => 'scott@tiger.com',
  recipients => 'john@doe.org',
  message    => 'Hello World'
  );
  commit;
end;
PL/SQL procedure successfully completed.

Access to websites and ports

The ACL also allows you to control begin and end ports, begin and end dates.
Run as SCOTT:
SQL> select utl_http.request('http://www.tiger.com') from dual;
select utl_http.request('http://www.tiger.com') from dual
       *
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1722
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at line 1

 Create ACL, add privileges and assign the ACL with ports

Run as SYS:
begin
  dbms_network_acl_admin.create_acl (
    acl         => 'utl_http.xml',
    description => 'HTTP Access',
    principal   => 'SCOTT',
    is_grant    => TRUE,
    privilege   => 'connect',
    start_date  => null,
    end_date    => null
  );
  dbms_network_acl_admin.add_privilege (
    acl        => 'utl_http.xml',
    principal  => 'SCOTT',
    is_grant   => TRUE,
    privilege  => 'resolve',
    start_date => null,
    end_date   => null
  );
  dbms_network_acl_admin.assign_acl (
    acl        => 'utl_http.xml',
    host       => 'www.tiger.com',
    lower_port => 80,
    upper_port => 80
  );
  commit;
end;
The hosts parameter in dbms_network_acl_admin.assign_acl, can also contain wild cards like ‘*.tiger.com’ or even ‘*’.

Try again

Run as SCOTT:
SQL> select utl_http.request('http://www.tiger.com') from dual;
UTL_HTTP.REQUEST('HTTP://WWW.TIGER.COM')
----------------------------------------
[result here]
Now try to access the same URL, but with another port. You will see this fails, because only port 80 is privileged.
SQL> select utl_http.request('http://www.tiger.com:1234') from dual;
select utl_http.request('http://www.tiger.com:1234') from dual
       *
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1722
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at line 1
You can specify lower and upper ports like a range when assigning ACL’s.

dba_network_acls

You can view ACL’s and privileges by querying dba_network_acls.
select host, lower_port, upper_port, acl
  from dba_network_acls
  where ACL='/sys/acls/'utl_http.xml';

Removing ACL and priviliges

Of course , removing ACL’s and privileges is also possible and  self explainable.
Run the following as SYS:

Unassign ACL

begin
  dbms_network_acl_admin.unassign_acl(
    acl        => 'utl_http.xml',
    host       => 'www.tiger.com',
    lower_port => 80,
    upper_port => 80
  );
end;

Delete Privilege

begin
  dbms_network_acl_admin.delete_privilege(
    'utl_http.xml', 'SCOTT', NULL, 'connect'
  );
end;

Drop ACL

begin
  dbms_network_acl_admin.drop_acl(
    'utl_http.xml'
  );
end;

Enabling UTL_MAIL

In these examples I use UTL_MAIL, this package is disabled by default, run the following statements as SYS to enable it:
SQL> @?/rdbms/admin/utlmail.sql
SQL> @?/rdbms/admin/prvtmail.plb
SQL> alter system set smtp_out_server = '<smtp host>' scope=spfile;
SQL> shutdown immediate
SQL> startup

 RMAN Recovery Catalog About Recovery Catalog RMAN recovery catalog Is another database which is out of your normal databases or which is o...