This script uses the database control file as |, REM | the RMAN repository. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange. All rights reserved. Unfortunately I don't have a Windows system to test, but you can try the following: Thanks Frank..unfortunately that doesn't seem to work and I'm back to no longer getting any output file. We can't guarantee quick solutions - Experts Exchange isn't a help desk. Multiple MVEs may be awarded each year. |, REM | DBA_PASSWORD Database password RMAN will use to login |, REM | to the database. We're a community of IT professionals committed to sharing knowledge. The command that I used for testing is: See if this solution works for you by signing up for a 7 day free trial. The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics. |, set CMDFILE=%ORATMP%\%FILENAME%_%TNS_ALIAS%.rcv, set LOGFILE=%ORALOG%\%FILENAME%_%TNS_ALIAS%.log, REM | REMOVE OLD LOG AND RMAN COMMAND FILES. I guess this is part of the frustrating side of working with Oracle. |, REM | USAGE : |, REM | rman_backup_hot_full_10g.bat "DBA_USERNAME" "DBA_PASSWORD" "TNS_ALIAS" |, REM | NOTE : As with any code, ensure to test this script in a |, REM | development environment. This award is based off of nominations by EE users and experts. Welcome to our community! Thanks again for your help could u please send me some example about how can i do the scripts for windows(rman), error in cloning using RMAN error while looking up datafile: 82, recovery in archive mode; no archived logs. Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success. |, "C:\WINDOWS\sendmail\sendmail.exe" -messagefile=X:\somedirectorypath\logs\rman_backup_hot_full_10g.log -subject="RMAN Online Backup was Successful" email1@domain, "C:\WINDOWS\sendmail\sendmail.exe" -messagefile=X:\somedirectorypath\logs\rman_backup_hot_full_10g.log -subject="RMAN Online Backup Failed" email1@domain, REM | END THIS SCRIPT. |, rman target %DB_USERNAME%/%DB_PASSWORD%@%TNS_ALIAS% nocatalog cmdfile=%CMDFILE% msglog %LOGFILE%, REM | SCAN THE RMAN LOGFILE FOR ERRORS. |. The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. I would think that the syntax should be pretty well set, standard and well documented. Come for the solution, stay for everything else. 99% of them have full time tech jobs - they volunteer their time to help other people in the technology industry learn and succeed. HiI'm running RMAN on AIX using a script that is executed through CRON. I want to set up a similar process on Windows using a .bat file and scheduling through Windows AT. This is on Oracle 9i and I would like to avoid using a recovery catalog which I assume prevents me from using the cmdfile as a solution. Can this be done?? You'll also be able to connect with highly specified Experts to get personalized solutions to your troubleshooting & research questions. With your subscription - you'll gain access to our exclusive IT community of thousands of IT pros. REM | FILE : rman_backup_hot_full_10g.bat modified 07/14/2011 |, REM | CLASS : WINDOWS Shell Scripts |, REM | PURPOSE : Used to perform a physical backup of an Oracle database |, REM | using RMAN. Covered by US Patent. |, REM | TNS_ALIAS TNS connect string to the target |, REM | database. Were working tech professionals who love collaborating. Its like crowd-sourced consulting. Hi, I have a windows .bat file that I would like to schedule in a .cmd file where I can execute the .bat file and not have to show the variables for the user and password. Our certified Experts are CTOs, CISOs, and Technical Architects who answer questions, write articles, and produce videos on Experts Exchange. This user must have |, REM | the SYSDBA role. |, REM +--------------------------------------------------------------------------+, REM | VALIDATE COMMAND-LINE PARAMETERS |, REM | VALIDATE ENVIRONMENT VARIABLES |, REM | DECLARE ALL GLOBAL VARIABLES. If you ask your own question - our Certified Experts will team up with you to help you get the answers you need. Our experts volunteer their time to help other people in the technology industry learn and succeed. |, echo sql "alter system archive log current"; >> %CMDFILE%, echo CONFIGURE CONTROLFILE AUTOBACKUP ON; >> %CMDFILE%, REM echo format 'X:\rman\BACKUPSET\ora_df%%t_s%%s_s%%p' >> %CMDFILE%, echo (database include current controlfile); >> %CMDFILE%, echo format 'X:\rman\\ARCHIVE\log_%%t_%%s_%%r.arc'; >> %CMDFILE%, REM echo backup database plus archivelog delete input; >> %CMDFILE%, REM echo crosscheck backup of database; >> %CMDFILE%, REM echo crosscheck backup of controlfile; >> %CMDFILE%, REM echo crosscheck archivelog all; >> %CMDFILE%, REM echo delete noprompt force obsolete;>> %CMDFILE%, REM echo delete force noprompt expired backup of database; >> %CMDFILE%, REM echo delete force noprompt expired backup of controlfile; >> %CMDFILE%, REM echo delete force noprompt expired archivelog all; >> %CMDFILE%, REM | PERFORM RMAN BACKUP. A command script will be dynamically |, REM | written to a temporary directory and run through RMAN. |, REM | WRITE RMAN COMMAND SCRIPT. Our community of experts have been thoroughly vetted for their expertise and industry experience. When I access RMAN. We can't always guarantee that the perfect solution to your specific problem will be waiting for you. ? I did a simple .bat file and can make the RMAN connection but it stops there and doesn't execute the rest of the commands within the .bat file. An example would be very helpful. Thanks so much for any advice/suggestions. |, REM | |, REM | PARAMETERS : DBA_USERNAME Database username RMAN will use to login |, REM | to the database. The time we save is the biggest benefit of E-E to our team. A good example is the "target=" The Oracle Press Rman and Recovery has it with the "=" and I've been using it this way on Unix where I am running it from Cron. 1996-2022 Experts Exchange, LLC.