Solved how to call .sql files in .sh file similar to .bat

January 20, 2014 at 22:24:14
Specs: Unix
how to call .sql file from .sh file like .bat file, i have .bat file which contains list of .sql files with fully qualified path.
Below is the .BAT file
ET ECHO ON;

SET TIMING ON;

SET TIME ON;


@C:\UPGRADE\A.SQL
@C:\UPGRADE\B.sql
@C:\UPGRADE\C.SQL


COMMIT;

SET ECHO OFF;

Need corresponding .sh file to run it on unix or linux os.

message edited by gopal123


See More: how to call .sql files in .sh file similar to .bat

Report •


#1
January 21, 2014 at 00:50:49
What database server are you using? The command to use differs depending upon the software.

Report •

#2
January 21, 2014 at 07:51:25
This link points to example scripts accessing different databases:

http://www.computing.net/answers/db...


Report •

#3
January 21, 2014 at 07:51:52
✔ Best Answer
That's not a batch script. That's a PL/SQL script. The "@" symbol tells SQL*Plus to run an external file, and it also tells CMD to suppress echoing that line. Either would call the three referenced .SQL files, but only as a fluke.

How To Ask Questions The Smart Way


Report •

Related Solutions


Ask Question