Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

CHAPTER 9: Scripting RMAN > 9-3. Developing a Windows Batch File to Run RMAN

9-3. Developing a Windows Batch File to Run RMAN

Problem

You want to develop a Windows batch file to kick off RMAN to back up the database on a Windows server.

Solution

A batch file in Windows to script RMAN commands is similar in concept to a shell script in Unix, but you need to shift directions. In the Unix script, you used the RMAN commands inline in the script. In Windows, you will use a slightly different approach, as shown here:

  1. Create a RMAN command file with all the parameters you want.
  2. Call the command file from the RMAN command line.

The batch file needs some utilities outside what are available in Windows:

  • A utility to get the date and time in the format you want; here we have used a tool called realdate. We give a source for this utility in the "How It Works" section.

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint