{"id":957,"date":"2005-08-10T12:00:00","date_gmt":"2005-08-10T12:00:00","guid":{"rendered":"http:\/\/orcldoug.com\/blog\/?p=957"},"modified":"2005-08-10T12:00:00","modified_gmt":"2005-08-10T12:00:00","slug":"a-shortcut-for-oracle_home","status":"publish","type":"post","link":"http:\/\/orcldoug.com\/blog\/2005\/08\/10\/a-shortcut-for-oracle_home\/","title":{"rendered":"A shortcut for ORACLE_HOME"},"content":{"rendered":"<p>I&#8217;ve enjoyed quite a few of the tips in other people&#8217;s Oracle-related blogs (see the links in the right hand pane) so thought I&#8217;d chuck in a few as well. This one&#8217;s an old one, so many of you will know about it already, but for those that don&#8217;t &#8230;<\/p>\n<p>In sqlplus, you can use ? as a substitute for the ORACLE_HOME location when running scripts, so when you want to run common supplied dictionary scripts (for example, to create the EXCEPTIONS table) you can use the following :-<\/p>\n<pre>SQL&gt; connect scott\/tiger<br\/>Connected.<br\/>SQL&gt; @?\/rdbms\/admin\/utlexcpt<br\/><p><\/p><br\/>Table created.<\/pre>\n<p>It&#8217;s a way to avoid remembering and typing in long directory paths such as \/usr\/oracle\/app\/product\/9.2.0.6\/rdbms\/admin. It also means that you&#8217;ll be running the script from the correct directory for the version you&#8217;re working with.<\/p>\n<p>However (and this is very important), as Jeff Hunter pointed out in his comment :-<\/p>\n<p><i>&#8220;But watch out when you&#8217;re not on the server itself. For example, if your client is \/usr\/local\/oracle which is a 9.2.0.6 ORACLE_HOME and your database is \/oracle\/product\/10.2.0.1 you certainly don&#8217;t want to run @?\/rdbms\/catalog.&#8221;<\/i><\/p>\n<p>Thanks, Jeff.<\/p>\n<p>Another useful tip is to use @@ instead of @ if you want a script to call other scripts, because it&#8217;ll look for the scripts in the same directory as the calling script without you needing to supply the path.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve enjoyed quite a few of the tips in other people&#8217;s Oracle-related blogs (see the links in the right hand pane) so thought I&#8217;d chuck in a few as well. This one&#8217;s an old one, so many of you will know about it already, but for those that don&#8217;t &#8230; In sqlplus, you can use&hellip; <a class=\"more-link\" href=\"http:\/\/orcldoug.com\/blog\/2005\/08\/10\/a-shortcut-for-oracle_home\/\">Continue reading <span class=\"screen-reader-text\">A shortcut for ORACLE_HOME<\/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-957","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1264,"url":"http:\/\/orcldoug.com\/blog\/2007\/05\/06\/re-linking-oracle\/","url_meta":{"origin":957,"position":0},"title":"Re-linking oracle","date":"May 6, 2007","format":false,"excerpt":"Hooray! Something vaguely technical - at last.My new client is hot on software licence compliance and what seemed a minor issue to me reared it'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't using, for example\u2026","rel":"","context":"With 21 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1403,"url":"http:\/\/orcldoug.com\/blog\/2008\/04\/17\/moving-awr-data\/","url_meta":{"origin":957,"position":1},"title":"Moving AWR data","date":"April 17, 2008","format":false,"excerpt":"Note - features in this post require the Diagnostics Pack license[I originally had the first section at the end of the blog post, but then realised I might as well get the bad news out of the way to save you wasting your time if you're not interested]A small section\u2026","rel":"","context":"With 4 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1063,"url":"http:\/\/orcldoug.com\/blog\/2006\/08\/21\/10g-default-installation-and-ofa\/","url_meta":{"origin":957,"position":2},"title":"10g Default Installation and OFA","date":"August 21, 2006","format":false,"excerpt":"or ... 'what's that all about?!?!'Last year, I blogged about some of the variations on Optimal Flexible Architecture that I've seen on my travels. I'm gradually coming round to having the service group for clustered applications as the top directory level (e.g.\/myapp1\/oradata\/\/myapp1\/oraindex\/\/myapp2\/oradata\/\/myapp2\/oraindex\/but I'm still not convinced. If people ever failed\u2026","rel":"","context":"With 7 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1553,"url":"http:\/\/orcldoug.com\/blog\/2009\/12\/13\/my-favourite-oracle-blog\/","url_meta":{"origin":957,"position":3},"title":"My Favourite Oracle Blog","date":"December 13, 2009","format":false,"excerpt":"Some features in this post require a Diagnostics Pack license.I think there a quite a few decent Oracle blogs around. There are links to some of them over there on the right. But by far my favourite this year has been Kerry Osborne's. I think there are a number of\u2026","rel":"","context":"With 9 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1697,"url":"http:\/\/orcldoug.com\/blog\/2013\/03\/11\/not-all-deadlocks-are-created-the-same\/","url_meta":{"origin":957,"position":4},"title":"Not all Deadlocks are created the same","date":"March 11, 2013","format":false,"excerpt":"I've blogged about deadlocks in Oracle at least once before. I said then that although the following message in deadlock trace files is usually true, it isn't always. The following deadlock is not an Oracle error. Deadlocks of\u00a0 this type can be expected if certain SQL statements are\u00a0\u00a0\u00a0\u00a0\u00a0 issued. The\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1191,"url":"http:\/\/orcldoug.com\/blog\/2007\/01\/27\/dba-documentation-catalogue\/","url_meta":{"origin":957,"position":5},"title":"DBA Documentation &#8211; Catalogue","date":"January 27, 2007","format":false,"excerpt":"Prompted by Linda's comment on a previous blog, I thought it might be worth writing a couple of postings on DBA documentation.The first thing you need is a Database Catalogue of some kind.Benefits1) Even an experienced DBA arriving on site won't know what servers exist, how to login to them,\u2026","rel":"","context":"With 11 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/957","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=957"}],"version-history":[{"count":0,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/957\/revisions"}],"wp:attachment":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/media?parent=957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/categories?post=957"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/tags?post=957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}