Wednesday, March 17, 2010

How to relink Oracle when "relink all" fails.

Are you trying to relink oracle and getting
"make: *** No rule to make target `install'. Stop."

or something similar?

The problem is due to "relink all" trying relink all the products in the Oracle Home without checking whether they are actually installed or not.

This does not always work as some makefiles take different arguments, and some Oracle Home installations do not have the components installed for which there are makefiles.

This relinking problem has been addressed in 11.2 with the 11.2 installer getting a -relink option.

Assuming you are not using 11.2, then what to do? Well...

I offer this only as what I currently do. I haven't seen this problem properly discussed anwhere, so this is a 'works for me'.

Each Oracle Home has a file:
 $ORACLE_HOME/inventory/make/makeorder.xml

This file lists the correct order to run the make files, and the targets to use. From this we can build up a list of makefile commands that should be run.

Alternatively you can run the relink command with all the other valid parameters - some will fail if the component is not installed, but theoretically this should compile everything.

At the moment though I am not 100% confidant this is the case, and so for a bit of paranoid DBA practice I also run the make files as listed in makeorder.xml

IMPORTANT NOTE: After relinking, login as root (or use sudo if configured) to execute the $ORACLE_HOME/root.sh script to reset the appropriate file permissions/flags.

By way of example from my last relink - after upgrading from OEL5 U2 to OEL5 U4:

Note that relinking is done as the oracle home owner, not root.

Step 0: Before doing anything check umask is 022. If not:
$ umask 022

Relink database home works (mostly) but fails on relinking ODBC at the end.


