{"id":1264,"date":"2007-05-06T12:00:00","date_gmt":"2007-05-06T12:00:00","guid":{"rendered":"http:\/\/orcldoug.com\/blog\/?p=1264"},"modified":"2007-05-06T12:00:00","modified_gmt":"2007-05-06T12:00:00","slug":"re-linking-oracle","status":"publish","type":"post","link":"http:\/\/orcldoug.com\/blog\/2007\/05\/06\/re-linking-oracle\/","title":{"rendered":"Re-linking oracle"},"content":{"rendered":"<p>Hooray! Something vaguely technical &#8211; at last.<\/p>\n<p>My new client is hot on software licence compliance and what seemed a minor issue to me reared it&#8217;s slightly ugly head this week. When connecting to our 10.2.0.2 database instances using sqlplus, the version banner displays options that we aren&#8217;t using, for example Data Mining and OLAP.<\/p>\n<pre>$ sqlplus \/ as sysdba<br\/><br\/>SQL*Plus: Release 10.2.0.2.0 - Production on Sun May 6 13:39:46 2007<br\/><br\/>Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.<br\/><br\/><br\/>Connected to:<br\/>Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production<br\/>With the Partitioning, OLAP and Data Mining options<\/pre>\n<p>You&#8217;ve probably seen a similar banner on most databases you use. The reality is that we don&#8217;t have the dictionary objects created for these options so they aren&#8217;t usable, but that message was still a concern for the managers. Here are the contents of DBA_REGISTRY to show that the options aren&#8217;t fully installed, but the banner messages indicate that they&#8217;re still embedded in the binaries.<\/p>\n<pre>SQL&gt; column comp_name format a40<br\/>SQL&gt; select comp_name, status from dba_registry;<br\/><br\/>COMP_NAME                                STATUS<br\/>---------------------------------------- ---------------------------------<br\/>Oracle Workspace Manager                 VALID<br\/>Oracle Enterprise Manager                VALID<br\/>Oracle Database Catalog Views            VALID<br\/>Oracle Database Packages and Types       VALID<\/pre>\n<p>The solution is pretty straightforward, but it occurred to me that re-linking the Oracle executables is probably a less common activity than it used to be. In fact I know that from personal experience and it didn&#8217;t seem to be common knowledge in the office. I remember regular re-links during the early part of my career, whether it to be to fix problems with system libraries not being available at installation time, or more creative uses such as linking the exp and imp binaries so that they used a single task architecture for improved performance. <\/p>\n<p>Anyway, here&#8217;s what was required to get rid of the banner messages.<\/p>\n<p>First I&#8217;ll shutdown the single instance using that ORACLE_HOME. Note &#8211; it&#8217;s the binaries in the home that I&#8217;ll be relinking, so I should shut down all instances that use that home, but there&#8217;s only one in this case.<\/p>\n<pre>SQL&gt; shutdown<br\/>Database closed.<br\/>Database dismounted.<br\/>ORACLE instance shut down.<br\/>SQL&gt; exit<br\/>Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production<br\/>With the Partitioning, OLAP and Data Mining options<\/pre>\n<p>Now I switch to the rdbms\/lib directory, where I&#8217;ll find the make file I need to relink oracle.<\/p>\n<pre>$ cd $ORACLE_HOME\/rdbms\/lib<br\/>$ ls -ltra *.mk<br\/>-rw-r-----   1 oracle   oinstall   24664 May 12  2006 ins_rdbms.mk<br\/>-rw-r-----   1 oracle   oinstall   97674 May 12  2006 env_rdbms.mk<\/pre>\n<p>If you look in the ins_rdbms.mk file, you&#8217;ll see sections like this for the various options.<\/p>\n<pre>olap_on:        $(KNLOPT_LOCAL) $(RDBMSLIB)$(OLAP_ON)<br\/>        $(SILENT)if $(ARPRINT) $(LIBKNLOPT) | $(GREP) '^'$(OLAP_OFF) &gt; \/dev\/null ; then \\<br\/>                $(ECHODO) $(ARDELETE) $(LIBKNLOPT) $(OLAP_OFF) ; \\<br\/>        fi<br\/>        $(ARCREATE) $(LIBKNLOPT) $(RDBMSLIB)$(OLAP_ON) $(RANLIBL)<br\/><br\/>olap_off: $(KNLOPT_LOCAL) $(RDBMSLIB)$(OLAP_OFF)<br\/>        $(SILENT)if $(ARPRINT) $(LIBKNLOPT) | $(GREP) '^'$(OLAP_ON) &gt; \/dev\/null ; then \\<br\/>                $(ECHODO) $(ARDELETE) $(LIBKNLOPT) $(OLAP_ON) ; \\<br\/>        fi<br\/>        $(ARCREATE) $(LIBKNLOPT) $(RDBMSLIB)$(OLAP_OFF) $(RANLIBL)<\/pre>\n<p>By specifying the relevant flags, plus ioracle, I can relink the oracle executable so that it doesn&#8217;t include those options.<\/p>\n<pre>$ \/usr\/ccs\/bin\/make -f ins_rdbms.mk olap_off dm_off ioracle<\/pre>\n<p>At this point you&#8217;ll see some standard ld linker messages being pumped out. One side-effect of relinking executables is that the make file will save the existing version as a new file with O at the end. So, if you&#8217;ve ever wondered what those oracleO and impO files are in your $ORACLE_HOME\/bin directory, they&#8217;re previous versions saved as part of a relink operation. They&#8217;re also one of the first things I look to delete when I have an ORACLE_HOME that&#8217;s in danger of filling a filesystem.<\/p>\n<pre>$ ls -ltra $ORACLE_HOME\/bin\/oracle*<br\/>-rwxr-xr-x   1 oracle   oinstall 106057264 Oct  7  2006 \/oracle\/1020\/bin\/oracleO<br\/>-rwsr-s--x   1 oracle   oinstall 95826132 May  6 13:51 \/oracle\/1020\/bin\/oracle<\/pre>\n<p>Now I just need to restart the instances and perform a test connection to check that the messages have disappeared.<\/p>\n<pre>$ sqlplus testuser\/testuser<br\/><br\/>SQL*Plus: Release 10.2.0.2.0 - Production on Sun May 6 13:52:42 2007<br\/><br\/>Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.<br\/><br\/><br\/>Connected to:<br\/>Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production<br\/>With the Partitioning option<\/pre>\n<p>I read an <a href=\"http:\/\/www.oraclemusings.com\/?p=49\">interesting post<\/a> on Dominic Delmolino&#8217;s blog recently about the value of browsing through the SQL scripts in $ORACLE_HOME\/rdbms\/admin to learn more about how Oracle works &#8211; particularly sql.bsq &#8211; and I&#8217;d recommend a glance at some of the make files, for the same reason. But, please, if you&#8217;re going to start relinking executables, think carefully about it first, consult Metalink and if you screw up your server, don&#8217;t come running to me! &#128521;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hooray! Something vaguely technical &#8211; at last. My new client is hot on software licence compliance and what seemed a minor issue to me reared it&#8217;s slightly ugly head this week. When connecting to our 10.2.0.2 database instances using sqlplus, the version banner displays options that we aren&#8217;t using, for example Data Mining and OLAP.&hellip; <a class=\"more-link\" href=\"http:\/\/orcldoug.com\/blog\/2007\/05\/06\/re-linking-oracle\/\">Continue reading <span class=\"screen-reader-text\">Re-linking oracle<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1264","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":972,"url":"http:\/\/orcldoug.com\/blog\/2005\/06\/12\/dba_registry\/","url_meta":{"origin":1264,"position":0},"title":"dba_registry","date":"June 12, 2005","format":false,"excerpt":"It's true I learn something new all the time. Is it just me? Did everyone know about this?I was talking to one of the other DBAs at work on Friday who was telling me that one of the dbs we've taken over looks like it wasn't upgraded properly. I connected\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":884,"url":"http:\/\/orcldoug.com\/blog\/2006\/01\/12\/something-else-i-didnt-know\/","url_meta":{"origin":1264,"position":1},"title":"Something Else I Didn&#8217;t Know","date":"January 12, 2006","format":false,"excerpt":"This one is courtesy of Andrew Campbell at Sun Microsystems. He noticed in an Oracle Magazine article that you can use a URL as a script name in sqlplus.SQL> select * from v$version;BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProdPL\/SQL Release 10.2.0.1.0 - ProductionCORE 10.2.0.1.0 ProductionTNS for 32-bit Windows:\u2026","rel":"","context":"With 4 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1335,"url":"http:\/\/orcldoug.com\/blog\/2007\/11\/01\/rac-and-aix\/","url_meta":{"origin":1264,"position":2},"title":"RAC and AIX","date":"November 1, 2007","format":false,"excerpt":"One of the interesting aspects of working at my current site is that the DBAs don't install Oracle. Yes, I know, and I'm not going to elaborate on that statement other than to say it's a little frustrating and software management has become a much more interesting experience than I\u2026","rel":"","context":"With 2 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":957,"url":"http:\/\/orcldoug.com\/blog\/2005\/08\/10\/a-shortcut-for-oracle_home\/","url_meta":{"origin":1264,"position":3},"title":"A shortcut for ORACLE_HOME","date":"August 10, 2005","format":false,"excerpt":"I've enjoyed quite a few of the tips in other people's Oracle-related blogs (see the links in the right hand pane) so thought I'd chuck in a few as well. This one's an old one, so many of you will know about it already, but for those that don't ...In\u2026","rel":"","context":"With 3 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1649,"url":"http:\/\/orcldoug.com\/blog\/2011\/09\/21\/real-time-sql-monitoring-retention-part-2\/","url_meta":{"origin":1264,"position":4},"title":"Real-Time SQL Monitoring &#8211; Retention (part 2)","date":"September 21, 2011","format":false,"excerpt":"As I mentioned in my last post, I've been looking at increasing the SQL Monitoring Retention at my current site using _sqlmon_max_plan but, as well as confirming with Oracle Support that they're happy for us to do so, it would be nice to know what the resulting memory footprint would\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1112,"url":"http:\/\/orcldoug.com\/blog\/2009\/10\/29\/10g-consolidated-trace-files-and-px\/","url_meta":{"origin":1264,"position":5},"title":"10g Consolidated Trace Files and PX","date":"October 29, 2009","format":false,"excerpt":"At the end of my Tracing Parallel Execution presentation at the Scottish OUG conference, Michael M\u00f8ller of Miracle asked whether the consolidated trace files produced by the DBMS_MONITOR package and trcsess utility are in strict time order. i.e. Will I see the actions of the query coordinator, then the actions\u2026","rel":"","context":"With 7 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/comments?post=1264"}],"version-history":[{"count":0,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1264\/revisions"}],"wp:attachment":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/media?parent=1264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/categories?post=1264"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/tags?post=1264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}