RE: Recreate database script

2002-09-09 Thread Rick_Cale


Now called AllFusion Erwin Data Modeler. It will create ER diagram from
existing database.

Rick


   
 
DENNIS WILLIAMS
 
   
touch.com>cc:  
 
Sent by:  Subject:     RE: Recreate database script
 
[EMAIL PROTECTED]
 
m  
 
   
 
   
 
09/09/2002 
 
12:58 PM   
 
Please respond 
 
to ORACLE-L
 
   
 
   
 




Itiu - ERWin Examiner (Computer Associates) is supposed to have that
capability. I have never used that capability.

Dennis Williams
DBA
Lifetouch, Inc.
[EMAIL PROTECTED]


-Original Message-
Sent: Monday, September 09, 2002 11:23 AM
To: Multiple recipients of list ORACLE-L


Hello,

Could anyone here suggest a software package that can create an ER
diagram by simply connecting to an Oracle database, reverse engineer it
to see the schema in an ER diagram - instead of in a file with ddl/dml
statements.

Thanks.

ltiu


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: ltiu
  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: 
  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: Recreate database script

2002-09-09 Thread Ji, Richard

Yeah, you can use Visio.  I used it when I need to quickly generate
an ER diagram from a schema.

-Original Message-
Sent: Monday, September 09, 2002 1:09 PM
To: Multiple recipients of list ORACLE-L


> Could anyone here suggest a software package that can create an ER
> diagram by simply connecting to an Oracle database, reverse engineer
> it to see the schema in an ER diagram - instead of in a file with
> ddl/dml statements.

I haven't tested it, but Microsoft Visio 2000 claims to be able to
reverse engineer a database.

Gary Chambers

//-
// Lucent Technologies GIO/Unix
// 4 Robbins Road, Westford, MA 01886
// 978-399-0481 / 888-480-6924 (Pager)
// Nothing fancy and nothing Microsoft
//-

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gary Chambers
  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: Ji, Richard
  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: Recreate database script

2002-09-09 Thread Mercadante, Thomas F

Oracle Designer
Viso2000


I use Oracle Designer.

-Original Message-
Sent: Monday, September 09, 2002 12:24 PM
To: Multiple recipients of list ORACLE-L


Hello,

Could anyone here suggest a software package that can create an ER 
diagram by simply connecting to an Oracle database, reverse engineer it 
to see the schema in an ER diagram - instead of in a file with ddl/dml 
statements.

Thanks.

ltiu


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: ltiu
  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: Mercadante, Thomas F
  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: Recreate database script

2002-09-09 Thread Kevin Lange

I have used Visio to do that .  

It links the tables together if they have foreign/primary keys.  If you have
no relations like that then it will at least list all the tables you pick.

-Original Message-
Sent: Monday, September 09, 2002 12:09 PM
To: Multiple recipients of list ORACLE-L


> Could anyone here suggest a software package that can create an ER
> diagram by simply connecting to an Oracle database, reverse engineer
> it to see the schema in an ER diagram - instead of in a file with
> ddl/dml statements.

I haven't tested it, but Microsoft Visio 2000 claims to be able to
reverse engineer a database.

Gary Chambers

//-
// Lucent Technologies GIO/Unix
// 4 Robbins Road, Westford, MA 01886
// 978-399-0481 / 888-480-6924 (Pager)
// Nothing fancy and nothing Microsoft
//-

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gary Chambers
  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: Kevin Lange
  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: Recreate database script

2002-09-09 Thread Mohammed Shakir

ERwin,  Visia Architect, Oracle Designer all can do it. There may be
other packages that I do not know about. I have all three of them and
they work.

Shakir

--- ltiu <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Could anyone here suggest a software package that can create an ER 
> diagram by simply connecting to an Oracle database, reverse engineer
> it 
> to see the schema in an ER diagram - instead of in a file with
> ddl/dml 
> statements.
> 
> Thanks.
> 
> ltiu
> 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: ltiu
>   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).


=
Mohammed Shakir
CompuSoft, Inc.
11 Heather Way
East Brunswick, NJ 08816-2825
(732) 672-0464 (Cell)
(732) 257-6001 (Home)

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mohammed Shakir
  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: Recreate database script

2002-09-09 Thread Igor Neyman

Most CASE tools have reverse engineering feature.
We are using PowerDesigner (from SYBASE).

Igor Neyman, OCP DBA
[EMAIL PROTECTED]
  


- Original Message - 
To: "Multiple recipients of list ORACLE-L" <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 12:23 PM


