Re: Question regarding batch, sqlplus and pl/sql

From: xylem <me_at_icq_at_yahoo.co.uk>
Date: Fri, 8 Feb 2008 01:20:40 -0800 (PST)
Message-ID: <d1ec9cc5-5b53-41fa-8bf4-414c70aca9c6@e25g2000prg.googlegroups.com>


On Feb 8, 12:13 am, DA Morgan <damorgan_at_psoug.org> wrote:
> xylem wrote:
> >> You don't need SQL*Plus commands you need to solve a business problem.
>
> > I specified this in my request about and was therefore asking for
> > help. The batch jobs and sqlplus commands in sql scripts were writen
> > by another developer.
>
> > Mark
>
> >> Daniel A. Morgan
> >> Oracle Ace Director & Instructor
> >> University of Washington
> >> damor..._at_x.washington.edu (replace x with u to respond)
> >> Puget Sound Oracle Users Groupwww.psoug.org-Hide quoted text -
>
> >> - Show quoted text -
>
> If you need to supply input you have three choices:
>
> 1. Hard code in the values
> 2. Run using a stored procedure and supply input parameters
> 3. Build a front-end
> --
> Daniel A. Morgan
> Oracle Ace Director & Instructor
> University of Washington
> damorgan_at_x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text -
>
> - Show quoted text -

Thanks Daniel.

Input values will be supplied and are already hard coded. See, for example, the content of the DM_Up.bat file below. My problem is how to pack this into a pl/sql block (I'm still learning pl/sql). Otherwise the batch file is working fine.



DM_Up.bat (DM=Datamart)

SET instance=%1
SET mart=%2

SET password=mart

REM Start VPD
sqlplus DDD/%password%@%instance% @VPD_add_policies_x %mart%

REM Re-generete Indexes if the loading actual indexes failed. sqlplus DDD/%password%@%instance% @create_IX_DM_x %mart%

REM Gives privilages to access users
sqlplus DDD/%password%@%instance% @Grant_Revoke_DM_p_x G T * %mart%

Thanks

--
Mark
Received on Fri Feb 08 2008 - 03:20:40 CST

Original text of this message