dbTalk Databases Forums  

SqlPlus and sql script files

comp.databases.oracle.tools comp.databases.oracle.tools


Discuss SqlPlus and sql script files in the comp.databases.oracle.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
cavalcantipino@yahoo.it
 
Posts: n/a

Default SqlPlus and sql script files - 09-06-2007 , 04:30 AM






I know that I can execute a script file (ex. filename.sql) from a
batch or SqlPlus console with the command @filename.sql
There is a command to execute many .sql script files without launch
them one to the time?

Thank you for the help and sorry for my poor english...


Reply With Quote
  #2  
Old   
Brian Peasland
 
Posts: n/a

Default Re: SqlPlus and sql script files - 09-06-2007 , 08:07 AM






cavalcantipino (AT) yahoo (DOT) it wrote:
Quote:
I know that I can execute a script file (ex. filename.sql) from a
batch or SqlPlus console with the command @filename.sql
There is a command to execute many .sql script files without launch
them one to the time?

Thank you for the help and sorry for my poor english...

Wrap the script files in another script. So you might have a script
called "wrapper.sql" which contains the following lines:

@script1.sql
@script2.sql
@script3.sql
....
@scriptN.sql

Then just run "@wrapper" in SQL*Plus. It will execute the scripts in order.

HTH,
Brian


--
================================================== =================

Brian Peasland
dba (AT) nospam (DOT) peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown

--
Posted via a free Usenet account from http://www.teranews.com



Reply With Quote
  #3  
Old   
DA Morgan
 
Posts: n/a

Default Re: SqlPlus and sql script files - 09-06-2007 , 08:39 AM



Brian Peasland wrote:
Quote:
cavalcantipino (AT) yahoo (DOT) it wrote:
I know that I can execute a script file (ex. filename.sql) from a
batch or SqlPlus console with the command @filename.sql
There is a command to execute many .sql script files without launch
them one to the time?

Thank you for the help and sorry for my poor english...


Wrap the script files in another script. So you might have a script
called "wrapper.sql" which contains the following lines:

@script1.sql
@script2.sql
@script3.sql
...
@scriptN.sql

Then just run "@wrapper" in SQL*Plus. It will execute the scripts in order.

HTH,
Brian
In addition they can be run as external jobs using DBMS_SCHEDULER
if you have 10g or above.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
  #4  
Old   
cavalcantipino@yahoo.it
 
Posts: n/a

Default Re: SqlPlus and sql script files - 09-07-2007 , 10:23 AM



On 6 Set, 15:39, DA Morgan <damor... (AT) psoug (DOT) org> wrote:
Quote:
Brian Peasland wrote:
cavalcantip... (AT) yahoo (DOT) it wrote:
I know that I can execute a script file (ex. filename.sql) from a
batch or SqlPlus console with the command @filename.sql
There is a command to execute many .sql script files without launch
them one to the time?

Thank you for the help and sorry for my poor english...

Wrap the script files in another script. So you might have a script
called "wrapper.sql" which contains the following lines:

@script1.sql
@script2.sql
@script3.sql
...
@scriptN.sql

Then just run "@wrapper" in SQL*Plus. It will execute the scripts in order.

HTH,
Brian

In addition they can be run as external jobs using DBMS_SCHEDULER
if you have 10g or above.
--
Daniel A. Morgan
University of Washington
damor...@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Groupwww.psoug.org

Thank you Brian for wrapper solution.

Daniel, where can I find something about using DBMS_SCHEDULER? Thank
you again!



Reply With Quote
  #5  
Old   
DA Morgan
 
Posts: n/a

Default Re: SqlPlus and sql script files - 09-07-2007 , 11:34 AM



cavalcantipino (AT) yahoo (DOT) it wrote:
Quote:
On 6 Set, 15:39, DA Morgan <damor... (AT) psoug (DOT) org> wrote:
Brian Peasland wrote:
cavalcantip... (AT) yahoo (DOT) it wrote:
I know that I can execute a script file (ex. filename.sql) from a
batch or SqlPlus console with the command @filename.sql
There is a command to execute many .sql script files without launch
them one to the time?
Thank you for the help and sorry for my poor english...
Wrap the script files in another script. So you might have a script
called "wrapper.sql" which contains the following lines:
@script1.sql
@script2.sql
@script3.sql
...
@scriptN.sql
Then just run "@wrapper" in SQL*Plus. It will execute the scripts in order.
HTH,
Brian
In addition they can be run as external jobs using DBMS_SCHEDULER
if you have 10g or above.
--
Daniel A. Morgan
University of Washington
damor...@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Groupwww.psoug.org


Thank you Brian for wrapper solution.

Daniel, where can I find something about using DBMS_SCHEDULER? Thank
you again!
Oracle docs at http://tahiti.oracle.com.
My demos in Morgan's Library at www.psoug.org
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.