The following errors occurred while install 11.2.0.4 on Linux 7.4. when relink the binary, the same error will be reported as well.
INFO: collect2: error: ld returned 1 exit status
INFO: make[1]:
INFO: *** [/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/emdctl] Error 1
INFO: make[1]: Leaving directory `/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib'
INFO: make: *** [emdctl] Error 2
INFO: End output from spawned process.
INFO: ----------------------------------
SEVERE: oracle.sysman.oii.oiil.OiilActionException: Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/u01/app/oracle/product/11.2.0/dbhome_1/install/relinkActions2018-05-25_09-48-55-AM.log' for details.
at oracle.sysman.oii.oiis.OiisMakeDeps.invokeMakefile(OiisMakeDeps.java:537)
at oracle.sysman.oii.oiis.OiisMakeDeps.doRelink(OiisMakeDeps.java:614)
at oracle.sysman.oii.oiis.OiisMakeDeps.doOperation(OiisMakeDeps.java:799)
at oracle.sysman.oii.oiis.OiisMakeDeps.main(OiisMakeDeps.java:809)
After standby database rebuilt, then trying to copy database password file from primary to standby ASM disk, the below errors occurred:
ASMCMD> pwcopy --dbuniquename RACTEST '/tmp/orapwractest' '+DATA/RACTEST/orapwractest'
copying /tmp/orapwractest -> +DATA/RACTEST/orapwractest
PRCD-1163 : Failed to modify database RACTEST
PRCR-1071 : Failed to register or update resource ora.ractest.db
CRS-0245: User doesn't have enough privilege to perform the operation
ASMCMD-9453: failed to register password file as a CRS resource
The password file was copied to ASM diskgroup ‘+DATA’ successfully, but the configuring of database failed .
WORKAROUND
Rerun the same command without “–dbuniquename RACTEST” option.
After database upgrading / Patching, or database is migrated onto new infrastructure, it is common to see database performance is degrading due to SOL execution plans changed.
What we can do is by creating SQL plan baselines from old database, then copied them on to new database.
1) Identify the SQL plan baseline(s) to be migrated from source database:
SQL> select sql_handle, plan_name, sql_text, enabled, accepted
from dba_sql_plan_baselines
where enabled='YES'
and accepted='YES'
and PLAN_NAME='SQL_PLAN_7ns0utmam6vc64a63fd18';
SQL_HANDLE PLAN_NAME SQL_TEXT ENA ACC
-------------------- ------------------------------ -------- --- ---
SQL_7a601accd5336d86 SQL_PLAN_7ns0utmam6vc64a63fd18 UPDATE . YES YES
7) Unpack the SQL plan baselines in staging table into target database:
SQL> var xx number;
begin
:xx := DBMS_SPM.UNPACK_STGTAB_BASELINE('SPM_TAB', 'TESTUSER');
end;
/
PL/SQL procedure successfully completed.
8) Verify the SQL plan baselines have been migrated onto target database:
SQL>select sql_handle, plan_name, sql_text, enabled, accepted, fixed
from dba_sql_plan_baselines
where SQL_HANDLE='SQL_7a601accd5336d86';
SQL_HANDLE PLAN_NAME SQL_TEXT ENA ACC FIX
-------------------- ------------------------------ ------- --- --- ---
SQL_7a601accd5336d86 SQL_PLAN_7ns0utmam6vc64a63fd18 UPDATE YES YES NO
9) Display execution plans for this SQL handle of a SQL plan baseline:
SQL> set linesize 120
SQL> set pagesize 2000
SQL> select * from TABLE(DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE( -
'SQL_7a601accd5336d86','SQL_PLAN_7ns0utmam6vc64a63fd18'));
Syntax:
DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE (
sql_handle IN VARCHAR2 := NULL,
plan_name IN VARCHAR2 := NULL,
format IN VARCHAR2 := 'TYPICAL')
RETURN dbms_xplan_type_table;
Parameter
Description
sql_handle
SQL statement handle. It identifies a SQL statement whose plan(s) are to be displayed.
plan_name
Plan name. It identifies a specific plan. Default NULL means all plans associated with identified SQL statement are explained and displayed.
format
Format string determines what information stored in the plan displayed. One of three format values (‘BASIC’, ‘TYPICAL’, ‘ALL’) can be used, each representing a common use case.