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: Windows: Create DB creation scripts from an running instance

Re: Windows: Create DB creation scripts from an running instance

From: Casi <casimir.schmid_at_swisscom.com>
Date: Tue, 1 Oct 2002 13:55:19 +0200
Message-ID: <1033473320.691196@exnews>


Dear Howard

Thanks for your answer.

I've tried your solution. After exporting and importing it with parameter indexfile (otherwise you cannot open the dumpfile in a text-editor), there were no create tablespace statements in it (only create table or index statements).

But I see the effort to create a script is too big (see the version history in the unix script: http://www.orafaq.com/scripts/unix/crdb.txt). It's not a one-off, I should do this on three DBs in the next four weeks and more DBs will come. And the way to edit some template creation scripts and update them with the information given from the running instance manually is more or less fast, but also very susceptibly for errors.

Anyway, thanks for your help

Casi

"Howard J. Rogers" <howardjr2000_at_yahoo.com.au> schrieb im Newsbeitrag news:yndm9.43804$g9.125689_at_newsfeeds.bigpond.com...
> Ok, taking it step by step:
>
> "Casi" <casimir.schmid_at_swisscom.com> wrote in message
> news:1033454893.939622_at_exnews...
> > Dear HJR
> >
> > With the database configuration assistant, you are only able to get
> creation
> > scripts for a new DB. But I'm looking for a script that receives all the
> > current settings from a running instance. My aim is to run an export of
a
> > DB, create a second db with these creation scripts (with all the changes
> > done since the DB has been started, e.g:
> > - increases of the memory usage like shared pool or java pool size or
>
> Surely just copying the existing init.ora would be good enough? It's got
all
> the current memory settings in it.
>
> > - adding datafiles (for example 4 times 500mb), but optimized to big
> > datafile (1 time 2gb)
>
> You can get the create tablespace statements out of a dummy export file. I
> mean, do a full=y export, rows=n. Then open up the dump file in the text
> editor of your choice and whip out the create tablespace lines. Hack them
> anyway you wish. Save as a '.sql' file.
>
> > and then to import all the data in the new db. I have to change this DB
> from
> > a slow machine to a faster one and I would like to use this situation to
> do
> > a reorganization at the same time.
> >
>
> I guess I've missed the point... is this a one-off, or a regular sort of
> thing? I don't quite understand why a script would be needed if it was a
> one-off.
>
> Regards
> HJR
>
>
>
> > cygwin is surely a beautiful tool, but our nt-administrators are afraid
of
> > installing any os-interpreters.
> >
> > best regards
> >
> > Casi Schmid
> >
> > "Howard J. Rogers" <howardjr2000_at_yahoo.com.au> schrieb im Newsbeitrag
> > news:ZD2m9.43496$g9.124570_at_newsfeeds.bigpond.com...
> > > I'm sure this isn't particularly helpful, but is there any reason why
> you
> > > don't use the database configuration assistant to create databases?
Or
> > are
> > > you just deeply in love with the command line? ;-)
> > >
> > > When madness struck once, I installed CYGWIN on a Windows box. It
gives
> > you
> > > a fully-functional unix shell, in which these sorts of scripts will
run
> > more
> > > or less without modification (I can never remember whether CYGWIN uses
> the
> > > korn or bourne shells... I think it's bourne, which means that unix
> > scripts
> > > written for that shell work fine). I believe that CYGWIN is a free
> > download,
> > > too.
> > >
> > > But trying to get that sort of functionality in a boring old batch
file
> is
> > a
> > > bit of a non-starter, I'm afraid.
> > >
> > > Regards
> > > HJR
> > >
> > > "Casi" <casimir.schmid_at_swisscom.com> wrote in message
> > > news:1033395117.347861_at_exnews...
> > > > Dear all
> > > >
> > > > I'm looking for a similar script to the one found here....
> > > >
> > > > http://www.orafaq.com/scripts/unix/crdb.txt
> > > >
> > > > ...for Windows NT 4.0 32-Bit.
> > > >
> > > > Thanks in advance!
> > > >
> > > > Casi Schmid
> > > >
> > > >
> > >
> > >
> >
> >
>
>
Received on Tue Oct 01 2002 - 06:55:19 CDT

Original text of this message

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