REP-0004: Warning: Unable to open user preference file


Symptoms:

All concurrent requests that run REPORTS are printing the following warning in the request log.
“REP-0004: Warning: Unable to open user preference file”
Your local (customized) Oracle Reports preference file could not be opened.
This is just a warning, so the product will continue to run even if this occurs.
The possible causes of this error include the following:
CAUSE 1: The file was not found under the specified name in the specified location
CAUSE 2: You lacked the necessary privileges to open the file.

SOLUTION [ID 1120529.1] :

To resolve the warning, copy the prefs.ora file from your Reports Builder $ORACLE_HOME/tools/admin/ directory into the Applications $HOME directory.

Example:

Copy of the file prefs.ora in the directory /u01/prod/apps/tech_st/10.1.2/tools/admin to the directory  /home/applmgr/

Note: Bounce apache service.

After doing above steps my issue resolved.

Cold clone Oracle 12c Database steps on Linux

Environment detailed

OS:- Linux7.2 / 64 bits.
Oracle Database:- 12.1.0

                                        Cold clone PROD to UAT environment


What is Database Cloning?
Cloning is a process that can be used to create a copy of the existing Oracle database. Sometimes DBA’s need to clone databases to test backup, development environments and Relocating an database to another machine, and  recovery strategies or export a table that was dropped from the production database and import it back into the production database.
Cold backup Database Cloning is simplest method to clone the database . The disadvantage with this approach is that database will be down during cold backup.
The high level steps for How to clone the database using Cold backup Database Cloning
1) Take the cold backup of the database to be cloned
2) Copy all the backup files to the destination server
3) Create the init.ora ,then startup nomount then create the control file on the new location
4) alter database open resetlogs to bring the new clone online


PROD_SID= Airtel (Source) Host_name:-sujeet
UAT_SID= Idea (Target) Host_name:- Sonu
Steps:-1
Login with Source Instance(PROD).
[oracle@sujeet ~]$ sqlplus / as sysdba
SQL> select INSTANCE_NAME,STATUS from v$INSTANCE;
INSTANCE_NAME    STATUS
---------------- ------------
Airtel            OPEN

SQL> create pfile from spfile;
File created.

SQL> select name, value From v$parameter Where name='user_dump_dest';
NAME                                                                                    VALUE
--------------------------------------------------------------------------------
user_dump_dest                             /Airtel/product/12.1.0/dbhome_1/rdbms/log

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/Airtel/oradata/airtel/Airtel/datafile/o1_mf_system_cmrsn65x_.dbf
/Airtel/oradata/airtel/Airtel/datafile/tfqa01.dbf
/Airtel/oradata/airtel/Airtel/datafile/o1_mf_sysaux_cmrslrt4_.dbf
/Airtel/oradata/airtel/Airtel/datafile/o1_mf_undotbs1_cmrsopm4_.dbf
/Airteloradata/airtel/Airtel/datafile/rcqa01.dbf
/Airtel/oradata/airtel/Airtel/datafile/o1_mf_users_cmrsomgs_.dbf
/Airtel/oradata/airtel/Airtel/datafile/icdata01.dbf
/Airtel/oradata/airtel/Airtel/datafile/icindx01.dbf

8 rows selected.

SQL> select member from v$logfile;

MEMBER
--------------------------------------------------------------------------------
/Airtel/oradata/airtel/Airtel/onlinelog/o1_mf_3_cmrspswy_.log
/Airtel/fast_recovery_area/Airtel/onlinelog/o1_mf_3_cmrspt1y_.log
/Airtel/oradata/airtel/Airtel/onlinelog/o1_mf_2_cmrsprnj_.log
/Airtel/fast_recovery_area/Airtel/onlinelog/o1_mf_2_cmrsprs3_.log
/Airtel/oradata/acsqa/Airtel/onlinelog/o1_mf_1_cmrspqcg_.log
/Airtel/fast_recovery_area/Airtel/onlinelog/o1_mf_1_cmrspqjb_.log

6 rows selected.
SQL> show parameter control_files;
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      /Airtel/oradata/airtel/Airtel                                                                                                            /controlfile/o1_mf_cmrspnsv.ctl

Create the script that will re-create the control file:

SQL> alter database backup controlfile to trace;

Database altered.


Steps:-2
Shut down PROD server.
SQL> shutdown immediate
SQL> !

Steps:-3

Copy source PFILE to Target instance.

Go to Pfile location on PROD:-
[oracle@sujeet dbs]$ cd /Airtel/product/12.1.0/dbhome_1/dbs
[oracle@sujeet dbs]$ cp initacsqa.ora /Idea/product/12.1.0/dbhome_1/dbs/

