


Sqlplus /nolog following command makes the file executable for the file owner. Next, create a shell script called "/u01/get_emp.ksh" containing the following lines. The previous methods works equally well in UNIX and Linux environments. Powershell allows file redirection similar to UNIX/Linux shell scripting, so we can do something like the following for scott/tigerīACKUP DATABASE PLUS | rman target=/ UNIX and Linux (Method 1) Once again, resulting batch file can be run manually or scheduled. Rman target=/ command can include a catalog= entry if a recovery catalog is used. Next create a batch file called "C:\backup.bat" containing the following command. As an example, place the following RMAN commands in a file called "C:\cmdfile.txt". The method is very similar when using Recovery Manager (RMAN). (Start > Programs > Accessories > System Tools > Scheduled Tasks) or the AT scheduler. Sqlplus /nolog resulting batch file can be run manually, by double-clicking on it, or scheduled using the Scheduled Tasks Wizard Next, create a batch file called "C:\get_emp.bat" containing the following command. For example, save the following script in a file called "C:\emp.sql". To run a SQL script using SQL*Plus, place the SQL along with any SQL*Plus commands in a file and save it on your operating system. UNIX and Linux (Returning values from SQL).

This article presents some basic techniques for creating Windows batch files and UNIX/Linux shell scripts that connect to SQL*Plus and RMAN. Home » Articles » Misc » Here Oracle Shell Scripting