> Hello,
> 
> Could anyone here suggest a software package that can create an ER 
> diagram by simply connecting to an Oracle database, reverse engineer it 
> to see the schema in an ER diagram - instead of in a file with ddl/dml 
> statements.
> 
> Thanks.
> 
> ltiu
> 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: ltiu
>   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: Igor Neyman
  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: Recreate database script

2002-09-09 Thread Gabriel Aragon

ErWin is an excellent tool..

Gabriel

--- ltiu <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> Could anyone here suggest a software package that
> can create an ER 
> diagram by simply connecting to an Oracle database,
> reverse engineer it 
> to see the schema in an ER diagram - instead of in a
> file with ddl/dml 
> statements.
> 
> Thanks.
> 
> ltiu
> 
> 
> -- 
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> -- 
> Author: ltiu
>   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).


=
"Any dream worth having is a dream worth fighting for"(Cualquier sueño que valga la 
pena tener, es un sueño por el que vale la pena luchar)Charles Xavier

__
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gabriel Aragon
  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: Recreate database script

2002-09-09 Thread DENNIS WILLIAMS

Itiu - ERWin Examiner (Computer Associates) is supposed to have that
capability. I have never used that capability.

Dennis Williams
DBA
Lifetouch, Inc.
[EMAIL PROTECTED]


-Original Message-
Sent: Monday, September 09, 2002 11:23 AM
To: Multiple recipients of list ORACLE-L


Hello,

Could anyone here suggest a software package that can create an ER 
diagram by simply connecting to an Oracle database, reverse engineer it 
to see the schema in an ER diagram - instead of in a file with ddl/dml 
statements.

Thanks.

ltiu


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: ltiu
  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).



Re: Recreate database script

2002-09-09 Thread Gary Chambers

> Could anyone here suggest a software package that can create an ER
> diagram by simply connecting to an Oracle database, reverse engineer
> it to see the schema in an ER diagram - instead of in a file with
> ddl/dml statements.

I haven't tested it, but Microsoft Visio 2000 claims to be able to
reverse engineer a database.

Gary Chambers

//-
// Lucent Technologies GIO/Unix
// 4 Robbins Road, Westford, MA 01886
// 978-399-0481 / 888-480-6924 (Pager)
// Nothing fancy and nothing Microsoft
//-

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gary Chambers
  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: Recreate database script

2002-09-09 Thread ltiu

Hello,

Could anyone here suggest a software package that can create an ER 
diagram by simply connecting to an Oracle database, reverse engineer it 
to see the schema in an ER diagram - instead of in a file with ddl/dml 
statements.

Thanks.

ltiu


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: ltiu
  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: Recreate database script

2002-09-09 Thread Deshpande, Kirti

Here is one that I used to use some time ago (for Oracle 6 and 7).

This does not support all the *new* stuff available since Oracle8, but it
should not be difficult to change it.. if you do, I would appreciate a copy
:) 

- Kirti

#!/bin/ksh
#---

# crdb.ksh  - creates sql script that contains statements necessary
# to recreate a database with the current physical
# configuration. 
#
# parameters- SID (oracle database identifier)
#
# output- crdb_.sql in $ORACLE_HOME/admin/$ORACLE_SID/scripts
directory
#   
# Author- Quin Bligh
# Kirti Deshpande
#
#---

get_perm_db_params ()
{
echo "Getting permanent database parameters from controlfile trace..."
touch $TFILE
sleep 2
sqlplus -s < /dev/null
sys/$SYSPW
alter database backup controlfile to trace;
END1
(sqlplus -s > $SYSFILE
else
echo "\t$lines" >> $SYSFILE
fi
done
}

#---

get_log_files ()
{
echo "Getting log file definitions..."
>$LOGFILE
HOLDGROUP=""

(sqlplus -s <> $LOGFILE
echo "\tGROUP $GROUP (" >> $LOGFILE
HOLDGROUP=$GROUP
HOLDSIZE=$SIZE
  else
echo "," >> $LOGFILE
  fi
  
  echo "\t\t '$MEMBER'\c" >> $LOGFILE
done
echo "\n\t\t ) size ${HOLDSIZE}k" >> $LOGFILE

}

#---

get_dbf_files ()
{
concat_file ()
{
i=0
num=`wc -l /tmp/$TSNAME.$$`
cat /tmp/$TSNAME.$$ | while read lines
do
i=$(($i + 1))
echo $lines | grep "^create" >/dev/null
if [ $? -eq 0 ] ; then
echo "\n$lines" >> $DBFILES
else
   echo $lines | grep -v "size" >/dev/null
   if [ $? -eq 0 ] ; then
echo "\t$lines" >> $DBFILES
   elif [ $i -lt $num ] ; then
echo "\t$lines," >> $DBFILES
   else
echo "\t$lines;" >> $DBFILES
   fi
fi
done
}

echo "Getting all other tablespace definitions..."
>$TFILE
>$DBFILES
(sqlplus -s < /tmp/$TSNAME.$$
echo "\t default storage (" >> /tmp/$TSNAME.$$
echo "\t\t initial   $INITEXT" >> /tmp/$TSNAME.$$
echo "\t\t next  $NEXTEXT" >> /tmp/$TSNAME.$$
echo "\t\t minextents$MINEXT" >> /tmp/$TSNAME.$$
echo "\t\t maxextents$MAXEXT" >> /tmp/$TSNAME.$$
echo "\t\t pctincrease   $PCTINC" >> /tmp/$TSNAME.$$
echo "\t )" >> /tmp/$TSNAME.$$
echo "\t datafile" >> /tmp/$TSNAME.$$
sqlplus -s <> /tmp/$TSNAME.$$
sys/$SYSPW
set heading off
set feedback off
set pages 0
select  || file_name ||  || ' size ' || bytes/1024 || 'k'
from dba_data_files
where tablespace_name = '$TSNAME'
order by file_name;
END5
concat_file
rm -f /tmp/$TSNAME.$$
done
}

#---

get_rbs ()
{
echo "Getting rollback segment definitions..."
>$RBS
(sqlplus -s <>$RBS
done
}

#---

cat_sql ()
{
echo "Building sql script..."
cat -s < $SQL
REM *
connect internal
!cat ${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora | grep -vi "rollback_segments"
>  ${ORACLE_HOME}/dbs/init${ORACLE_SID}_0.ora

startup nomount pfile=$ORACLE_HOME/dbs/init${ORACLE_SID}_0.ora
set echo on
spool crdb${ORACLE_SID}

REM * Create the  database.  
REM * SYSTEM tablespace configuration guidelines:
REM *   General-Purpose ORACLE RDBMS   50Mb
REM *   Additional dictionary for applications  10-50Mb 
REM * Redo Log File configuration guidelines:
REM *   Use 3+ redo log files to relieve ``cannot allocate new log...''
waits.
REM *   Use ~100Kb per redo log file per connection to reduce checkpoints.
REM *
create database "$ORACLE_SID"
$MAXLOGFILES
$MAXDATAFILES
$MAXINSTANCES
$MAXLOGMEMBERS
$MAXLOGHISTORY
character set "$NLS_CHARSET"
datafile
`cat $SYSFILE`
logfile
`cat $LOGFILE`
;

shutdown;
startup open pfile=${ORACLE_HOME}/dbs/init${ORACLE_SID}_0.ora

REM * install data dictionary views:
@${ORACLE_HOME}/rdbms/admin/catalog.sql
@${ORACLE_HOME}/rdbms/admin/catproc.sql
@${ORACLE_HOME}/rdbms/admin/catblock.sql

REM * Install dbms utilities
@${ORACLE_HOME

RE: Recreate database script

2002-09-09 Thread Deshpande, Kirti

Forgot to mention that this will only build the db create script. 
Nothing more than that. 

- Kirti 

-Original Message-
Sent: Monday, September 09, 2002 10:07 AM
To: '[EMAIL PROTECTED]'


Here is one that I used to use some time ago (for Oracle 6 and 7).

This does not support all the *new* stuff available since Oracle8, but it
should not be difficult to change it.. if you do, I would appreciate a copy
:) 

- Kirti

#!/bin/ksh
#---

# crdb.ksh  - creates sql script that contains statements necessary
# to recreate a database with the current physical
# configuration. 
#
# parameters- SID (oracle database identifier)
#
# output- crdb_.sql in $ORACLE_HOME/admin/$ORACLE_SID/scripts
directory
#   
# Author- Quin Bligh
# Kirti Deshpande
#
#---

get_perm_db_params ()
{
echo "Getting permanent database parameters from controlfile trace..."
touch $TFILE
sleep 2
sqlplus -s < /dev/null
sys/$SYSPW
alter database backup controlfile to trace;
END1
(sqlplus -s > $SYSFILE
else
echo "\t$lines" >> $SYSFILE
fi
done
}

#---

get_log_files ()
{
echo "Getting log file definitions..."
>$LOGFILE
HOLDGROUP=""

(sqlplus -s <> $LOGFILE
echo "\tGROUP $GROUP (" >> $LOGFILE
HOLDGROUP=$GROUP
HOLDSIZE=$SIZE
  else
echo "," >> $LOGFILE
  fi
  
  echo "\t\t '$MEMBER'\c" >> $LOGFILE
done
echo "\n\t\t ) size ${HOLDSIZE}k" >> $LOGFILE

}

#---

get_dbf_files ()
{
concat_file ()
{
i=0
num=`wc -l /tmp/$TSNAME.$$`
cat /tmp/$TSNAME.$$ | while read lines
do
i=$(($i + 1))
echo $lines | grep "^create" >/dev/null
if [ $? -eq 0 ] ; then
echo "\n$lines" >> $DBFILES
else
   echo $lines | grep -v "size" >/dev/null
   if [ $? -eq 0 ] ; then
echo "\t$lines" >> $DBFILES
   elif [ $i -lt $num ] ; then
echo "\t$lines," >> $DBFILES
   else
echo "\t$lines;" >> $DBFILES
   fi
fi
done
}

echo "Getting all other tablespace definitions..."
>$TFILE
>$DBFILES
(sqlplus -s < /tmp/$TSNAME.$$
echo "\t default storage (" >> /tmp/$TSNAME.$$
echo "\t\t initial   $INITEXT" >> /tmp/$TSNAME.$$
echo "\t\t next  $NEXTEXT" >> /tmp/$TSNAME.$$
echo "\t\t minextents$MINEXT" >> /tmp/$TSNAME.$$
echo "\t\t maxextents$MAXEXT" >> /tmp/$TSNAME.$$
echo "\t\t pctincrease   $PCTINC" >> /tmp/$TSNAME.$$
echo "\t )" >> /tmp/$TSNAME.$$
echo "\t datafile" >> /tmp/$TSNAME.$$
sqlplus -s <> /tmp/$TSNAME.$$
sys/$SYSPW
set heading off
set feedback off
set pages 0
select  || file_name ||  || ' size ' || bytes/1024 || 'k'
from dba_data_files
where tablespace_name = '$TSNAME'
order by file_name;
END5
concat_file
rm -f /tmp/$TSNAME.$$
done
}

#---

get_rbs ()
{
echo "Getting rollback segment definitions..."
>$RBS
(sqlplus -s <>$RBS
done
}

#---

cat_sql ()
{
echo "Building sql script..."
cat -s < $SQL
REM *
connect internal
!cat ${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora | grep -vi "rollback_segments"
>  ${ORACLE_HOME}/dbs/init${ORACLE_SID}_0.ora

startup nomount pfile=$ORACLE_HOME/dbs/init${ORACLE_SID}_0.ora
set echo on
spool crdb${ORACLE_SID}

REM * Create the  database.  
REM * SYSTEM tablespace configuration guidelines:
REM *   General-Purpose ORACLE RDBMS   50Mb
REM *   Additional dictionary for applications  10-50Mb 
REM * Redo Log File configuration guidelines:
REM *   Use 3+ redo log files to relieve ``cannot allocate new log...''
waits.
REM *   Use ~100Kb per redo log file per connection to reduce checkpoints.
REM *
create database "$ORACLE_SID"
$MAXLOGFILES
$MAXDATAFILES
$MAXINSTANCES
$MAXLOGMEMBERS
$MAXLOGHISTORY
character set "$NLS_CHARSET"
datafile
`cat $SYSFILE`
logfile
`cat $LOGFILE`
;

shutdown;
startup open pfile=${ORACLE_HOME}/dbs/init${ORACLE_SID}_0.ora

REM 

Re: Recreate database script

2002-09-09 Thread ltiu

Thanks.

I wonder if you can treat an export file as a *.sql script and run it 
off sqlplus with the @@script.sql command?

I shall give this a try.

ltiu

Fink, Dan wrote:

>If you export with rows=n, you get a text file with all the ddl to recreate
>the exportable objects. However, packages/procedures are formatted and not
>at all easy to use to recreate and the storage clauses are all in bytes. Not
>a pretty method, but certainly one that can be used.
>
>-Original Message-
>Sent: Friday, September 06, 2002 3:59 PM
>To: Multiple recipients of list ORACLE-L
>
>
>Export can do this. Right?
>
>But the output is not a script but a binary file only Import can understand.
>
>ltiu
>
>Connie Milliken wrote:
>
>  
>
>>Does anyone have a script that will write another script to recreate a
>>particular database quickly with all the info specific to that particular
>>database?
>>
>>Seems to me that I have seen this somewhere before, but I am not sure
>>
>>
>where.
>  
>
>> 
>>
>>
>>
>
>
>
>  
>



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: ltiu
  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: Recreate database script

2002-09-09 Thread Mark Leith

DBATool will fix this problem for you, as well as a whole host of added
features for database creation scripts, such as "rule" based storage
attribute changes for example - e.g. change ALL indexes in a schema to be
stored in an INDEXES tablespace. You can also use it to create HTML based
DDL documentation for your schemas instead of spooling creation scripts..

You can find out more, or download a copy from:

http://www.cool-tools.co.uk/products/dbatool.html

It's free as well.. ;)

HTH

Mark

===
 Mark Leith | T: +44 (0)1905 330 281
 Sales & Marketing  | F: +44 (0)870 127 5283
 Cool Tools UK Ltd  | E: [EMAIL PROTECTED]
===
   http://www.cool-tools.co.uk
   Maximising throughput & performance

-Original Message-
Sent: 09 September 2002 16:33
To: Multiple recipients of list ORACLE-L


If you export with rows=n, you get a text file with all the ddl to recreate
the exportable objects. However, packages/procedures are formatted and not
at all easy to use to recreate and the storage clauses are all in bytes. Not
a pretty method, but certainly one that can be used.

-Original Message-
Sent: Friday, September 06, 2002 3:59 PM
To: Multiple recipients of list ORACLE-L


Export can do this. Right?

But the output is not a script but a binary file only Import can understand.

ltiu

Connie Milliken wrote:

>Does anyone have a script that will write another script to recreate a
>particular database quickly with all the info specific to that particular
>database?
>
>Seems to me that I have seen this somewhere before, but I am not sure
where.
>
>



--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: ltiu
  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: Fink, Dan
  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: Mark Leith
  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: Recreate database script

2002-09-09 Thread Rachel Carmichael



if you are not using locally managed tablespaces, you can find scripts
to do this in the SQL and PL/SQL Annotated Archives





--- "Fink, Dan" <[EMAIL PROTECTED]> wrote:
> If you export with rows=n, you get a text file with all the ddl to
> recreate
> the exportable objects. However, packages/procedures are formatted
> and not
> at all easy to use to recreate and the storage clauses are all in
> bytes. Not
> a pretty method, but certainly one that can be used.
> 
> -Original Message-
> Sent: Friday, September 06, 2002 3:59 PM
> To: Multiple recipients of list ORACLE-L
> 
> 
> Export can do this. Right?
> 
> But the output is not a script but a binary file only Import can
> understand.
> 
> ltiu
> 
> Connie Milliken wrote:
> 
> >Does anyone have a script that will write another script to recreate
> a
> >particular database quickly with all the info specific to that
> particular
> >database?
> >
> >Seems to me that I have seen this somewhere before, but I am not
> sure
> where.
> >  
> >
> 
> 
> 
> -- 
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> -- 
> Author: ltiu
>   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: Fink, Dan
>   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!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rachel Carmichael
  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: Recreate database script

2002-09-09 Thread Fink, Dan

If you export with rows=n, you get a text file with all the ddl to recreate
the exportable objects. However, packages/procedures are formatted and not
at all easy to use to recreate and the storage clauses are all in bytes. Not
a pretty method, but certainly one that can be used.

-Original Message-
Sent: Friday, September 06, 2002 3:59 PM
To: Multiple recipients of list ORACLE-L


Export can do this. Right?

But the output is not a script but a binary file only Import can understand.

ltiu

Connie Milliken wrote:

>Does anyone have a script that will write another script to recreate a
>particular database quickly with all the info specific to that particular
>database?
>
>Seems to me that I have seen this somewhere before, but I am not sure
where.
>  
>



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: ltiu
  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: Fink, Dan
  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: Recreate database script

2002-09-06 Thread Dennis M. Heisler

Connie,

There are some scripts in Oracle Annotated Archives (by Kevin Loney and
Rachel Carmichael, Oracle Press) that will do what you want.

Dennis


Connie Milliken wrote:
> 
> Does anyone have a script that will write another script to recreate a
> particular database quickly with all the info specific to that particular
> database?
> 
> Seems to me that I have seen this somewhere before, but I am not sure where.
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Connie Millike
>   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 M. Heisler
  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: Recreate database script

2002-09-06 Thread ltiu

Export can do this. Right?

But the output is not a script but a binary file only Import can understand.

ltiu

Connie Milliken wrote:

>Does anyone have a script that will write another script to recreate a
>particular database quickly with all the info specific to that particular
>database?
>
>Seems to me that I have seen this somewhere before, but I am not sure where.
>  
>



-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: ltiu
  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).