Rename PFILE on Target instance
[oracle@sonu dbs]$ mv initAirtel.ora initIdea.ora
[oracle@sonu dbs]$ ll
-rw-r--r-- 1 oracle oinstall 1002 Dec 29 01:50 initIdea.ora

[oracle@sonu dbs]$ chmod 777 initIdea.ora

Edit Pfile on Target server:-


Idea.__data_transfer_cache_size=0
Idea.__db_cache_size=8388608
Idea.__java_pool_size=16777216
Idea.__large_pool_size=33554432
Idea.__oracle_base='Idea'#ORACLE_BASE set from environment
Idea.__pga_aggregate_target=603979776
Idea.__sga_target=989855744
Idea.__shared_io_pool_size=0
Idea.__shared_pool_size=230686720
Idea.__streams_pool_size=0
*.audit_file_dest='/Idea/admin/idea/adump'
*.audit_trail='db'
*.compatible='12.1.0.2.0'
*.control_files='/Idea/oradata/idea/IDEA/controlfile/o1_mf_cmrspnsv_.ctl','/Idea/fast_recovery_area/IDEA/controlfile/o1_mf_cmrspnxf_.ctl'
*.db_block_size=8192
*.db_create_file_dest='/Idea/oradata/idea'
*.db_domain='sonu.net'
*.db_name='Idea'
*.db_recovery_file_dest='/Idea/fast_recovery_area'
*.db_recovery_file_dest_size=4560m
*.diagnostic_dest='/Idea'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=IdeaXDB)'
*.open_cursors=300
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'

*.undo_tablespace='UNDOTBS1'


Steps:-4
copy new trace file from PROD to UAT server.
[oracle@sujeet ~]$ cd  /Airtel/product/12.1.0/dbhome_1/rdbms/log
[oracle@sujeet log]$ cp Airtel_ora_4547.trc /Idea/product/12.1.0/dbhome_1/rdbms/log

Rename trace file with .sql format.
[oracle@sonu ]$ cd /Idea/product/12.1.0/dbhome_1/rdbms/log
[oracle@sonu log]$ mv Airtel_ora_4547.trc  Idea_c1.sql

Edit control file created scripts.

[oracle@sonu log]$ vi Idea_c1.sql
CREATE CONTROLFILE SET DATABASE "IDEA" RESETLOGS NOARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 2
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
GROUP 1'/Idea/oradata/Idea/IDEA/onlinelog/o1_mf_1_cmrspqcg_.log' SIZE 50M,
GROUP 2'/Idea/oradata/Idea/IDEA/onlinelog/o1_mf_2_cmrsprnj_.log' SIZE 50M,
GROUP 3'/Idea/oradata/Idea/IDEA/onlinelog/o1_mf_3_cmrspswy_.log' SIZE 50M,
GROUP 4'/Idea/fast_recovery_area/IDEA/onlinelog/o1_mf_1_cmrspqjb_.log' SIZE 50M,
GROUP 5'/Idea/fast_recovery_area/IDEA/onlinelog/o1_mf_2_cmrsprs3_.log' SIZE 50M,
GROUP 6'/Idea/fast_recovery_area/IDEA/onlinelog/o1_mf_3_cmrspt1y_.log' SIZE 50M
DATAFILE
'/Idea/oradata/Idea/IDEA/datafile/o1_mf_system_cmrsn65x_.dbf',
'/Idea/oradata/Idea/IDEA/datafile/tfqa01.dbf',
'/Idea/oradata/Idea/IDEA/datafile/o1_mf_sysaux_cmrslrt4_.dbf',
'/Idea/oradata/Idea/IDEA/datafile/o1_mf_undotbs1_cmrsopm4_.dbf',
'/Idea/oradata/Idea/IDEA/datafile/rcqa01.dbf',
'/Idea/oradata/Idea/IDEA/datafile/o1_mf_users_cmrsomgs_.dbf',
'/Idea/oradata/Idea/IDEA/datafile/icdata01.dbf',
'/Idea/oradata/Idea/IDEA/datafile/icindx01.dbf'
CHARACTER SET WE8ISO8859P1
;
ALTER DATABASE OPEN RESETLOGS;

:wq <SAVE this file as is it>

Steps:-5
Copy Datafile, Logfile & ORACLE_HOME PROD to UAT Server.
Copy Datafile:-
[oracle@sujeet datafile]$cd /Airtel/oradata/airtel/Airtel/datafile
 [oracle@sujeet datafile]$ cp * /Idea/oradata/idea/IDEA/datafile

 Copy Logfile:-
