| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL*Plus: How can I write each record to a separate file
DA Morgan wrote:
> Sybrand Bakker wrote:
> > On 8 Sep 2006 12:24:16 -0700, zrwcvhsosoik001_at_sneakemail.com wrote:
> >
> >> Well, that was my point about being platform independent. The script
> >> needs to run on Linux, unix and windows. Database versions 9.2 and 10
> >
> > exp records=n
> >
> > --
> > Sybrand Bakker, Senior Oracle DBA
>
> Amazing how simple things get when people tell you what they are
> actually trying to do.
>
> Far too many times it seems we try to help someone only to find out that
> their requirement is nothing like their "simplified" example.
> --
> Puget Sound Oracle Users Group
Hmm, yes well the simplified solution doesn't however meet the
requirement:
I require one script per table, for purposes of version control. The
name of the file will
reflect the table name.
Just a bit more background: We want to store the data model in a source
control system. It needs to be human-readable/editable (it is source
code, after all). And having one file per object makes traceability of
changes much easier. The version control system (subversion in our
case) will tell you which file changed when.
Ok, now why generate the source from the database (which seems
backward). The reality is that our developers do make changes in their
development database. They then need to move these changes back into
the source files. I think that using DBMS_METADATA is an elegant way of
doing this.
A SQL*Plus script to do this shouldn't be too hard. The thread started
out with my problem: how can I write to multiple files in one script.
Thanks for everybodys input do far. Much appreciated. Received on Sat Sep 09 2006 - 01:40:20 CDT
![]() |
![]() |