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

Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP: Newbie SQL*Plus question

Re: HELP: Newbie SQL*Plus question

From: Graham Miller <lgmiller_at_elmrd.u-net.com>
Date: 1997/04/30
Message-ID: <336b877c.4008151@news.u-net.com>#1/1

hello,
  you can find out which tablespaces you have access to by running the query:

select * from user_tablespaces;

you will find a list of all the useful dictionary tables by running the following query:

select * from dictionary
order by table_name;

to make it formatted slightly better do:

set linesize 130;
set pagesize 40;
set newpage 0;
column comments format a75 trunc;
spool dict.lis

select
  table_name,
  comments
from
 dictionary
order by table_name;
spool off

This will create a list file called dict.lis in the current directory which you can print in landscape mode.

graham (aka grumpy)  

Chris Thornton <l621309_at_volta.kodak.com> wrote...

| Don Chambers wrote:
| (snip)
| > ORA-00959: tablespace 'CUSTSPACE1' does not exist
| > Should I have created a tablespace first? If, so how - the book said
|
| Yes, you need to create a tablespace. Otherwise, it will go into some
| sort of default tablespace - which if you're just playing around, may be
| ok.
|
| SQL> help create tablespace
| CREATE TABLESPACE command
|
| PURPOSE:
| To create a tablespace. A tablespace is an allocation of space in
| the database that can contain objects.
|
| SYNTAX:
|
| CREATE TABLESPACE tablespace
| DATAFILE filespec
| [ AUTOEXTEND { OFF
| | ON [NEXT integer [K|M]]
| [MAXSIZE [UNLIMITED | integer [K|M]] } ]
| [, filespec ...]
| [DEFAULT STORAGE storage_clause]
| [ONLINE | OFFLINE]
|
| where:
|
| tablespace
| is the name of the tablespace to be created.
|
| DATAFILE
| specifies the data file or files to comprise the tablespace.
|
| AUTOEXTEND
| enables or disables the autoextending of the size of the datafile
| in
| the tablespace.
|
| OFF disable autoextend if it is turned on. NEXT and MAXSIZE are
| set
| to zero. Values for NEXT and MAXSIZE must be respecified in
| further ALTER TABLESPACE AUTOEXTEND commands.
|
| ON enable autoextend.
|
| NEXT the size in bytes of the next increment of disk space to be
| automatically allocated to the datafile when more extents are
| required. You can also use K or M to specify this size in
| in kilobytes or megabytes. The default is one data block.
|
| MAXSIZE maximum disk space allowed for automatic extension of the
| datafile.
|
| UNLIMITED set no limit on allocating disk space to the datafile.
|
| DEFAULT STORAGE
| specifies the default storage parameters for all objects created in
| the tablespace.
|
| ONLINE
| makes the tablespace available immediately after creation to users
| who have been granted access to the tablespace.
|
| OFFLINE
| makes the tablespace unavailable after immediately after creation.
|
| If you omit both the ONLINE and OFFLINE options, Oracle creates the
| tablespace online by default. The data dictionary view
| DBA_TABLESPACES indicates whether each tablespace is online or
| offline.
|
| PREREQUISITES:
| You must have CREATE TABLESPACE system privilege. Also, the SYSTEM
| tablespace must contain at least two rollback segments including the
| SYSTEM rollback segment.
|
| SEE:
| ALTER TABLESPACE, DROP TABLESPACE
Graham Miller ...
Opinions expressed are mine, they are free, and worth exactly what they cost. Received on Wed Apr 30 1997 - 00:00:00 CDT

Original text of this message

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