{"id":117,"date":"2008-11-11T15:22:55","date_gmt":"2008-11-11T14:22:55","guid":{"rendered":"http:\/\/www.askthegerman.com\/?p=117"},"modified":"2023-02-13T07:36:24","modified_gmt":"2023-02-13T06:36:24","slug":"correcting-wrong-values-within-a-spfile","status":"publish","type":"post","link":"https:\/\/www.askthegerman.com\/?p=117","title":{"rendered":"Correcting wrong values within a SPFILE"},"content":{"rendered":"<p>Messing up some setting with the system SPFILE can end us up with a database which does no longer start up. Unfortunately this can happens delayed as for it is possible to set new vales without making them active immediately.<\/p>\n<p>Now a system SPFILE is no real editable file and therefore fixing it becomes difficult:<\/p>\n<p>A typically problem which can occur leaving your database inoperable is specifying LOG_ARCHIVE_DEST within a Oracle Database Version 10g as for syntax has change in this version and it is easily done following good &#8220;old&#8221; behavior.<\/p>\n<p>You will end up with an database complaining about:<\/p>\n<p><em>SQL&gt; startup mount force<br \/>\nORA-16019: cannot use LOG_ARCHIVE_DEST_1 with LOG_ARCHIVE_DEST or LOG_ARCHIVE_DUPLEX_DEST<\/em><\/p>\n<p>Fixing this we have to startup the database with an alternative INIT.ORA file which we usually have from the database creation process. Don&#8217;t worry about it is recent or not as for our aim is just to get up the database up and running in mount status:<br \/>\n(if not at hand create an INIT.ORA file from scratch using an universal example)<\/p>\n<p><em>SQL&gt; startup mount pfile=&#8217;C:\\oracle10g\\admin\\SID\\pfile\\init.ora&#8217;;<br \/>\nORACLE instance started.<\/em><\/p>\n<p><em>Total System Global Area 135339844 bytes<br \/>\nFixed Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 454468 bytes<br \/>\nVariable Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 109051904 bytes<br \/>\nDatabase Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25165824 bytes<br \/>\nRedo Buffers&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 667648 bytes<br \/>\nORA-00205: error in identifying controlfile, check alert log for more info<\/em><\/p>\n<p>Having the database up now again, we can create an editable INIT.ORA by reading the values within system SPFILE:<\/p>\n<p><em>SQL&gt; create pfile=&#8217;c:\\temp\\init.ora&#8217; from spfile=&#8217;c:\\oracle10g\\database\\spfileSID.ora&#8217;;<br \/>\nFile created.<\/em><\/p>\n<p>Now with the new editable INIT.ORA file containing all the actual configuration settings of our database (even the wrong one) we can go on fixing our issue and finally convert the INIT.ORA file again back into a system SPFILE:<\/p>\n<p><em>SQL&gt; create spfile=&#8217;c:\\oracle92\\database\\spfileSID.ora&#8217; from pfile=&#8217;c:\\temp\\init.ora&#8217;;<br \/>\nFile created.<\/em><\/p>\n<p>When we now shutdown the database and reopen it again it will start and open gain using the fixed SPFILE as before:<\/p>\n<p><em>SQL&gt; startup force<br \/>\nORACLE instance started.<\/em><\/p>\n<p><em>Total System Global Area 139534168 bytes<br \/>\nFixed Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 454488 bytes<br \/>\nVariable Size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 113246208 bytes<\/em><br \/>\n&#8230;..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Messing up some setting with the system SPFILE can end us up with a database which does no longer start up. Unfortunately this can happens delayed as for it is possible to set new vales without making them active immediately. Now a system SPFILE is no real editable file and therefore fixing it becomes difficult: [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,5,31],"tags":[137,136,131,135,133,257,130,112,132,134],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-database","category-oracle","category-tipsntricks","tag-create-initora","tag-create-spfile","tag-initora","tag-log_archive_dest","tag-mount-status","tag-oracle","tag-spfile","tag-sqlplus","tag-startup","tag-startup-force"],"_links":{"self":[{"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=117"}],"version-history":[{"count":12,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":368,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/posts\/117\/revisions\/368"}],"wp:attachment":[{"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}