Re: Why use Pro*C for spooling result sets to flat files when you can do the same thing in SQL*Plus?

  • From: Jeremy Schneider <jeremy.schneider@xxxxxxxxxxxxxx>
  • To: Richard.Goulet@xxxxxxxxxxx
  • Date: Thu, 02 Sep 2010 11:24:00 -0500

Here's another thought...  if your Pro*C script isn't broken, and if it
isn't really that hard to make minor tweaks to the existing code, then
why spent a lot of time rewriting it for SQLPlus?

If you're doing something from scratch anyway, that's the time to
consider platforms.  But too often people make a big project to "rewrite
the code on the newest and best technology" with thinking through
whether the benefits will really justify all the time spent migrating.

When an old technology becomes obsolete, you eventually need to move
forward... but don't rush it just for the sake of the ideological "this
is a better way to do it"... consider what other projects you could
complete during that time, while your code continues to reliably chug
along on the old platform.  And I'd suggest planning the right time to
move it forward from more of a "business" perspective.

-Jeremy


Goulet, Richard wrote:
> Bill,
>  
>     Being that I've written more Pro*C than I care to remember and
> still do use the language from time to time.  There are a number of
> reasons for why you would want to do this, though a good number may be
> OBE at this juncture.  The biggest that I ran into were the line size
> limit, right padding of the result set(set linesize 1000 and each line
> is 100 characters long even if the data is only 2 characters long),
> line terminator issues (we normally always look for the "normal" line
> terminator, but their different on Windows (DOS), Unix, AIX, etc... 
> Pretty hard to do in SQL*Plus, easy in C), breaking up a query into
> parts that make it run faster (pre current versions (11g) if you
> needed to join tables together is was sometimes easier to do it
> outside of a single SQL statement).
>  
> I'm sure I could find additional ones if I had the think time.
>  
>
> Dick Goulet
> Senior Oracle DBA/NA Team Lead
> PAREXEL International
>
>  
>
> ------------------------------------------------------------------------
> *From:* oracle-l-bounce@xxxxxxxxxxxxx
> [mailto:oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Bill Myers
> *Sent:* Wednesday, September 01, 2010 6:24 PM
> *To:* oracle-l@xxxxxxxxxxxxx
> *Subject:* Why use Pro*C for spooling result sets to flat files when
> you can do the same thing in SQL*Plus?
>
> In my previous post,
> //www.freelists.org/post/oracle-l/Any-valid-security-concerns-using-Data-Pump-over-conventional-expimp,
> I mentioned that the DBAs at my new job use Pro*C to export data to
> flat files. So I asked one of them in a meeting: "why not use SQL*Plus
> instead?" Response after a long awkward stare: "you tell me". I have
> searched the forums and docs to no avail (besides maybe some speed
> advantage).
>
> So, is there any real advantage to using Pro*C over SQL*Plus to spool
> result sets to flat files? I certainly don't want to become a Pro*C
> expert, so any ideas would be greatly appreciated.
>
> Thanks in advance.
> Bill
> 9i OCA/10g OCP DBA


-- 
http://www.ardentperf.com
+1 312-725-9249

Jeremy Schneider
Chicago

Other related posts: