Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Rollback segment and Tablespace questions
"David" <davidlee_at_diamond.com> wrote in message news:<ajqqrc$klq2_at_imsp212.netvigator.com>...
> hi all, I have two questions about Oracle (oracle8i 8.1.7)
>
> i) how can I find the rollback segment is public or private (from which data
> dictionary)?
> ii) I found (from Oracle Metalink, Note:1020180.6) that I can create "CREATE
> TABLESPACE" SQL statement by using cursors. Is it possible to generate the
> "CREATE TABLESPACE" SQL statement by using one SQL statement (without using
> cursors)? The difficult part is how to join dba_tablespaces and
> dba_data_files into one statement if the tablespace has more than 1 data
> file.
>
> David
2)
SET ECHO OFF
SET VERIFY OFF
SET FEEDBACK OFF
SET TERMOUT OFF
SET HEADING OFF
SPOOL CreateTablespace.sql
SELECT 'CREATE TABLESPACE ' || a.tablespace_name ||
' DATAFILE ' || CHR(39) || b.file_name || CHR(39) || ' SIZE ' || b.bytes || ' REUSE' ||
' DEFAULT STORAGE (INITIAL ' || a.initial_extent || ' NEXT ' || a.next_extent || ' MINEXTENTS ' || a.min_extents || ' MAXEXTENTS ' || a.max_extents || ' PCTINCREASE ' || a.pct_increase || ') ' || a.status || ';'FROM sys.dba_tablespaces a, sys.dba_data_files b WHERE a.tablespace_name != 'SYSTEM'
![]() |
![]() |