The error that initiated this post: Tried a relink all on an ASM home.
Resulted in
 make: *** No rule to make target `install'. Stop."

when trying to link the ODBC driver.

Solution: Well see below, for what I did in teh ASM case, however if you want to relink ODBC this is what I found in a Metalink note:
cd $ORACLE_HOME/odbc/lib
cp $ORACLE_HOME/lib/sqoci.a .
cp $ORACLE_HOME/lib/sqora.a .
cp $ORACLE_HOME/lib/utility.a .
make -f ins_odbc.mk isqora
cp libsqora.so* $ORACLE_HOME/lib

Relink ASM home


. oraenv [+ASM]
cdo
# Note: cdo is a shell alias defined as: alias cdo='cd $ORACLE_HOME'

relink oracle
relink client_sharedlib
relink client
relink utilities
relink ldap
#relink oemagent - no target
relink network
relink ctx
relink interMedia

DBA Paranoia: To be doubly sure, run make files as listed in $ORACLE_HOME/inventory/make/makeorder.xml
make -f rdbms/lib/ins_rdbms.mk ioracle
make -f rdbms/lib/ins_rdbms.mk client_sharedlib
make -f sqlplus/lib/ins_sqlplus.mk install
make -f network/lib/ins_net_client.mk preinstall
make -f network/lib/ins_net_client.mk itnsping
make -f rdbms/lib/ins_rdbms.mk "irman"
make -f plsql/lib/ins_plsql.mk "install"
make -f network/lib/ins_net_client.mk "nnfgt.o"
make -f network/lib/ins_net_client.mk "mkldflags"
make -f rdbms/lib/ins_rdbms.mk "utilities"
make -f ldap/lib/ins_ldap.mk "clientonlyinstall"
make -f network/lib/ins_net_client.mk "ntcontab.o"
make -f network/lib/ins_net_client.mk  "nnfgt.o"
make -f network/lib/ins_net_client.mk  "install"  
make -f network/lib/ins_nau.mk "ioklist"
make -f network/lib/ins_nau.mk  "iokinit"
make -f network/lib/ins_nau.mk "iokdstry"
make -f sysman/lib/ins_emagent.mk "agent"
make -f sysman/lib/ins_emagent.mk "nmb"
make -f sysman/lib/ins_emagent.mk  "nmo"
make -f sysman/lib/ins_emagent.mk "nmhs"
make -f sysman/lib/ins_emagent.mk "tclexec"
make -f rdbms/lib/ins_rdbms.mk "all_no_orcl"
make -f srvm/lib/ins_srvm.mk "install"
make -f racg/lib/ins_has.mk  "racg_install"
make -f network/lib/ins_net_server.mk "install"
make -f rdbms/lib/ins_rdbms.mk "ctx_on"
make -f ctx/lib/ins_ctx.mk "install"
make -f rdbms/lib/ins_rdbms.mk  "ipc_g"
make -f sysman/lib/ins_emagent.mk "emsubagent"
make -f network/lib/ins_net_client.mk "mkldflags"
make -f rdbms/lib/ins_rdbms.mk "idg4odbc"
make -f precomp/lib/ins_precomp.mk "links"
make -f precomp/lib/ins_precomp.mk "relink"
make -f precomp/lib/ins_precomp.mk  "gen_pcscfg"
make -f rdbms/lib/ins_rdbms.mk "svr_tool"
make -f rdbms/lib/ins_rdbms.mk "patchset_opt"

Execute the $ORACLE_HOME/root.sh script to reset the appropriate file permissions/flags:
sudo $ORACLE_HOME/root.sh

Startup Oracle listener
Start up ASM instance

Relink agent home


# agentenv is a custom script that sets Oracle environment variables appropriately 
# for the agent home - all homes are using the one OS user - 'oracle'.
# Normally I recommend one OS user per home.

. agentenv
relink client
relink oemagent

DBA Paranoia: To be doubly sure, run make files as listed in $ORACLE_HOME/inventory/make/makeorder.xml
cdo
make -f network/lib/ins_net_client.mk itnsping
make -f network/lib/ins_net_client.mk nnfgt.o
make -f network/lib/ins_net_client.mk mkldflags
make -f network/lib/ins_net_client.mk client_sharedlib
make -f sysman/lib/ins_emagent.mk agent
make -f sysman/lib/ins_emagent.mk nmb
make -f sysman/lib/ins_emagent.mk nmo
make -f sysman/lib/ins_emagent.mk nmhs
make -f sysman/lib/ins_emagent.mk emsubagent

Execute the $ORACLE_HOME/root.sh script to reset the appropriate file permissions/flags:
sudo $ORACLE_HOME/root.sh

Relink OMS HOme


Note omsenv is a custom script setting shell vriables for the OEM/OMS home.
. omsenv
cdo

relink client
relink network
relink client_sharedlib
relink oemagent
relink utilities

DBA Paranoia: To be doubly sure, run make files as listed in $ORACLE_HOME/inventory/make/makeorder.xml
make -f network/lib/ins_net_client.mk "nnfgt.o"
make -f network/lib/ins_net_client.mk "mkldflags"
make -f network/lib/ins_net_client.mk "client_sharedlib"
make -f sysman/lib/ins_sysman.mk agent
make -f sysman/lib/ins_sysman.mk nmo
make -f sysman/lib/ins_sysman.mk nmb
make -f sqlplus/lib/ins_sqlplus.mk install
make -f network/lib/ins_net_client.mk install
make -f network/lib/network/lib/ins_nau.mk ioklist
make -f network/lib/network/lib/ins_nau.mk iokinit
make -f network/lib/network/lib/ins_nau.mk iokdstry
make -f webcache/lib/ins_calypso.mk install

Execute the $ORACLE_HOME/root.sh script to reset the appropriate file permissions/flags:
sudo $ORACLE_HOME/root.sh

References


Howto Relink an Agent ? [ID 805495.1]

Oracle 11gR2 Relink New Feature [ID 883299.1]

6 comments:

  1. Thanks a lot for providing nice post about make and relink of Oracle components after installation.

    ReplyDelete
  2. Good information.
    A Bit of information about 11Gr2 relink is here.. http://shonythomas.blogspot.in/2011/06/oracle-11gr2-relink-new-feature.html

    ReplyDelete
  3. Love it! Very interesting topics, I hope the incoming comments and suggestion are equally positive. Thank you for sharing this information that is actually helpful.


    ufgop.org
    ufgop.org

    ReplyDelete
  4. i read a lot of stuff and i found that the way of writing to clearifing that exactly want to say was very good so i am impressed and ilike to come again in future.. best matcha powder perth

    ReplyDelete
  5. Imperial Voyages Tour Operators In India Book Affordable Travel And Tour Packages At Lowest Price With Imperial Voyages Travel Agency In India. Tour operators In Delhi

    ReplyDelete