RE: UNIX OT: exclude files in tar

2003-11-25 Thread Ross Collado
I like that logic!  I might just start (ab)using Perl now.

Thanks to all replies.  Now I've got a few options to play around with to do
this 'exclude files' and not necessarily tar .

Rgds,
Ross

 -Original Message-
 From: Mladen Gogala [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 26 November 2003 6:25 AM
 To: Multiple recipients of list ORACLE-L
 Subject: Re: UNIX OT: exclude files in tar
 
 
 
 On 11/25/2003 11:44:26 AM, [EMAIL PROTECTED] wrote:
  
  Maybe can use -prune option of find to send file list to tar:
  
 
 Why do it in a simple way when there is an opportunity to 
 (ab)use perl?
 
 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.net
 -- 
 Author: Mladen Gogala
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


UNIX OT: exclude files in tar

2003-11-24 Thread Ross Collado
Hello,

On Solaris 8

I can't seem to get the tar command right.  I wanted to tar a directory but
EXCLUDE one of the subdirectory in it.
Example:
/home/user01
/home/user01/mark01
/home/user01/mark01/ask.txt
/home/user01/mark01/ghost.txt
/home/user01/mark02
/home/user01/mark02/ask.txt
/home/user01/mark02/ghost.txt
/home/user01/mark03
/home/user01/mark03/ask.txt
/home/user01/mark03/ghost.txt

I wanted to tar everything except /home/user01/mark03/*
man pages on tar says there is an option to exclude files but I just can't
get it to work for me. 

Can someone show me how to do this right?

Thanks,
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


UNIX OT: deleting file starting with --

2003-10-30 Thread Ross Collado
Hi,
How do I delete a file named  --cart ?
Thanks,
Ross


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Coalescing tablespace

2003-10-26 Thread Ross Collado
Hi,
For those like me still working on an Oracle 716 (hold the laughs), how do
we coalesce a tablespace?
Rgds,
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: Coalescing tablespace

2003-10-26 Thread Ross Collado
Thanks Tim.
Yes, for some it is a blast from the past!  Unfortunately for me, for one of
our systems still using this database, I am sort of stuck in the past.
On the subject of coalescing, is the SYSTEM tablespace safe to be coalesced
as well?  I was thinking of putting this SQL statement you've suggested in a
loop for all tablespaces.
Thanks again and to others for the prompt reply.
Rgds,
Ross

 -Original Message-
 From: Tim Gorman [mailto:[EMAIL PROTECTED]
 Sent: Monday, 27 October 2003 2:44 PM
 To: Multiple recipients of list ORACLE-L
 Subject: Re: Coalescing tablespace 
 
 
 Ross,
 
 Wow!  That's a blast from the past!  ALTER TABLESPACE ... 
 COALESCE didn't
 arrive on the scene until v7.3, so prior to that version you had to do
 something like the following:
 
 alter session set events 'immediate trace name coalesce 
 level NNN';
 
 where the value of the level NNN could be set one of two ways.
 
 First and simplest way to set NNN is to use the value of 
 the column TS# in
 the table SYS.TS$ where NAME is the name of the tablespace.  
 So, a query
 like:
 
 select ts# from sys.ts$ where name = 'TOOLS'
 
 would yield the NNN for the level in the ALTER SESSION 
 statement, or:
 
 alter session set events 'immediate trace name coalesce level 23';
 
 if the TS# of the TOOLS tablespace was 23.
 
 However, setting the level this way would cause the ALTER 
 SESSION command to
 only coalesce a certain, predefined number of extents and 
 then stop.  At
 this time, 6-7 years after the last time I used it, I forget what the
 default was, but it was probably a very low number (maybe 1?)...
 
 So, if you wanted to specify to the ALTER SESSION command how 
 many extents
 to coalesce before quitting, you had to specify the TS# number in the
 lower-order 16 bits of the NNN and the number of extents to 
 coalesce in
 the higher-order 16 bits.  This implied an upper limit of 
 65535 extents to
 be coalesced at a time.
 
 So, generating a full ALTER SESSION statement, complete with a
 fully-qualified LEVEL parameter, could be performed as follows:
 
 select   'alter session set events ' ||
  '''immediate trace name coalesce level ' ||
  to_char((65536*least(count(*),65535))+t.ts#)||
 from sys.fet$   a,
  sys.fet$   b,
  sys.ts$t
 wheret.name = 'tablespace-name'
 and  a.ts# = t.ts#
 and  a.ts# = b.ts#
 and  a.file# = b.file#
 and  (a.block# + a.length) = b.block#
 group by t.ts#;
 
 The purpose of the LEAST(COUNT(*),65535) phrase is to 
 prevent an overflow,
 due to max of 16 bits in which to specify the count...
 
 Hope this helps...
 
 Thanks!
 
 -Tim
 
 
 
 on 10/26/03 6:04 PM, Ross Collado at [EMAIL PROTECTED] wrote:
 
  Hi,
  For those like me still working on an Oracle 716 (hold the 
 laughs), how do
  we coalesce a tablespace?
  Rgds,
  Ross
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Tim Gorman
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


My Proc may not be using bind vars.

2003-10-14 Thread Ross Collado
Hello,

I thought of giving this a go first before bouncing it to the gurus in the
list.
Basically, I wanted this procedure to be called from another 3rd party
application with the parameter of a 'customer_key'.  I was under the
impression that I could force the select statement to use a 'bind' variable
from within the procedure.  I then called this procedure to try it out (in
SQLPlus using exec by_key('customer_key') )  30 times in succession using
different customer_key each time.  I was expecting v$sqlarea to report stats
like parse=1 and executions=30.  However, what I got were 30 of the begin
by_key('zzz'); end; with 1 parse and 1 execution each. (zzz had different
values every time).  I'm still in the prototyping stage but the basic gist
of what I want is what I already have in the procedure.

Was what I got from v$sqlarea the expected behavior/stat result? 
What can I change so that the sql statement will only parse once and execute
many times in other words make it more efficient?

thanks in advance.
Ross

create or replace procedure by_key (v_customer_key
sales_order_delivery.customer_key%type)
is
type addr_rec_type is record (
   addr1 sales_order_delivery.address_line_1%type,
   addr2 sales_order_delivery.address_line_2%type,
   addr3 sales_order_delivery.address_line_3%type,
   sub_dist sales_order_delivery.suburb_district%type,
   pcode sales_order_delivery.postal_code%type);
addr_rec addr_rec_type;
type refcurtyp is ref cursor;
cv refcurtyp;
stmt varchar2(500) := 'select
address_line_1,address_line_2,address_line_3,suburb_district,postal_code
from '||
  'sales_order_delivery where customer_key = :ckey';
begin
--  dbms_output.put_line('debug:'||stmt||'('||v_customer_key||')');
   open cv for stmt using v_customer_key;
   loop
  fetch cv into addr_rec;
  exit when cv%notfound;
--
dbms_output.put_line('debug::'||addr_rec.addr1||'x'||addr_rec.addr2||'x'||ad
dr_rec.addr3||'x'||
--   addr_rec.sub_dist||'x'||addr_rec.pcode);
   end loop;
   close cv;
exception
   when others then
  dbms_output.put_line(sqlcode||sqlerrm);
end by_key;

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: Correct method of auto starting standby db

2003-07-31 Thread Ross Collado
Hi,

What version of Oracle and OS platform you're using?
The document you read refers to an 8i db so I assume you are in 8i.
In our Solaris box with 8i on it, I created a shell script like so:

#!/bin/ksh
sqlplus -s /nolog !
Connect sys/*** as sysdba
recover managed standby database ;
exit
!

Then from the Unix prompt I run this script using nohup, eg:

$ nohup ./rcv_mng.sh  /dev/null 21 

Logging out of the session doesn't affect the script at all. It'll just keep
running in the background until you either kill the session or cancel it
from within another sqlplus window.

HTH
Ross


-Original Message-
Sent: Friday, 1 August 2003 12:54 AM
To: Multiple recipients of list ORACLE-L


All,
I have a question of how to auto start a standby database. IOW,
it seems the logs are only applies if I issue the command
Recover managed standby database;

With thatcommand, the logs are applied, however, if I (or someone else)
exits the cmd window the process stops

So, how can I set this up to be automated?

I need to keep the database in this state (I must be missing the
obivious)

Sqlplus /nolog
Connect sys/*** as sysdba
Startup mount;
Alter databse mount standby database;

Recover managed standby database;

I used this doc as a base for my initSID.ora files and dosnt seem to
mention the starting up on the db
http://www.oracle-base.com/Articles/8i/StandbyDatabase.asp

Thanks!
bob

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Bob Metelsky
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: make utility in Solaris 8

2003-03-25 Thread Ross Collado
Thanks Dennis.
I only happen to suspect make is not properly installed because comparing it
with the other Sun boxes we have, make is in /usr/ccs/bin whereas with this
particular box, it's in /usr/local/bin.  How it got there, I don't know.
Anyway, I'll try reinstalling the Sun package with make on it.  Another
lister posted the package I was after.
Rgds,
Ross


-Original Message-
Sent: Wednesday, 26 March 2003 1:06 AM
To: Multiple recipients of list ORACLE-L


Ross - I'm far from a Solaris guru, but since I don't see where you received
a reply, here goes. The Oracle install may fail because it can't complete
the make process. This happens, and requires a fix. But what makes (no pun
intended) you think the root cause is that the Solaris make utility was
improperly installed? Now if you are coming from a Micro$oft background,
that might be a reasonable reaction. ;-)
   Are you receiving some error messages during make?

Dennis Williams
DBA, 40%OCP, 100% DBA
Lifetouch, Inc.
[EMAIL PROTECTED] 


-Original Message-
Sent: Tuesday, March 25, 2003 12:04 AM
To: Multiple recipients of list ORACLE-L


Env. Solaris 8 Oracle 817

My apologies for this OT posting.  I know we have quite a lot of Solaris
gurus here.
It appears the make utility was not installed properly as the Oracle
install keeps failing.
Can anyone tell what the SUN package name where make is in?
Apologies again.

Rgds,
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



OT: make utility in Solaris 8

2003-03-24 Thread Ross Collado
Env. Solaris 8 Oracle 817

My apologies for this OT posting.  I know we have quite a lot of Solaris
gurus here.
It appears the make utility was not installed properly as the Oracle
install keeps failing.
Can anyone tell what the SUN package name where make is in?
Apologies again.

Rgds,
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Out of topic -Unx question

2002-12-22 Thread Ross Collado
Not easily done in Unix.  However, if you've got an Oracle db running on the
same server you might want to get yesterday's date from Oracle (within a
shell script).

...
...
YESTERDAY=`sqlplus -s / -EOF
   set head off feed off pages 0
   select trunc(sysdate - 1) from dual;
   exit
   EOF`
echo YESTERDAY is $YESTERDAY
...
...


hth,
Ross

-Original Message-
Sent: Saturday, 21 December 2002 7:51
To: Multiple recipients of list ORACLE-L


Hi All,
  I want to get previous date from today's date.Is there any cmd for

this.

Thanks
Manoj

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




RE: OT ksh day of week yesterday

2002-11-13 Thread Ross Collado
I used to have this requirement too.  I never got to solve it by just using
ksh scripting so ended up getting Oracle to derive the value for me. I guess
this doesn't solve your problem if you don't have an Oracle db running.
 
#!/bin/ksh
YESTERDAY=`sqlplus -s / -EOF
   set head off feed off pages 0
   select to_char(sysdate-1,'fmDy') from dual;
   exit
   EOF`
TODAY=`date +\%a`
echo TODAY is $TODAY   YESTERDAY is $YESTERDAY
 
Hth,
Ross
 

-Original Message-
Sent: Thursday, 14 November 2002 5:25
To: Multiple recipients of list ORACLE-L



Will someone take pity on this poor VMS'er lost in a unix world??

I'm trying to create a script (ksh) that reads a log file created yesterday.
The log files are created with `date +%a` appended to the end of the log
file name.  Last night a log file was created called arc_indexlog.Tue  It's
easy enough to get today 

   TDAY=`date +%a`
   grep -i ora /orasrv/ops/maint/logs/arc_indexlog.$TDAY
   grep -i ora /orasrv/ops/maint/logs/adv_indexlog.$TDAY

but how do I get yesterday in the same format? (i.e., Tue instead of Wed)
I man'd date, but it was no help.

Thanks for any help.

Barb




  _  

Do you Yahoo!?
U2 on  http://rd.yahoo.com/launch/mailsig/*http://launch.yahoo.com/u2
LAUNCH - Exclusive medley  videos from Greatest Hits CD

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Unix Q: Substring-ing an output.

2002-10-28 Thread Ross Collado
Very clever!  But unfortunately, -F accepts only 1 character.  I tried that
though...

Ross


 -Original Message-
 From: Henry Poras [mailto:hporas;etal.URI.EDU]
 Sent: Tuesday, 29 October 2002 3:43
 To: Multiple recipients of list ORACLE-L
 Subject: RE: Unix Q: Substring-ing an output.
 
 
 Quick thought. What about just setting awk -F_ to awk -Fpmon_  ???
 
 Henry
 
 -Original Message-
 Bobak
 Sent: Sunday, October 27, 2002 11:49 PM
 To: Multiple recipients of list ORACLE-L
 
 
 Hmm...good point.  You know, I use this technique in various 
 places.  I
 never noticed that bug before, cause it will only appear if 
 the database
 has been up less than 1 day.  Guess it's time to do a bit of script
 auditing.
 
 Ok, try this instead:
 ps -ef|grep pmon|grep -v grep|cut -c49- |awk -F_ '{ 'print $3 }'
 
 I replaced the first awk w/ cut.  the -c option says to cut 
 that output
 from position 49 to the end of the line.  You may have to adjust the
 value from 49 to something else.
 
 That ought to work for you.
 
 -Mark
 On Sun, 2002-10-27 at 22:53, Ross Collado wrote:
  Thanks Mark.
 
  Yes that helps, in a way. I could use good ol' awk to parse the last
 field!
  However, a slight problem in the ps -ef output.  If I do 
 what you have
  suggested on my 'ps -ef' output below, I would only get 
 RMAN as it is the
  only one in field #8.  All the rest are in field #9.  All I 
 need now is
  figure out how to cut the last field then pipe it to your 
 awk command.
  Ok I'm getting somewhere!
 
  Rgds,
  Ross
 
 
 
   -Original Message-
   From: Mark J. Bobak [mailto:mark;bobak.net]
   Sent: Monday, 28 October 2002 13:54
   To: Multiple recipients of list ORACLE-L
   Subject: Re: Unix Q: Substring-ing an output.
  
  
   As is often the case, there are a million ways to do 
 this.  Given the
   output listed, I'd do something like:
  
   ps -ef|grep pmon|grep -v grep|awk '{ print $8 }'|awk -F_ '{
   print $3 }'
  
   ps -ef  -- get the programs that are running
   grep pmon -- get only those lines that have 'pmon' in them
   grep -v grep -- drop out the line that has 'grep pmon'
   awk '{ print $8 }' -- get the eighth column, the program name
   awk -F_ '{ print $3 }' -- parse the program name on the 
 '_' and return
   the third field, the database name.
  
   Hope that helps,
  
   -Mark
  
   On Sun, 2002-10-27 at 20:43, Ross Collado wrote:
   
Hi All,
   
I want to feed my shell script with the names of 
 currently running
databases.  I thought of using ps -ef|grep [p]mon.  What I
   got was the
following:
  oracle 20113 1  0   Oct 25 ?0:01 ora_pmon_TLDEV
  oracle   898 1  0   Jul 22 ?0:06 ora_pmon_TLQA
  oracle   944 1  0   Jul 22 ?0:07 ora_pmon_TLQAVAR
  oracle 19588 1  0   Oct 25 ?0:00 ora_pmon_DBMON
  oracle 13509 1  0 12:16:13 ?0:00 ora_pmon_RMAN
  oracle 20450 1  0   Oct 25 ?0:00 ora_pmon_PRDINF
  oracle 13026 1  0   Oct 26 ?0:00 ora_pmon_TLDVVAR
   
What I wanted is get only the db name part eg. TLDEV, RMAN,
   DBMON,etc.  I
don't want to rely on oratab file.
I was thinking of using 'cut' to cut out the last field and
   do some ${X##}
(variable pattern substitution) to get to the dbname bit.
   The trouble is
the number of fields in a ps -ef output is not consistent.
   As you can see
I've just restarted RMAN and now it only has 8 fields as
   compared to 9 for
the others.
   
Any suggestions?  Or another way of doing it?
Using KSH on Solaris 8.
   
Thanks.
Ross
   --
   --
   Mark J. Bobak
   Oracle DBA
   [EMAIL PROTECTED]
   It is not enough to have a good mind.  The main thing is 
 to use it
   well.
 -- Rene Descartes
   --
   Please see the official ORACLE-L FAQ: http://www.orafaq.com
   --
   Author: Mark J. Bobak
 INET: [EMAIL PROTECTED]
  
   Fat City Network Services-- 858-538-5051 
http://www.fatcity.com
  San Diego, California-- Mailing list and web hosting services
  -
  To REMOVE yourself from this mailing list, send an E-Mail message
  to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
  the message BODY, include a line containing: UNSUB ORACLE-L
  (or the name of mailing list you want to be removed from).  You may
  also send the HELP command for other information (like subscribing).
 
--
--
Mark J. Bobak
Oracle DBA
[EMAIL PROTECTED]
It is not enough to have a good mind.  The main thing is to use it
well.
-- Rene Descartes
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mark J. Bobak
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services

RE: Unix Q: Substring-ing an output.

2002-10-28 Thread Ross Collado
Yes, you're right.  Sometimes the most obvious solution is the first one
missed! I really shouldn't care about the last field as the output line I
expect will always have 2 '_' .  Thanks Mark.

Ross


 -Original Message-
 From: Mark Richard [mailto:mrichard;transurban.com.au]
 Sent: Tuesday, 29 October 2002 10:59
 To: Multiple recipients of list ORACLE-L
 Subject: RE: Unix Q: Substring-ing an output.
 
 
 I could be mistaken, but isn't all this discussion about the 
 awk '{ print
 $8 }' problem unwarranted...
 
 The very next portion of the command is an awk using a field 
 seperator of
 underscore.  It doesn't care if it receives the entire line 
 from ps.  Just
 remove that component and the problem is fixed.  From what I can tell:
 
 ps -ef | grep smon | grep -v grep | awk -F_ '{ print $3 }'
 
 Is one way of many to get your result.
 
 
 
   

 Ross Collado  

 Ross.Collado@te   To: Multiple 
 recipients of list ORACLE-L [EMAIL PROTECTED]   
 chpac.com cc:

 Sent by:   Subject: RE: 
 Unix Q: Substring-ing an output. 
 [EMAIL PROTECTED]  

   

   

 29/10/2002 10:24  

 Please respond

 to ORACLE-L   

   

   

 
 
 
 
 Very clever!  But unfortunately, -F accepts only 1 character. 
  I tried that
 though...
 
 Ross
 
 
  -Original Message-
  From: Henry Poras [mailto:hporas;etal.URI.EDU]
  Sent: Tuesday, 29 October 2002 3:43
  To: Multiple recipients of list ORACLE-L
  Subject: RE: Unix Q: Substring-ing an output.
 
 
  Quick thought. What about just setting awk -F_ to awk -Fpmon_  ???
 
  Henry
 
  -Original Message-
  Bobak
  Sent: Sunday, October 27, 2002 11:49 PM
  To: Multiple recipients of list ORACLE-L
 
 
  Hmm...good point.  You know, I use this technique in various
  places.  I
  never noticed that bug before, cause it will only appear if
  the database
  has been up less than 1 day.  Guess it's time to do a bit of script
  auditing.
 
  Ok, try this instead:
  ps -ef|grep pmon|grep -v grep|cut -c49- |awk -F_ '{ 'print $3 }'
 
  I replaced the first awk w/ cut.  the -c option says to cut
  that output
  from position 49 to the end of the line.  You may have to adjust the
  value from 49 to something else.
 
  That ought to work for you.
 
  -Mark
  On Sun, 2002-10-27 at 22:53, Ross Collado wrote:
   Thanks Mark.
  
   Yes that helps, in a way. I could use good ol' awk to 
 parse the last
  field!
   However, a slight problem in the ps -ef output.  If I do
  what you have
   suggested on my 'ps -ef' output below, I would only get
  RMAN as it is the
   only one in field #8.  All the rest are in field #9.  All I
  need now is
   figure out how to cut the last field then pipe it to your
  awk command.
   Ok I'm getting somewhere!
  
   Rgds,
   Ross
  
  
  
-Original Message-
From: Mark J. Bobak [mailto:mark;bobak.net]
Sent: Monday, 28 October 2002 13:54
To: Multiple recipients of list ORACLE-L
Subject: Re: Unix Q: Substring-ing an output.
   
   
As is often the case, there are a million ways to do
  this.  Given the
output listed, I'd do something like:
   
ps -ef|grep pmon|grep -v grep|awk '{ print $8 }'|awk -F_ '{
print $3 }'
   
ps -ef  -- get the programs that are running
grep pmon -- get only those lines that have 'pmon' in them
grep -v grep -- drop out the line that has 'grep pmon'
awk '{ print $8 }' -- get the eighth column, the program name
awk -F_ '{ print $3 }' -- parse the program name on the
  '_' and return
the third field, the database name.
   
Hope that helps,
   
-Mark
   
On Sun, 2002-10-27 at 20:43, Ross Collado wrote:

 Hi All,

 I want to feed my shell script with the names of
  currently

Unix Q: Substring-ing an output.

2002-10-27 Thread Ross Collado

Hi All,

I want to feed my shell script with the names of currently running
databases.  I thought of using ps -ef|grep [p]mon.  What I got was the
following:
  oracle 20113 1  0   Oct 25 ?0:01 ora_pmon_TLDEV
  oracle   898 1  0   Jul 22 ?0:06 ora_pmon_TLQA
  oracle   944 1  0   Jul 22 ?0:07 ora_pmon_TLQAVAR
  oracle 19588 1  0   Oct 25 ?0:00 ora_pmon_DBMON
  oracle 13509 1  0 12:16:13 ?0:00 ora_pmon_RMAN
  oracle 20450 1  0   Oct 25 ?0:00 ora_pmon_PRDINF
  oracle 13026 1  0   Oct 26 ?0:00 ora_pmon_TLDVVAR

What I wanted is get only the db name part eg. TLDEV, RMAN, DBMON,etc.  I
don't want to rely on oratab file.
I was thinking of using 'cut' to cut out the last field and do some ${X##}
(variable pattern substitution) to get to the dbname bit.  The trouble is
the number of fields in a ps -ef output is not consistent.  As you can see
I've just restarted RMAN and now it only has 8 fields as compared to 9 for
the others.

Any suggestions?  Or another way of doing it?
Using KSH on Solaris 8.

Thanks.
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Unix Q: Substring-ing an output.

2002-10-27 Thread Ross Collado
Thanks Mark.

Yes that helps, in a way. I could use good ol' awk to parse the last field!
However, a slight problem in the ps -ef output.  If I do what you have
suggested on my 'ps -ef' output below, I would only get RMAN as it is the
only one in field #8.  All the rest are in field #9.  All I need now is
figure out how to cut the last field then pipe it to your awk command.
Ok I'm getting somewhere!

Rgds,
Ross



 -Original Message-
 From: Mark J. Bobak [mailto:mark;bobak.net]
 Sent: Monday, 28 October 2002 13:54
 To: Multiple recipients of list ORACLE-L
 Subject: Re: Unix Q: Substring-ing an output.
 
 
 As is often the case, there are a million ways to do this.  Given the
 output listed, I'd do something like:
 
 ps -ef|grep pmon|grep -v grep|awk '{ print $8 }'|awk -F_ '{ 
 print $3 }'
 
 ps -ef  -- get the programs that are running
 grep pmon -- get only those lines that have 'pmon' in them
 grep -v grep -- drop out the line that has 'grep pmon'
 awk '{ print $8 }' -- get the eighth column, the program name
 awk -F_ '{ print $3 }' -- parse the program name on the '_' and return
 the third field, the database name.
 
 Hope that helps,
 
 -Mark
 
 On Sun, 2002-10-27 at 20:43, Ross Collado wrote:
  
  Hi All,
  
  I want to feed my shell script with the names of currently running
  databases.  I thought of using ps -ef|grep [p]mon.  What I 
 got was the
  following:
oracle 20113 1  0   Oct 25 ?0:01 ora_pmon_TLDEV
oracle   898 1  0   Jul 22 ?0:06 ora_pmon_TLQA
oracle   944 1  0   Jul 22 ?0:07 ora_pmon_TLQAVAR
oracle 19588 1  0   Oct 25 ?0:00 ora_pmon_DBMON
oracle 13509 1  0 12:16:13 ?0:00 ora_pmon_RMAN
oracle 20450 1  0   Oct 25 ?0:00 ora_pmon_PRDINF
oracle 13026 1  0   Oct 26 ?0:00 ora_pmon_TLDVVAR
  
  What I wanted is get only the db name part eg. TLDEV, RMAN, 
 DBMON,etc.  I
  don't want to rely on oratab file.
  I was thinking of using 'cut' to cut out the last field and 
 do some ${X##}
  (variable pattern substitution) to get to the dbname bit.  
 The trouble is
  the number of fields in a ps -ef output is not consistent.  
 As you can see
  I've just restarted RMAN and now it only has 8 fields as 
 compared to 9 for
  the others.
  
  Any suggestions?  Or another way of doing it?
  Using KSH on Solaris 8.
  
  Thanks.
  Ross
 -- 
 --
 Mark J. Bobak
 Oracle DBA
 [EMAIL PROTECTED]
 It is not enough to have a good mind.  The main thing is to use it
 well.
   -- Rene Descartes
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Mark J. Bobak
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Unix Q: Substring-ing an output.

2002-10-27 Thread Ross Collado
Browsing through my Sed and Awk book following up on Mark's lead, I came up
with this:

ps -ef|grep pmon|grep -v grep|awk '{ print $NF }'|awk -F_ '{ print $3 }'

TLDEV
TLQA
TLQAVAR
DBMON
RMAN
PRDINF
TLDVVAR


That'll do fine !

Thanks again.
Ross


 -Original Message-
 From: Ross Collado 
 Sent: Monday, 28 October 2002 14:50
 To: '[EMAIL PROTECTED]'
 Subject: RE: Unix Q: Substring-ing an output.
 
 
 Thanks Mark.
 
 Yes that helps, in a way. I could use good ol' awk to parse 
 the last field!  However, a slight problem in the ps -ef 
 output.  If I do what you have suggested on my 'ps -ef' 
 output below, I would only get RMAN as it is the only one in 
 field #8.  All the rest are in field #9.  All I need now is 
 figure out how to cut the last field then pipe it to your awk command.
 Ok I'm getting somewhere!
 
 Rgds,
 Ross
 
 
 
  -Original Message-
  From: Mark J. Bobak [mailto:mark;bobak.net]
  Sent: Monday, 28 October 2002 13:54
  To: Multiple recipients of list ORACLE-L
  Subject: Re: Unix Q: Substring-ing an output.
  
  
  As is often the case, there are a million ways to do this.  
 Given the
  output listed, I'd do something like:
  
  ps -ef|grep pmon|grep -v grep|awk '{ print $8 }'|awk -F_ '{ 
  print $3 }'
  
  ps -ef  -- get the programs that are running
  grep pmon -- get only those lines that have 'pmon' in them
  grep -v grep -- drop out the line that has 'grep pmon'
  awk '{ print $8 }' -- get the eighth column, the program name
  awk -F_ '{ print $3 }' -- parse the program name on the '_' 
 and return
  the third field, the database name.
  
  Hope that helps,
  
  -Mark
  
  On Sun, 2002-10-27 at 20:43, Ross Collado wrote:
   
   Hi All,
   
   I want to feed my shell script with the names of currently running
   databases.  I thought of using ps -ef|grep [p]mon.  What I 
  got was the
   following:
 oracle 20113 1  0   Oct 25 ?0:01 ora_pmon_TLDEV
 oracle   898 1  0   Jul 22 ?0:06 ora_pmon_TLQA
 oracle   944 1  0   Jul 22 ?0:07 ora_pmon_TLQAVAR
 oracle 19588 1  0   Oct 25 ?0:00 ora_pmon_DBMON
 oracle 13509 1  0 12:16:13 ?0:00 ora_pmon_RMAN
 oracle 20450 1  0   Oct 25 ?0:00 ora_pmon_PRDINF
 oracle 13026 1  0   Oct 26 ?0:00 ora_pmon_TLDVVAR
   
   What I wanted is get only the db name part eg. TLDEV, RMAN, 
  DBMON,etc.  I
   don't want to rely on oratab file.
   I was thinking of using 'cut' to cut out the last field and 
  do some ${X##}
   (variable pattern substitution) to get to the dbname bit.  
  The trouble is
   the number of fields in a ps -ef output is not consistent.  
  As you can see
   I've just restarted RMAN and now it only has 8 fields as 
  compared to 9 for
   the others.
   
   Any suggestions?  Or another way of doing it?
   Using KSH on Solaris 8.
   
   Thanks.
   Ross
  -- 
  --
  Mark J. Bobak
  Oracle DBA
  [EMAIL PROTECTED]
  It is not enough to have a good mind.  The main thing is to use it
  well.
  -- Rene Descartes
  -- 
  Please see the official ORACLE-L FAQ: http://www.orafaq.com
  -- 
  Author: Mark J. Bobak
INET: [EMAIL PROTECTED]
  
  Fat City Network Services-- 858-538-5051 http://www.fatcity.com
  San Diego, California-- Mailing list and web 
 hosting services
  
 -
  To REMOVE yourself from this mailing list, send an E-Mail message
  to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
  the message BODY, include a line containing: UNSUB ORACLE-L
  (or the name of mailing list you want to be removed from).  You may
  also send the HELP command for other information (like subscribing).
  
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Unix Q: Substring-ing an output. (CLOSED)

2002-10-27 Thread Ross Collado
Yes this works too. I think the trick is in deriving the last field in this
case it was the $NF all along.

Thanks to all who replied and those who attempted to.  

Ross

 -Original Message-
 From: Sujatha Madan [mailto:Sujatha.Madan;CMC.OPTUS.NET.AU]
 Sent: Monday, 28 October 2002 14:38
 To: Multiple recipients of list ORACLE-L
 Subject: RE: Unix Q: Substring-ing an output.
 
 
 Hi Ross,
 
 Try something like this:
 
 DBNAME=`ps -ef | grep pmon | awk '{db=substr($NF, 10); print db}'`
 
 There are several ways of doing this - what's above is just one.
 
 Cheers
 Sujatha
 
 -Original Message-
 Sent: Monday, 28 October 2002 12:43 PM
 To: Multiple recipients of list ORACLE-L
 
 
 
 Hi All,
 
 I want to feed my shell script with the names of currently running
 databases.  I thought of using ps -ef|grep [p]mon.  What I got was the
 following:
   oracle 20113 1  0   Oct 25 ?0:01 ora_pmon_TLDEV
   oracle   898 1  0   Jul 22 ?0:06 ora_pmon_TLQA
   oracle   944 1  0   Jul 22 ?0:07 ora_pmon_TLQAVAR
   oracle 19588 1  0   Oct 25 ?0:00 ora_pmon_DBMON
   oracle 13509 1  0 12:16:13 ?0:00 ora_pmon_RMAN
   oracle 20450 1  0   Oct 25 ?0:00 ora_pmon_PRDINF
   oracle 13026 1  0   Oct 26 ?0:00 ora_pmon_TLDVVAR
 
 What I wanted is get only the db name part eg. TLDEV, RMAN, 
 DBMON,etc.  I
 don't want to rely on oratab file.
 I was thinking of using 'cut' to cut out the last field and 
 do some ${X##}
 (variable pattern substitution) to get to the dbname bit.  
 The trouble is
 the number of fields in a ps -ef output is not consistent.  
 As you can see
 I've just restarted RMAN and now it only has 8 fields as 
 compared to 9 for
 the others.
 
 Any suggestions?  Or another way of doing it?
 Using KSH on Solaris 8.
 
 Thanks.
 Ross
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Ross Collado
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Sujatha Madan
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Actual table size (Has been posted/discussed before)

2002-10-16 Thread Ross Collado

Hi All,

It has previously been discussed in this list regarding the actual size of a
table.  Can someone re-post the SQL to get this?
I've got a table that has been ANALYZED.  It has only 1 extent (INITIAL
50M). There's been a lot of deletes and insert on it.  I wanted to know how
much of the 50M has data in it?

On 817.

Rgds,
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Actual table size (Has been posted/discussed before)

2002-10-16 Thread Ross Collado

Thanks Kirti.  I'll give that a go.

RC

 -Original Message-
 From: Deshpande, Kirti [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 17 October 2002 14:29
 To: Multiple recipients of list ORACLE-L
 Subject: RE: Actual table size (Has been posted/discussed before)
 
 
 You can try this: 
 
 REM == From Oracle-l posting  
 set echo off term on feed on pause off verify off
 prompt Username to check space for:
 col cobjuser noprint new_value uobjuser
 set term off feed off
 select upper('1') cobjuser from dual;
 set term on feed on
 
 prompt Object to check space on ( for uobjuser user ):
 col cobjname noprint new_value uobjname
 set term off feed off
 select upper('2') cobjname from dual;
 set term on feed on
 
 prompt Type of object: - (T)able  (I)ndex
 col cobjtype noprint new_value uobjtype
 set term off feed off
 select ('3') cobjtype from dual;
 set term on feed on
 
 set serverout on size 100
 
 prompt
 prompt
 prompt
 
 set feed off
 
 declare
   op1 number;
   op2 number;
   op3 number;
   op4 number;
   op5 number;
   op6 number;
   op7 number;
   objname varchar2(30);
   objtype varchar2(10);
   objuser varchar2(30);
   free_blocks number :=0;
 begin
 
   select upper('uobjuser') into objuser from dual;
 
   select
   decode(upper('uobjtype'),
   'T','TABLE',
   'I','INDEX',
   NULL
   ) into objtype from dual;
 
   select upper('uobjname') into objname from dual;
 
   dbms_space.unused_space(objuser,
   objname, objtype,
   op1,op2,op3,op4,op5,op6,op7);
   
   dbms_output.put_line('schema= ' || objuser);
   dbms_output.put_line('object name   = ' || objname);
   dbms_output.put_line('object type   = ' || objtype);
   dbms_output.put_line('-');
   dbms_output.put_line('  total_blocks  = '||op1);
   dbms_output.put_line('  total_bytes   = '||op2);
   dbms_output.put_line('  unused_blocks = '||op3);
   dbms_output.put_line('  unused_bytes  = '||op4);
   dbms_output.put_line('  last_used_extent_file_id  = '||op5);
   dbms_output.put_line('  last_used_extent_block_id = '||op6);
   dbms_output.put_line('  last_used_block   = '||op7);
 end ;
 /
 
 prompt
 prompt
 prompt
 set feed on
 undef 1 2 
 
 -Original Message-
 Sent: Wednesday, October 16, 2002 10:39 PM
 To: Multiple recipients of list ORACLE-L
 
 
 Hi All,
 
 It has previously been discussed in this list regarding the 
 actual size of a
 table.  Can someone re-post the SQL to get this?
 I've got a table that has been ANALYZED.  It has only 1 
 extent (INITIAL
 50M). There's been a lot of deletes and insert on it.  I 
 wanted to know how
 much of the 50M has data in it?
 
 On 817.
 
 Rgds,
 Ross
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Ross Collado
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Deshpande, Kirti
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



CLOSED: UNIX OT: Strange Unix behavior

2002-08-27 Thread Ross Collado

Eric
Yes, that's exactly it!
Thanks.
Ross

 -Original Message-
 From: Erik Williams [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 27 August 2002 22:53
 To: Multiple recipients of list ORACLE-L
 Subject: RE: UNIX OT: Strange Unix behavior
 
 
 Check your /etc directory for a file called auto_home. If 
 this exists and
 the automountd is running, then this is the cause of the 
 problem. I just
 comment the /home line out of the auto_master and restart the 
 daemon. I
 think that this is the root of you problem. Let me know if 
 this does not do
 it. 
 
 Erik
 
 -Original Message-
 Sent: Monday, August 26, 2002 8:48 PM
 To: Multiple recipients of list ORACLE-L
 
 
 It doesn't look like it.  I did 'mount' and 'df'.  Both did not report
 '/home' as being mounted.
 There must be a way around this.  Must keep looking...
 Thanks.
 Ross
 
  -Original Message-
  From: Erik Williams [mailto:[EMAIL PROTECTED]]
  Sent: Monday, 26 August 2002 22:53
  To: Multiple recipients of list ORACLE-L
  Subject: RE: UNIX OT: Strange Unix behavior
  
  
  This directory might be under the control of the automount 
  daemon. If you
  want locally managed home directories you need to remove 
  /home from the
  automountd. 
  
  Erik 
  
   -Original Message-
   From: Ross Collado [SMTP:[EMAIL PROTECTED]]
   Sent: Monday, August 26, 2002 3:58 AM
   To:   Multiple recipients of list ORACLE-L
   Subject:  UNIX OT: Strange Unix behavior
   
   For the Unix gurus in the list:
   
   Apologies in advanvce for this OT question.  Thought 
 maybe our Unix
   experts
   in the list might be able to help.
   
   Env. Solaris 8
   
   I seem to be having difficulty renaming and/or deleting  
  /home/oracle.  In
   fact even a chmod 755 /home doesn't work - returning  
  chmod: WARNING:
   can't change home
   I find it very strange that root can't do this.  
   
   Has anyone experienced this before?
   If so, how did you get around it?
   
   Rgds,
   Ross
   
   -- 
   Please see the official ORACLE-L FAQ: http://www.orafaq.com
   -- 
   Author: Ross Collado
 INET: [EMAIL PROTECTED]
   
   Fat City Network Services-- (858) 538-5051  FAX: 
 (858) 538-5051
   San Diego, California-- Public Internet access / 
  Mailing Lists
   
 
   To REMOVE yourself from this mailing list, send an E-Mail message
   to: [EMAIL PROTECTED] (note EXACT spelling of 
 'ListGuru') and in
   the message BODY, include a line containing: UNSUB ORACLE-L
   (or the name of mailing list you want to be removed 
 from).  You may
   also send the HELP command for other information (like 
 subscribing).
  
  -- 
  Please see the official ORACLE-L FAQ: http://www.orafaq.com
  -- 
  Author: Erik Williams
INET: [EMAIL PROTECTED]
  
  Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
  San Diego, California-- Public Internet access / 
 Mailing Lists
  
  To REMOVE yourself from this mailing list, send an E-Mail message
  to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
  the message BODY, include a line containing: UNSUB ORACLE-L
  (or the name of mailing list you want to be removed from).  You may
  also send the HELP command for other information (like subscribing).
  
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Ross Collado
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Erik Williams
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

UNIX OT: Strange Unix behavior

2002-08-26 Thread Ross Collado

For the Unix gurus in the list:

Apologies in advanvce for this OT question.  Thought maybe our Unix experts
in the list might be able to help.

Env. Solaris 8

I seem to be having difficulty renaming and/or deleting  /home/oracle.  In
fact even a chmod 755 /home doesn't work - returning  chmod: WARNING:
can't change home
I find it very strange that root can't do this.  

Has anyone experienced this before?
If so, how did you get around it?

Rgds,
Ross

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: UNIX OT: Strange Unix behavior

2002-08-26 Thread Ross Collado

Thanks Erik.  I'll give that a go.

Rgds,
Ross

 -Original Message-
 From: Erik Williams [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 26 August 2002 22:53
 To: Multiple recipients of list ORACLE-L
 Subject: RE: UNIX OT: Strange Unix behavior
 
 
 This directory might be under the control of the automount 
 daemon. If you
 want locally managed home directories you need to remove 
 /home from the
 automountd. 
 
 Erik 
 
  -Original Message-
  From:   Ross Collado [SMTP:[EMAIL PROTECTED]]
  Sent:   Monday, August 26, 2002 3:58 AM
  To: Multiple recipients of list ORACLE-L
  Subject:UNIX OT: Strange Unix behavior
  
  For the Unix gurus in the list:
  
  Apologies in advanvce for this OT question.  Thought maybe our Unix
  experts
  in the list might be able to help.
  
  Env. Solaris 8
  
  I seem to be having difficulty renaming and/or deleting  
 /home/oracle.  In
  fact even a chmod 755 /home doesn't work - returning  
 chmod: WARNING:
  can't change home
  I find it very strange that root can't do this.  
  
  Has anyone experienced this before?
  If so, how did you get around it?
  
  Rgds,
  Ross
  
  -- 
  Please see the official ORACLE-L FAQ: http://www.orafaq.com
  -- 
  Author: Ross Collado
INET: [EMAIL PROTECTED]
  
  Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
  San Diego, California-- Public Internet access / 
 Mailing Lists
  
  To REMOVE yourself from this mailing list, send an E-Mail message
  to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
  the message BODY, include a line containing: UNSUB ORACLE-L
  (or the name of mailing list you want to be removed from).  You may
  also send the HELP command for other information (like subscribing).
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Erik Williams
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: UNIX OT: Strange Unix behavior

2002-08-26 Thread Ross Collado

It doesn't look like it.  I did 'mount' and 'df'.  Both did not report
'/home' as being mounted.
There must be a way around this.  Must keep looking...
Thanks.
Ross

 -Original Message-
 From: Erik Williams [mailto:[EMAIL PROTECTED]]
 Sent: Monday, 26 August 2002 22:53
 To: Multiple recipients of list ORACLE-L
 Subject: RE: UNIX OT: Strange Unix behavior
 
 
 This directory might be under the control of the automount 
 daemon. If you
 want locally managed home directories you need to remove 
 /home from the
 automountd. 
 
 Erik 
 
  -Original Message-
  From:   Ross Collado [SMTP:[EMAIL PROTECTED]]
  Sent:   Monday, August 26, 2002 3:58 AM
  To: Multiple recipients of list ORACLE-L
  Subject:UNIX OT: Strange Unix behavior
  
  For the Unix gurus in the list:
  
  Apologies in advanvce for this OT question.  Thought maybe our Unix
  experts
  in the list might be able to help.
  
  Env. Solaris 8
  
  I seem to be having difficulty renaming and/or deleting  
 /home/oracle.  In
  fact even a chmod 755 /home doesn't work - returning  
 chmod: WARNING:
  can't change home
  I find it very strange that root can't do this.  
  
  Has anyone experienced this before?
  If so, how did you get around it?
  
  Rgds,
  Ross
  
  -- 
  Please see the official ORACLE-L FAQ: http://www.orafaq.com
  -- 
  Author: Ross Collado
INET: [EMAIL PROTECTED]
  
  Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
  San Diego, California-- Public Internet access / 
 Mailing Lists
  
  To REMOVE yourself from this mailing list, send an E-Mail message
  to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
  the message BODY, include a line containing: UNSUB ORACLE-L
  (or the name of mailing list you want to be removed from).  You may
  also send the HELP command for other information (like subscribing).
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Erik Williams
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



UNIX Q: How do I delete files beginning with #

2002-07-31 Thread Ross Collado

Hi,
I have files like:
#Column
#This
#

How do I get rid of these 3?

Rgds,
Ross

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: ... And another RMAN Q.

2002-07-30 Thread Ross Collado

Thanks Alex.
Yes that thought occured in my mind but that would be my last option.
I'm still trying to find other ways than remote mounting filesystems.

Rgds,
Ross

 -Original Message-
 From: Alexandre Gorbatchev [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 31 July 2002 0:03
 To: Multiple recipients of list ORACLE-L
 Subject: Re: ... And another RMAN Q.
 
 
 The one way is to mount the directory from one box to another 
 using nfs.
 
 Alexandre
 
 - Original Message -
 To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
 Sent: Tuesday, July 30, 2002 3:23 PM
 
 
  Ross
 No.
 The fundamental way RMAN works is to create the 
 backupset on the target
  system.
  Dennis Williams
  DBA
  Lifetouch, Inc.
  [EMAIL PROTECTED]
 
 
  -Original Message-
  Sent: Tuesday, July 30, 2002 12:58 AM
  To: Multiple recipients of list ORACLE-L
 
 
  Hi all,
 
  Env.: 2 Solaris boxes both Oracle 8.1.7.3
 
  BoxA has the RMAN catalog. BoxB is where the Prod db is.  
 RMAN backups are
  initiated from BoxA to backup db in BoxB.  RMAN backupsets 
 are created in
  BoxB.  Is there a way to get RMAN to create the backupsets in BoxA
 instead?
 
  Below is an excerpt of my rman backup script:
  ---
  ---
  ---
  replace script backup_db_full {
execute script archive_log_current;
execute script alloc_all_disks;
execute script set_maxcorrupt;
backup
  full
  skip inaccessible
  tag b_db_full
  filesperset 3
  format '/oracle1/oracle/admin/RMAN/backup/df/dfset_%s_%t.%d'
  database;
execute script rel_all_disks;
execute script archive_log_current;
execute script backup_al_all;
  }
  ---
  ---
 
  Rgds,
  Ross
  --
  Please see the official ORACLE-L FAQ: http://www.orafaq.com
  --
  Author: Ross Collado
INET: [EMAIL PROTECTED]
 
  Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
  San Diego, California-- Public Internet access / 
 Mailing Lists
  
  To REMOVE yourself from this mailing list, send an E-Mail message
  to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
  the message BODY, include a line containing: UNSUB ORACLE-L
  (or the name of mailing list you want to be removed from).  You may
  also send the HELP command for other information (like subscribing).
  --
  Please see the official ORACLE-L FAQ: http://www.orafaq.com
  --
  Author: DENNIS WILLIAMS
INET: [EMAIL PROTECTED]
 
  Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
  San Diego, California-- Public Internet access / 
 Mailing Lists
  
  To REMOVE yourself from this mailing list, send an E-Mail message
  to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
  the message BODY, include a line containing: UNSUB ORACLE-L
  (or the name of mailing list you want to be removed from).  You may
  also send the HELP command for other information (like subscribing).
 
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Alexandre Gorbatchev
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: ... And another RMAN Q.

2002-07-30 Thread Ross Collado

Hi Tom,
My backup starts on BoxA.  It uses the rman binary in BoxA. So I do 'connect
target user/passwd@BoxB'.
Well I too thought that the backupset will be created in BoxA.  Looks like
backupsets gets created wherever the target db is.
rgds,
Ross

 -Original Message-
 From: Mercadante, Thomas F [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 30 July 2002 22:53
 To: Multiple recipients of list ORACLE-L
 Subject: RE: ... And another RMAN Q.
 
 
 Ross,
 
 when you say RMAN backups are initiated from BoxA to backup 
 db in BoxB
 what do you mean?  are they run on BoxA or BoxB?  If they are 
 run on BoxA,
 then the backup files will be created on BoxA.
 
 Tom Mercadante
 Oracle Certified Professional
 
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: ... And another RMAN Q.

2002-07-30 Thread Ross Collado

Dennis,
Someone did mention that to me but found it hard to believe Oracle does not
have an option to save the backupsets in the box where you initiated RMAN.
Maybe Oracle thought by allowing it, it will saturate the network. Still, I
would have preferred the option to be there.
Rgds,
Ross

 -Original Message-
 From: DENNIS WILLIAMS [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 30 July 2002 23:23
 To: Multiple recipients of list ORACLE-L
 Subject: RE: ... And another RMAN Q.
 
 
 Ross
No. 
The fundamental way RMAN works is to create the backupset 
 on the target
 system.
 Dennis Williams
 DBA
 Lifetouch, Inc.
 [EMAIL PROTECTED]
 
 
 -Original Message-
 Sent: Tuesday, July 30, 2002 12:58 AM
 To: Multiple recipients of list ORACLE-L
 
 
 Hi all,
 
 Env.: 2 Solaris boxes both Oracle 8.1.7.3
 
 BoxA has the RMAN catalog. BoxB is where the Prod db is.  
 RMAN backups are
 initiated from BoxA to backup db in BoxB.  RMAN backupsets 
 are created in
 BoxB.  Is there a way to get RMAN to create the backupsets in 
 BoxA instead?
 
 Below is an excerpt of my rman backup script:
 ---
 ---
 ---
 replace script backup_db_full {
   execute script archive_log_current;
   execute script alloc_all_disks;
   execute script set_maxcorrupt;
   backup
 full
 skip inaccessible
 tag b_db_full
 filesperset 3
 format '/oracle1/oracle/admin/RMAN/backup/df/dfset_%s_%t.%d'
 database;
   execute script rel_all_disks;
   execute script archive_log_current;
   execute script backup_al_all;
 }
 ---
 ---
 
 Rgds,
 Ross
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Ross Collado
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: DENNIS WILLIAMS
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



... And another RMAN Q.

2002-07-29 Thread Ross Collado

Hi all,

Env.: 2 Solaris boxes both Oracle 8.1.7.3

BoxA has the RMAN catalog. BoxB is where the Prod db is.  RMAN backups are
initiated from BoxA to backup db in BoxB.  RMAN backupsets are created in
BoxB.  Is there a way to get RMAN to create the backupsets in BoxA instead?

Below is an excerpt of my rman backup script:
---
---
---
replace script backup_db_full {
  execute script archive_log_current;
  execute script alloc_all_disks;
  execute script set_maxcorrupt;
  backup
full
skip inaccessible
tag b_db_full
filesperset 3
format '/oracle1/oracle/admin/RMAN/backup/df/dfset_%s_%t.%d'
database;
  execute script rel_all_disks;
  execute script archive_log_current;
  execute script backup_al_all;
}
---
---

Rgds,
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Case Closed: Unix Q: ksh scripting

2002-07-24 Thread Ross Collado

Hello all,

Great replies!  After reading all your replies I realized where I went
wrong.  I'm putting my | tail -1 in the wrong end of the EOF marker.
Should have been on the first one not the last.  This works fine for what I
intend to do:
# !/bin/ksh
# set -x
sqlplus / EOF  | tail -1
select sysdate from dual;
exit
EOF

My intention is not really just to get the date.  It's really to get the
last line of the output.  This script is just a simplified version of a more
complex shell script I'm working on.  
Thanks a lot to all who responded and those who attempted to.

Cheers,
Ross


 -Original Message-
 From: Ross Collado 
 Sent: Wednesday, 24 July 2002 14:53
 To: Multiple recipients of list ORACLE-L
 Subject: Unix Q: ksh scripting
 
 
 Hi all,
 Can any of our Unix gurus here transform my script below to 
 work properly?  
 The intention is to print the last line of the sqlplus output.
 With set -x, it appears anything after the last EOF is ignored. Why?
 Thanks.
 Ross
 
 #!/bin/ksh
 #set -x
 sqlplus / EOF
 select sysdate from dual;
 exit
 EOF | tail -1
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Ross Collado
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Unix Q: ksh scripting

2002-07-23 Thread Ross Collado

Hi all,
Can any of our Unix gurus here transform my script below to work properly?  
The intention is to print the last line of the sqlplus output.
With set -x, it appears anything after the last EOF is ignored. Why?
Thanks.
Ross

#!/bin/ksh
#set -x
sqlplus / EOF
select sysdate from dual;
exit
EOF | tail -1
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Exp Imp User ?

2002-06-18 Thread Ross Collado

This will get you started.

http://tahiti.oracle.com/pls/tahiti/tahiti.drilldown?remark=word=Create+use
rbook=a85397preference=

http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/
a76955/ch01.htm#17082

http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/
a76955/ch02.htm

RC

 -Original Message-
 From: guess who [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 19 June 2002 14:33
 To: Multiple recipients of list ORACLE-L
 Subject: Exp  Imp  User ?
 
 
 I want to know the export and import commands(SYNTAX).
 
 Then i want to know what are all the steps(commands) to be done 
 for creating a new user such that after creating i have to use the 
 above two commands and to take a dump of scott user , then that 
 scott dump should be incorporated into the new user i have 
 created.
 
 i want to know all the steps clearly for the above task...
 
 
 Kindly Help
 
 Regards,
 [EMAIL PROTECTED]
 
 
 _
 Click below to visit monsterindia.com and there is always a
 better job for you at http://monsterindia.rediff.com/jobs
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: guess who
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Maintaining Simulated Standby DB on 7.1.6.0

2002-06-05 Thread Ross Collado

Hi,

I've got an old (test db) Oracle 7.1.6.0 db on HP-Ux. I've created a
simulated standby db on another server of same spec. I say simulated
because there is no real standby mechanism in this old version.  Anyway, the
standby database is mounted and on regular intervals (via cron), is doing
recover database using backup controlfile until cancel.  So far this
arrangement is working perfectly. Now this is where it starts to become
hairy. The tablespace USERS has 2 datafiles. USERS needs to be resized and
the datafiles relocated.

What I've done so far are the ff:
1. exported everything in USERS
2. dropped USERS t/space on primary then recreate with new datafile size and
location.
3. recreated all tables in it.
4. imported all data back.

While this is happening, the primary is happily generating all these archive
logs which in turn are also being applied to the standby. The standby's
alert.log indicates it has applied all logs and reports no errors.  I then
tried to open the standby db using alter databse open resetlogs.  I didn't
expect this to work and sure enough I got the error:
SQLDBA alter database open resetlogs;
ORA-01177: data file does not match dictionary - probably old incarnation
ORA-01110: data file 5: '/u9/db/DEV/users01.dbf'

users01.dbf is the old filename.

My questions are:
1. Why is there no error reported? I was expecting it to complain about an
unknown datafile.
2. If the standby is applying the logs where is it applying the transactions
to?
3. Since there is no '... offline drop' in this version, is there any other
way to get around this apart from completely recreating the standby?

Any input much appreciated. 

Rgds,
Ross

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Problem with standby database listener

2002-02-21 Thread Ross Collado

I have 8.1.7.0 on Solaris 8 and also had this problem.  Somehow the way I
get around this is to go back to the Primary db and reset the
log_archive_dest_2 to whatever the identifier of the standby db is. (even if
the log_archive_dest_2 is already set).  Then I do the standby recovery,
then managed recovery.  This probably explains why yours work after you
bounce your Primary db.  You must have the standby db location set in the
init.ora file.  What I do, however, is force a reset of the standby db
location after I startup the standby db.  This way I don't have to bounce my
Primary db.  Everything's scripted.
Clear as mud?
HTH. 
Ross

-Original Message-
Sent: Friday, 22 February 2002 7:59
To: Multiple recipients of list ORACLE-L



Fellow dba's, 
 
We have come across a weird problem with a standby database. Every time we
issue alter database mount standby database on the standby database, the
primary database fails to connect through listener. It becomes OK after
primary database is shutdown and restarted — of course this can is not an
acceptable solution since the standby will be opened every week for
reporting.
 
Anyone experience this before?  Any direction would be appreciated.
 
Thanks
 
 
 
 
 
 
Stephen Andert
Scottsdale, Arizona


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Creating a missing datafile

2002-02-05 Thread Ross Collado


Env.
HP-UX 10.2
Oracle 7.1.6
Archivelog mode


Found this in the alert.log

Dictionary check beginning
File #41 found in data dictionary but not in controlfile.
Creating OFFLINE file 'MISSING0041' in the controlfile.
Dictionary check complete

I did a dump of the controlfile to trace and checked.  It had MISSING0041 in
it.  However, I did a find on this file and couldn't find it.  Does this
mean MISSING0041 was just updated in the controlfile and was not actually
created as a physical file?
I know the complete path/filename of what this MISSING0041 datafile should
be (it should be /u2/db/archive2_2.dbf).  This is actually the 3rd datafile
of ARCHIVE tablespace.  If this file existed then it would have been an easy
rename of datafile via ALTER TABLESPACE ... RENAME DATAFILE  But there
is no physical file to rename.
I don't think I can do a create a file via ALTER DATABASE CREATE
DATAFILE... in this case because the controlfile won't have the correct
path/filename of this datafile (it's got 'MISSING0041' SIZE 500M).
How do I go about recreating a physical file having the correct filename and
size?

TIA,

Ross

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Creating a missing datafile

2002-02-05 Thread Ross Collado

Thanks Deepak,

Slight problem though.  The database has been opened with RESETLOGS so
previous archive logs are useless.
v$recover_file reports this file# is offline/missing file.
I think my only other option is to drop then rebuild/recreate the tablespace
and import the objects in it from an export dump.

Ross

 -Original Message-
 From: Deepak Thapliyal [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, 6 February 2002 11:45
 To: Multiple recipients of list ORACLE-L
 Subject: Re: Creating a missing datafile
 
 
 Hi Ross,
 
 have u by any chance restored a backupcontrol file
 that was backedup before you added this datafile. 
 
 Is this the case? If yes than what oracle is doing is
 putting a placeholder entry for this file and calling
 it missing file.. here is what u can do (assumes that
 you have all the archivelogs available since this file
 was created ..
 
 restore the db from backup and mount it .. 
 
 SQL select name from v$datafile where file#=41;
 
 SQL ALTER DATABASE 
  CREATE DATAFILE  
 'use the out of above sql'  as 
'/u2/db/archive2_2.dbf';
 
 SQL recover database using backup controlfile ;
 
 Use Auto till it asks for non-existent arch (supply ur
 online log) 
 
 Media recovery complete after online log is applied
 
 technically u should be able to open the db in
 noresetlogs mode at this time .. however i have seen
 that it does not .. so here is the workaround ..
 
 SQL alter database backup controlfile to trace;
 SQL create controlf file .. from ur trace
 SQL recover database; -- takes one sec to complete
 SQL Alter database open;
 
 hth
 Deepak
 --- Ross Collado [EMAIL PROTECTED] wrote:
  
  Env.
  HP-UX 10.2
  Oracle 7.1.6
  Archivelog mode
  
  
  Found this in the alert.log
  
  Dictionary check beginning
  File #41 found in data dictionary but not in
  controlfile.
  Creating OFFLINE file 'MISSING0041' in the
  controlfile.
  Dictionary check complete
  
  I did a dump of the controlfile to trace and
  checked.  It had MISSING0041 in
  it.  However, I did a find on this file and couldn't
  find it.  Does this
  mean MISSING0041 was just updated in the controlfile
  and was not actually
  created as a physical file?
  I know the complete path/filename of what this
  MISSING0041 datafile should
  be (it should be /u2/db/archive2_2.dbf).  This is
  actually the 3rd datafile
  of ARCHIVE tablespace.  If this file existed then it
  would have been an easy
  rename of datafile via ALTER TABLESPACE ... RENAME
  DATAFILE  But there
  is no physical file to rename.
  I don't think I can do a create a file via ALTER
  DATABASE CREATE
  DATAFILE... in this case because the controlfile
  won't have the correct
  path/filename of this datafile (it's got
  'MISSING0041' SIZE 500M).
  How do I go about recreating a physical file having
  the correct filename and
  size?
  
  TIA,
  
  Ross
  
  -- 
  Please see the official ORACLE-L FAQ:
  http://www.orafaq.com
  -- 
  Author: Ross Collado
INET: [EMAIL PROTECTED]
  
  Fat City Network Services-- (858) 538-5051  FAX:
  (858) 538-5051
  San Diego, California-- Public Internet
  access / Mailing Lists
 
 
  To REMOVE yourself from this mailing list, send an
  E-Mail message
  to: [EMAIL PROTECTED] (note EXACT spelling of
  'ListGuru') and in
  the message BODY, include a line containing: UNSUB
  ORACLE-L
  (or the name of mailing list you want to be removed
  from).  You may
  also send the HELP command for other information
  (like subscribing).
 
 
 __
 Do You Yahoo!?
 Send FREE Valentine eCards with Yahoo! Greetings!
 http://greetings.yahoo.com
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Deepak Thapliyal
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP

RE: simple sql problem

2001-12-03 Thread Ross Collado

I don't believe SQLPlus will let you run a SQL statement in the command line
itself.  As you can see in Usage:, it doesn't have an option for this.
However, if you insist on running SQL statements in the command line itself,
you can probably do something like (only in Unix):

sqlplus -s scott/tiger  !
select * from emp;
!

or 

save your select * from emp; to a sql file and do :
sqlplus -s scott/tiger @myfile.sql

hth
Ross

 -Original Message-
 From: Viraj Luthra [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 4 December 2001 16:11
 To: Multiple recipients of list ORACLE-L
 Subject: simple sql problem
 
 
 Hello all,
 
 Why cannot I do :-
 
 sqlplus -s scott/tiger select * from emp;
 
 or sqlplus -s scott/tiger select * from emp;
 
 Both the cases I get :-
 
 Usage: SQLPLUS [option] [user[/password] [@host]]
[@startfile [parm1] [parm2] ...]
 where option ::= { -s | -? }   
 -s for silent mode and -? to obtain version number   
 
 
 What is wrong above? I need to run the query from command 
 line. How do I modify this :-
 
 sqlplus -s scott/tiger select * from emp;
 
 
 Rgds,
 
 
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: Viraj Luthra
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Deferred appliction of arch logs in Standby DB

2001-12-03 Thread Ross Collado

Is there a way to defer the application of archive logs in the Standby db?
Or maybe defer the actual sending of the logs from the Primary db.  Kind of
like the INTERVAL option in SCHEDULE_PUSH of Adv. Replication.

Thanks,
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: OT:Unix Q - Solved

2001-08-27 Thread Ross Collado

Thanks. That's it.

 -Original Message-
 From: Jared Still [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, 28 August 2001 12:15
 To: [EMAIL PROTECTED]; Ross Collado
 Subject: Re: OT:Unix Q
 
 
 
 do a 'man ssh-keygen'
 
 Jared
 
 On Monday 27 August 2001 19:41, Ross Collado wrote:
  To all Unix gurus,
 
  What's the command to generate an identity.pub file for 
 use in ssh ?
 
  Rgds,
  Ross
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



OT:(Unix Q): Re-executing an old command

2001-08-03 Thread Ross Collado

I'm using ksh.  From the Unix prompt I do   history  which displays the last
170 commands I did. 
I would like to re-run  #55 in the list (which happens to be a rm with a lot
of arguments).  How do I do it?
I tried doing ESC-K then /rm to find it but it didn't.  Usually it does.

Thanks,
Ross
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: How to create 2 unique indexes (Field1, Field2) and (Field1,

2001-05-30 Thread Ross Collado

Hi,

The second index failed because of dups found.  You will need to check the
data and correct them before creating the index.  
The following should tell you which ones have dupl. values and how many
occured:

SELECT ACCTNO,PAYGRP,count(*)  from SPY_ADHOC_PAYMENT group by ACCTNO,PAYGRP
having count(*)  1;

HTH,
Ross

 -Original Message-
 From: CHAN Chor Ling Catherine (CSC) [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 31 May 2001 11:55
 To: Multiple recipients of list ORACLE-L
 Subject: How to create 2 unique indexes (Field1, Field2) and (Field1,
 Fiel
 
 
 Hi Gurus,
 
 How do I create 2 unique indexes (STDID,PAYGRP) and 
 (ACCTNO,PAYGRP) on the
 same table ?
 
 I created the first index successfully but encountered the 
 error ORA-01452:
 cannot CREATE UNIQUE INDEX; duplicate keys found when I 
 tried to create the
 2nd index. 
 
 SELECT INDEX_NAME,TABLE_NAME,UNIQUENESS FROM USER_INDEXES WHERE
 TABLE_NAME='SPY_ADHOC_PAYMENT'
 
 INDEX_NAME TABLE_NAME 
 UNIQUENES
 -- -- 
 -
 U_SPYADH_1 SPY_ADHOC_PAYMENT  UNIQUE
 
 SQL SELECT * FROM USER_IND_COLUMNS  WHERE 
 TABLE_NAME='SPY_ADHOC_PAYMENT';
 
 INDEX_NAME TABLE_NAME 
 COLUMN_NAME
 -- --
 --
 U_SPYADH_1 SPY_ADHOC_PAYMENT  STDID
 U_SPYADH_1 SPY_ADHOC_PAYMENT  PAYGRP
 
 SQL CREATE UNIQUE INDEX U_SPYADH_2 ON SPY_ADHOC_PAYMENT 
 (ACCTNO,PAYGRP);
 CREATE UNIQUE INDEX U_SPYADH_2 ON SPY_ADHOC_PAYMENT (ACCTNO,PAYGRP)
   *
 ERROR at line 1:
 ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
 
 Any advice ? Thanks.
 
 Regds,
 New Bee
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.com
 -- 
 Author: CHAN Chor Ling Catherine (CSC)
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
 San Diego, California-- Public Internet access / Mailing Lists
 
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: catrep.sql

2001-05-29 Thread Ross Collado

Hi,
 
You can find it in $ORACLE_HOME/rdbms/admin.  
 
Ross

-Original Message-
Sent: Wednesday, 30 May 2001 15:21
To: Multiple recipients of list ORACLE-L



hello oracle gurus!

i just tried a default installation of oracle 8.0.6 to our hp-unix machine.
i followed step by step the procedures as stated in the oracle installation
guide. my problem is when it comes to the step (pp 4-2 of the installation
guide) that says run the catrep.sql. where can i find this sql script?

thanks!
oracle newbie


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ross Collado
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).