[oracle@sujeet  onlinelog]$ cd /Airtel/fast_recovery_area/AIRTEL/onlinelog
 [oracle@sujeet onlinelog]$ cp * /Idea/fast_recovery_area/IDEA/onlinelog
[oracle@sujeet ~]$ cd /Airtel/oradata/airtel/AIRTEL/onlinelog
 [oracle@sujeet onlinelog]$ cp * /Idea/oradata/idea/IDEA/onlinelog

Copy ORACLE_HOME:-
[oracle@sujeet ~]$ cd $ORACLE_HOME
[oracle@sujeet dbhome_1 ~]$ cp -r * /Idea/product/12.1.0/dbhome_1

Steps:-6
Set .Bash_Profile on UAT Server.

Steps:-7
[oracle@sonu ~]$ . .bash_profile
[oracle@sonu ~]$ sqlplus / as sysdba
SQL> startup nomount pfile='/Idea/product/12.1.0/dbhome_1/dbs/initIdea.ora';
ORACLE instance started.
Total System Global Area  251658240 bytes
Fixed Size                  2923096 bytes
Variable Size             192939432 bytes
Database Buffers           50331648 bytes
Redo Buffers                5464064 bytes

Steps:-8
Run the re-created control file script on IDEA clone database:
SQL> @Idea_c1.sql
Control file created.
Database altered.

Steps:-9
SQL> select INSTANCE_NAME,STATUS from v$INSTANCE;

INSTANCE_NAME    STATUS
---------------- ------------
Idea          OPEN

SQL> create spfile from pfile;

File created.

Check New clone UAT server files location.

SQL> select name from v$datafile;
SQL> select member from v$logfile;
SQL> show parameter control_files;

*************************************END******************************************

Oracle Application in DMZ (Demilitarized Zone)

DMZs For Civilians

In the IT industry, a demilitarized zone is a single or multi-segment perimeter network that demarks the portion of the corporate network that lies between the intranet and outside networks.  Corporate DMZ borders are enforced by firewalls and other dedicated networking devices.  






DMZs for the E-Business Suite

AutoConfig supports the use of DMZs with the E-Business Suite Release 11i, and an increasing number of our customers have either already implemented them or are planning to do so.  This is a common configuration:




In the configuration above, there are two different E-Business Suite application servers, each with its own unique domain name and setup.  External users access the E-Business Suite via the external "acme.company.com" address, and internal users access it via the "staff.acme.com" address.

Different Responsibilities for Internal and External Servers

It's possible (and recommended) to restrict the general set of Applications Responsibilities based on the application server that you're using.  

For example, there should be no reason to allow external users to modify your company's Chart of Accounts, so that responsibility can't be used if the end-user is logging in from outside the corporate intranet.

Possible Weak Points

There are two possible weaknesses with the first configuration shown above:
  1. If your external firewall is compromised, your external application server is also compromised, exposing an attack on your E-Business Suite database.
  2. There's nothing to prevent your internal users from attacking your internal application server, also exposing an attack on your E-Business Suite database.
Reverse Proxies and DMZs

If you're concerned about your external firewall being hacked, one possible countermeasure is to use layered DMZs and put a reverse proxy in the first DMZ.  




The reverse proxy has restricted capabilities and and the authority only to speak with the external application server.  It's possible to use the following as reverse proxies with the E-Business Suite:
  • Oracle Web Cache
  • Oracle HTTP Server
  • Other third-party reverse proxy servers, including Apache and Microsoft Proxy Server
An Inside Job

I'm a big fan of heist and con artist movies.  According to Hollywood, you can't pull off a big job without someone on the inside.  

It seems a lot of IT security analysts are fans, too, since they regularly publish surveys that suggest that the majority of security breaches are the result of employees with their hand in the till.  If we're to learn anything from movies, it's this:  trust nobody, not even your internal end-users.

That's why the second configuration above shows the E-Business Suite database server protected by its own firewall.  Even if your internal application server is compromised by an industrious but disgruntled fellow employee, your database is still protected.

Scratching the Surface

There are a number of other interesting DMZ-related architectural options for the E-Business Suite.  If you'd like to get more details, the following document is recommended reading:


Vendor API - Error creating contact - Contact information you are trying to import is already associated (Doc ID 1616295.1)


APPLIES TO:

Oracle Payables - Version 12.1.3 and later
Information in this document applies to any platform.
SYMPTOMS

On : 12.1.3 version, Supplier SupReports Merge Emp

When attempting to create a new vendor contact via the API
the following error occurs.

ERROR
-----------------------

