want to run multiple SQL script file in one go with in SQLPLUS

后端 未结 8 671
陌清茗
陌清茗 2021-02-05 23:14

I have to run multiple SQL script file in one go.

Like every time i have to write command in SQLPLUS

SQL>@d:\\a.txt 
SQL>@d:\\a2.txt
SQL>@d:\\a3.txt
SQL>@d:\\         


        
8条回答
  •  庸人自扰
    2021-02-06 00:01

    Use *.PDC extension file like this

    install.pdc file content

    whenever sqlerror exit sql.sqlcode
    
    prompt started!
    
    prompt 1.executing script 1
    @@install/01.script_1.sql
    
    prompt 2.executing script 2
    @@install/02.script_2.sql
    
    prompt 3.executing script 3
    @@install/03.script_3.sql
    
    prompt finished!
    

    where @@install/ points in which directory is the SQL script located

提交回复
热议问题