From oracle-l-bounce@freelists.org  Wed May  5 14:39:36 2004
Return-Path: <oracle-l-bounce@freelists.org>
Received: from air189.startdedicated.com (root@localhost)
 by orafaq.com (8.11.6/8.11.6) with ESMTP id i45JdLo19721
 for <oracle-l@orafaq.com>; Wed, 5 May 2004 14:39:31 -0500
X-ClientAddr: 206.53.239.180
Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180])
 by air189.startdedicated.com (8.11.6/8.11.6) with ESMTP id i45Jd1619617
 for <oracle-l@orafaq.com>; Wed, 5 May 2004 14:39:21 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id 8327972CC7E; Wed,  5 May 2004 14:28:37 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 25289-48; Wed,  5 May 2004 14:28:37 -0500 (EST)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP
 id C630F72D455; Wed,  5 May 2004 14:28:36 -0500 (EST)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 05 May 2004 14:27:21 -0500 (EST)
X-Original-To: oracle-l@freelists.org
Delivered-To: oracle-l@freelists.org
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D0D2D72D0FA
 for <oracle-l@freelists.org>; Wed,  5 May 2004 14:27:20 -0500 (EST)
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP
 id 25127-62 for <oracle-l@freelists.org>;
 Wed,  5 May 2004 14:27:20 -0500 (EST)
Received: from smtp.wangtrading.com (smtp.wangtrading.com [167.206.68.5])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 61E0372CF23
 for <oracle-l@freelists.org>; Wed,  5 May 2004 14:27:20 -0500 (EST)
Received: from mladen.wangtrading.com (Not Verified[192.168.3.47]) by smtp.wangtrading.com with NetIQ MailMarshal (v5.5.5.8)
 id <B00005a7ba>; Wed, 05 May 2004 15:39:00 -0400
Received: from mladen (localhost.localdomain [127.0.0.1])
 by mladen.wangtrading.com (8.12.8/8.12.8) with ESMTP id i45Jf9Fp003519
 for <oracle-l@freelists.org>; Wed, 5 May 2004 15:41:09 -0400
Date: Wed, 5 May 2004 15:41:09 -0400
From: Mladen Gogala <mladen@wangtrading.com>
To: oracle-l@freelists.org
Subject: Re: More spfile goodness
Message-ID: <20040505194109.GG3465@mladen.wangtrading.com>
References: <200405051631.i45GVTdB026537@rgmgw2.us.oracle.com>
Mime-Version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <200405051631.i45GVTdB026537@rgmgw2.us.oracle.com> (from peter.sharman@oracle.com on Wed, May 05, 2004 at 12:31:28 -0400)
X-Mailer: Balsa 2.0.17
Lines: 45
X-Virus-Scanned: by amavisd-new at freelists.org
X-archive-position: 4498
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-To: oracle-l-bounce@freelists.org
X-original-sender: mladen@wangtrading.com
Precedence: normal
Reply-To: oracle-l@freelists.org
X-list: oracle-l
X-Virus-Scanned: by amavisd-new at freelists.org


On 05/05/2004 12:31:28 PM, Pete Sharman wrote:
>
> ecoverable from simply by opening the SPFILE, highlighting the complete fil=
> e except the binary first line and pasting it into another editor window.  =

The civilized way of doing this would be:
strings $ORACLE_HOME/dbs/spfile$ORACLE_SID.ora>$ORACLE_HOME/dbs/init$ORACLE_SID.ora
It gives results like:
[root@tux925 root]# su - oracle
-bash-2.05b$ cd $ORACLE_HOME/dbs
-bash-2.05b$ strings spfile$ORACLE_SID.ora|head -10
*.aq_tm_processes=1
*.background_dump_dest='/pub/oracle/admin/CMPL/bdump'
*.compatible='9.2.0.0.0'
*.control_files='/data1/CMPL/ctl/control01.ctl','/data2/CMPL/ctl/control02.ctl','/data3/CMPL/ctl/control03.ctl'
*.core_dump_dest='/pub/oracle/admin/CMPL/cdump'
*.db_block_size=8192
*.db_cache_advice='OFF'
*.db_cache_size=402653184
*.db_domain='wangtrading.com'
*.db_file_multiblock_read_count=32

That asterisk in front of the parameter means "for all available instances". I have only one
instance, but it will still work. To make Jared's heart beat faster, this also works:

#!/usr/bin/perl -w
use strict;
my $HOME=$ENV{"ORACLE_HOME"};
my $SID=$ENV{"ORACLE_SID"};
die "Please check your Oracle environment vars!\n" if (!defined $HOME or !defined $SID);
my $file="$HOME/dbs/spfile$SID.ora";
open (IN,"<",$file) or die "Cannot open $file:$!\n";
while (<IN>) {
  print $_ if ( $_ =~ /^\*\./) ;
}


That is, essentially, the same as:

egrep --binary-files=text "^\*\." $ORACLE_HOME/dbs/spfile$ORACLE_SID.ora

-- 
Mladen Gogala
Oracle DBA



Note:
This message is for the named person's use only.  It may contain confidential, proprietary or legally privileged information.  No confidentiality or privilege is waived or lost by any mistransmission.  If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender.  You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to monitor all e-mail communications through its networks.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@freelists.org
put 'unsubscribe' in the subject line.
--
Archives are at http://www.freelists.org/archives/oracle-l/
FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

