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: Oracle Scripting Question

Re: Oracle Scripting Question

From: DTS <dave_at_simcik.com>
Date: 18 Nov 2003 08:49:49 -0800
Message-ID: <d78648f5.0311180849.2e62b693@posting.google.com>


Regarding...

> > -Can I embed SQL DML statements inside of PLSQL blocks?
>
> That is what they are there for.

I meant to say DDL statements, not DML statements. Perhaps the question is just as trivial though. Looking forward to your response! Thanks for all of the other great feedback!

Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1069090628.378674_at_yasure>...
> Comments in-line.
>
> DTS wrote:
>
> > I'm a bit of a newbie at writing scripts for Oracle. I'm having a hard
> > time wrapping my head around all of the different scripting,
> > reporting, and script storage abilities Oracle has to offer. Maybe I'm
> > making a mountain out of a molehill, but I could use some
> > clarification.
> >
> > -Can I embed SQL DML statements inside of PLSQL blocks?
>
> That is what they are there for.
>
> > -Can I combine a SQLPlus report with a PLSQL code block and print out
> > results?
>
> Using DBMS_OUTPUT.PUT_LINE but I'd be highly inclined to purchase a
> real reporting tool whether Oracle Reports, Discoverer, Crystal, Cognos,
> whatever.
>
> > -I'd like to be able to keep DML statements for all of the database
> > objects required by my applications near the application source code.
> > This would include packages, tables, subprograms, triggers, etc. --
> > anything and everything to help redeploy the database-side of the
> > application. What's the best means of accomplishing this and keeping
> > everything synchronized?
>
> Why scripts at all? Just put them into a package as separate procedures
> and functions?
>
> > -Is creating a subprogram in a package the same as creating a
> > standalone subprogram? In other words, will the subprograms I code in
> > the package show up as independent objects in the schema?
>
> No. They can be found in ALL_ARGUMENTS provided they are in the package
> header.
>
> > -Are there any special file extensions that I should be using (aside
> > from .sql)? Maybe .pkg for packages??? What's all of this "start file"
> > stuff anyways?
>
> Source code naming is irrelevant. Choose whatever you wish.
>
> > -Does it make sense to provide a seperate schema for most every
> > application that I build? I am gravitating towards this idea as it
> > provides a convenient delineation between applications and would allow
> > me to move the entire schema around via SQLLoader and conveniently
> > list schema contents from the data dictionary. I would probably need
> > to create a generic schema for global packages that I create. Does
> > that make sense or is there a better way?
>
> Yes. The value for maintenance and security is substantial. Also
> consider separate tablespaces for each application as an aide to
> maintenance.
Received on Tue Nov 18 2003 - 10:49:49 CST

Original text of this message

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