-> User receiving error 'ERROR : Contact information you are
-> trying to import is already associated'


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
import vendor contact details

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot import such data


CAUSE

BUg 17619121


SOLUTION

apply Patch 17619121

ORA-28000: the account is locked

Unlock User and set FAILED_LOGIN_ATTEMPTS to unlimited.






View Profile Assigned to a User:

SQL> SELECT PROFILE FROM DBA_USERS
WHERE USERNAME='SCOTT';

  PROFILE
 ----------
  DEFAULT

View Limits Set for the Profile:

SQL> SELECT RESOURCE_NAME, LIMIT FROM DBA_PROFILES
WHERE PROFILE='DEFAULT';

 RESOURCE_NAME  LIMIT   
------------------------    -------------       
COMPOSITE_LIMIT                UNLIMITED       
SESSIONS_PER_USER              UNLIMITED       
CPU_PER_SESSION               UNLIMITED       
CPU_PER_CALL                   UNLIMITED       
LOGICAL_READS_PER_SESSION     UNLIMITED       
LOGICAL_READS_PER_CALL        UNLIMITED       
IDLE_TIME                      UNLIMITED       
CONNECT_TIME                   UNLIMITED       
PRIVATE_SGA                    UNLIMITED       
FAILED_LOGIN_ATTEMPTS         10       
PASSWORD_LIFE_TIME            UNLIMITED       
PASSWORD_REUSE_TIME            UNLIMITED       
PASSWORD_REUSE_MAX            UNLIMITED       
PASSWORD_VERIFY_  FUNCTION     NULL       
PASSWORD_LOCK_TIME             UNLIMITED       
PASSWORD_GRACE_TIME            UNLIMITED       
16 rows selected.

Alter FAILED_LOGIN_ATTEMPTS Parameter:

From the user's profile we can see that the FAILED_LOGIN_ATTEMPTS parameter is set to a value of 10. Now we run below command to make it UNLIMITED.

SQL> ALTER PROFILE DEFAULT LIMIT FAILED_LOGIN_ATTEMPTS UNLIMITED;
Profile altered.

Unlock the Account:

Finally we will unlock the account by running below command.

SQL> ALTER USER SCOTT ACCOUNT UNLOCK;

RMAN-05520

Versions 10.2, 11.1, 11.2, 12.1

Error:  RMAN-05520 database name mismatch, auxiliary instance has %s, command specified 
%s 
---------------------------------------------------------------------------
Cause:-
 The database name specified in the initialization parameter was not the same as the database name provided in the DUPLICATE command.


Solution:-

Correct the database name in the command or adjust the database name of the auxiliary instance.


OR

Rman leaves modified auxiliary spfile parameters if DUPLICATE fails (Doc ID 1283344.1) To BottomTo Bottom

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

APPLIES TO:

Oracle Database - Enterprise Edition - Version 11.2.0.1 to 11.2.0.1 [Release 11.2]
Information in this document applies to any platform.

SYMPTOMS:-

RMAN duplicate leaves behind an spfile for the auxiliary database if the duplicate fails with db_name set to the target db_name.
This causes subsequent rerun of the duplicate after fixing the failure to fail with:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 07/26/2010 13:22:29
RMAN-05520: database name mismatch, auxiliary instance has <target db_name>, command specified <auxilliary db_name>

CAUSE:-

Bug 9302045:  RMAN DUPLICATE W/O CONNECTION TO TARGET CREATES SPFILE WITH DB_NAME OF TARGET.

This is a duplicate of unpublished bug 9393650: IF AUXILIARY STARTED WITH SPFILE AND DUPLICATE FAILS SPFILE HAS BAD PARAMETERS

SOLUTION:-

Manually amend the auxiliary spfile prior to rerunning duplicate or request a backport of unpublished bug 9393650 to 11.2.0.1 for your platform.

Unpublished bug 9393650 is fixed in 11.2.0.2 Patch Set Release.

REFERENCES

BUG:9302045 - RMAN DUPLICATE W/O CONNECTION TO TARGET CREATES SPFILE WITH DB_NAME OF TARGET

The XML Publisher Concurrent Request Fails Due to the Output Post Processing

Three possible errors can occur as below:
  • The Output Post Processor is not running or does not pick up the request
…
+————- 1) PUBLISH ————-+
Unable to find an Output Post Processor service to post-process request [request_id].
Check that the Output Post Processor service is running.
+————————————–+
…
Solutions:

* Verify that the Output Post Processor is enabled and active.
* If confirmed, retrieve the OPP log file either via the Forms application or via the Oracle Application Manager.
– Via the Forms application:
  1. Login to the application as SYSADMIN
  2. Responsibility: System Administrator
  3. Function: Concurrent –> Manager –> Administration
  4. Select the Output Post Processor
  5. Click on the Processes button
  6. Select the Concurrent Process which was active during the time that the request ran
  7. Click on the Manager Log button to open the Output Post Processor log file
– Via the Oracle Application Manager
  1. Login to the application as SYSADMIN
  2. Responsibility: System Administration
  3. Function: Oracle Applications Manager –> Concurrent Managers
  4. Select the Output Post Processor Service and click on View Details
  5. Click on View Processes
  6. Select the Concurrent Process which was active during the time that the request ran
  7. Click on the Log button to open the Output Post Processor log file
  • The Output Post Processor is running but has not picked up the request
...
+------------- 1) PUBLISH -------------+
The Output Post-processor is running but has not picked up
this request.No further attempts will be made to post-process
this request, and the request will be marked with Warning status.
Setting the profile option Concurrent: OPP Response Timeout
to a higher value may be necessary.
+--------------------------------------+
...
By default a timeout will occur if it takes longer then 120 seconds (2 min.) for the Output Post Processor to pick up the request from the Concurrent Manager process. In that case, the Concurrent Request will complete with status Warning and the Request log file will contain error message like above.
Solutions:

* Increase the value (in seconds) for the profile option ‘Concurrent:OPP Response Timeout‘.
  • The concurrent manager has timed out waiting for the Output Post-processor to finish this request
…
+————- 1) PUBLISH ————-+
The concurrent manager has timed out waiting for the Output Post-processor
to finish this request.
Check that there are enough Output Post-processor service processes running.
More information may be found in the service process logfile.
+————————————–+
…
The concurrent manager process has successfully invoked the OPP but it a timeout is encountered as the OPP takes too long to complete the job.
The time that this takes will depends on various elements such as:
  • size of the XML Data File
  • complexity of the template
  • performance of the server
  • ….
By default a timeout will occur if it takes longer then 300 seconds (5 min.) for the XML Publisher engine to generate the output file. The Concurrent Request will complete with status Warning and the Request log file will contain error message like above.
Solutions:
* 
Increase the value (in seconds) for the profile option ‘Concurrent:OPP Process Timeout‘.

  • Output Post Processor (OPP) Log Contains Error “java.lang.OutOfMemoryError: Java heap space”

  • java.lang.reflect.InvocationTargetException Caused by:java.lang.OutOfMemoryError: Java heap space atoracle.xdo.parser.v2.XMLDocument.createNodeFromType(XMLDocument.java:2869) atoracle.xdo.parser.v2.XMLDocument.createNodeFromType(XMLDocument.java:3000)
Solutions:

1. Determine what the heap size per OPP process is currently:
  • select DEVELOPER_PARAMETERS from FND_CP_SERVICES
    where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
    where CONCURRENT_QUEUE_NAME = ‘FNDCPOPP’);
2. The default should be:
  • J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx512m
3. Increase the Heap Space per Process to 1024:
  • update FND_CP_SERVICES
    set DEVELOPER_PARAMETERS = ‘J:oracle.apps.fnd.cp.gsf.GSMServiceController:-mx1024m’
    where SERVICE_ID = (select MANAGER_TYPE from FND_CONCURRENT_QUEUES
    where CONCURRENT_QUEUE_NAME = ‘FNDCPOPP’);
4. Bring the managers down.
5. Run cmclean.sql script from Note 134007.1 – CMCLEAN.SQL Non-Destructive Script to Clean Concurrent Manager Tables.
6. Bring the managers up again.
OR
1. Log into applications with the System Administrator responsibility.
2. Navigate to Concurrent -> Program -> Define
3. Query the XML Publisher Template Re-Generator program
4. Set the following value for the Executable Options : -Xmx1024m
5. Save changes.
6. Retest the program.
OR
Configure the XML Publisher Administrator Configuration settings.
1. As XML Publisher Administrator navigate to Administration->Configuration.
2. Under Temporary Directory pick a temporary file location on your concurrent processing node. This should be at least 5GB or 20x larger than largest XML data file you generate
3.  Under FO Processing, set:
o Use XML Publisher’s XSLT processor set to True
o Enable scalable feature of XSLT processor set to False
o Enable XSLT runtime optimization set to True

ERROR 1396 (HY000): Operation ALTER USER failed for 'Mysql'@'%'

 This MySQL error — ERROR 1396 (HY000): Operation ALTER USER failed for 'Mysql'@'%' — means that MySQL cannot find the user ...