Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sort-of-simple Oracle questions

Re: sort-of-simple Oracle questions

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 10 Nov 1999 15:40:59 -0500
Message-ID: <LtcpODd4lId1QLd3cmwaLX=JdD+E@4ax.com>


A copy of this was sent to Steve Parker <steve_at_naweb.com> (if that email address didn't require changing) On Wed, 10 Nov 1999 18:37:01 GMT, you wrote:

>hello all,
>
>I running Oracle 8.0.5 on Linux...
>
>I have a few questions i hope somebody could help me with:
>
>1. Can a field in a table be a list of items (i.e., field EMAIL of
>table CUSTOMER contains a list of all email addresses the customer
>has)? Or, must you use a different table to encompas this info in the
>design?
>

In Oracle8.0 and up, yes -- you can use varray's or nested tables to do this. for example:

tkyte_at_8i> create type email_addresses as varray(25) of varchar2(30)   2 /

Type created.

tkyte_at_8i>
tkyte_at_8i> create table t

  2  (       cust_id         int primary key,
  3          emails          email_addresses
  4 )
  5 /

Table created.

tkyte_at_8i>
tkyte_at_8i> insert into t values ( 1, email_addresses( 'addr1', 'addr2', 'addr3' ) );

1 row created.

tkyte_at_8i>
tkyte_at_8i> select * from t;

   CUST_ID EMAILS

---------- --------------------------------------------------
         1 EMAIL_ADDRESSES('addr1', 'addr2', 'addr3')


>
>
>2. Is there a SQL command to simply view the current tables that exist
>in a tablespace - just thier names... or a tool that can do it
>(sqlplus, svrmgrl, ect)
>

select segment_name
  from dba_segments
 where segment_type = 'TABLE'
   and tablespace_name = 'YOUR_TABLESPACE' /

>
>
>3. What useful log files are there? I know about listener.log which
>logs connection attemts to the Oracle listener, but what about logs for
>interaction with the database itself (i.e., record failed SQL attempts,
>ect...)
>

there would be audit tables in the database (for failed sql attempts). you have to enable and configure these (see the admin guide).

there is the alert_$ORACLE_SID.log -- very important. lots of stuff in there.

there are trace files in the user_dump_destination (which defaults to $ORACLE_HOME/admin/$ORACLE_SID/udump typically but can be set in the init$ORACLE_SID.ora file)...

>
>
>Any help with these oddly dispersed questions would be greatly
>appreciated.
>
>thanks,
>steve

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Nov 10 1999 - 14:40:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US