Create the batch file to remove log files in Windows

We are running Oracle 11 G under Windows 2008 R2. For free tickets, we run daily from rman commands manually. I would like to create a batch to do it automatically. This is the batch file that I created.

The echo Yes | Del Y:\Orace11g\temp\*.*

Robocopy D:\Relius\Admin\RADB\ArchiveLogFiles\ Y:\Orace11G\temp\ b / mining: 3

RMAN

connect sys@radb target;

password

overlap archivelog all;

remove expired archivelog all;

Yes

but it stops at rman

C:\ > rman

Recovery Manager: release 11.2.0.1.0 - Production on Mar 21 10:49:27 Oct 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

RMAN >

What is the correct way to cerate the batch file to delete the expired archivelogs?

Hello

It is not a problem of RMAN, but is that a batch under windows creation/configuration is the problem.

See this URL, how do I Configure a tasks scheduled under Windows 2008 R2.

-Next, create a file .bat with your instructions:

Set ORACLE_SID = radb

set ORACLE_HOME = c:\dbhome

RMAN cmdfilemyrmancommands.csv msglog = sys/PASSWD@radb target = c:\log.log

- Then put your RMAN commands in the file myrmancommands.csv

Run {}

devote to the disc channel type c1:

overlap archivelog all;

remove expired archivelog all;

output channel c1;

}

Best regards

Tags: Database

Similar Questions

  • How to create the batch file for configuring windowos?

    Like how to add running exe/service turn on DEP Windows batch file (.bat).
    My computer > etiquette > advance setting > setting > prevention of execution of data (DEP) > add > ok.

    Hello

    The question you posted would be better suited to the MSDN Community. Please visit the link below to find a community that will support what ask you

    http://social.msdn.Microsoft.com/forums/en-us/categories

  • Unable to create the password file in windows 7

    Creating file password using orapwd utility exit is yet to come as usage (PFA attached the screenshot)

    Error_Screenshot.PNG

    Please help me with the question.

    entries = 20 digital no character you gave is as max_users... reason it

  • I want my procedure to return the error message in the batch file

    Hi team,

    I have a requirement from users of the company. Could you please provide your suggetsion to achieve this.

    We have a batch file that is short on time, in this batch file, I'll call you a SQL script.

    In the SQL script, I called you a procedure to run.

    Inside the procedure, I have the following statement,

    Select, insert and update commands.

    and I use ANOTHER exception to handle errors.

    My requirement is to pass the error messages for the batch file when one of the orders was not not run and send a notification e-mail to the group with the error text.

    Please provide your suggestion.

    Thank you and best regards,

    Robette.

    Could you please tell me, inside the procedure I have to remove the OTHER exception and how I can pass the value to the command file and where I add the content of the e-mail notification.

    I suggest that you write modular code instead.

    1. create a log table

    2 modify the procedure to log on to the error log table or exceptions

    3. that others suggest have the recovery/return procedure an exception in the client/batch file

    4. for an exception have the batch file to call a procedure to do the emailing if there were exceptions

    IMHO, it's a MISTAKE to try to put all these features in a single file. It is NOT scalable and makes it almost impossible to update the batch file if the requirements change in the future.

    Logging should be a separate process with a separate log table so that you can capture ALL of the information that may be necessary, now or in the future. Enter information in a table of newspaper, it is EASY for ANYONE to query to see what problems are occurring in the process.

    Emailing should be a separate process so that it can be used for your batch file current, files of future orders or even by procedures or functions in the database.

    Do not try to create a solution "a script does everything."

  • Should I have the administrator account to run the batch file?

    When I log in as administrator, I run after the file of commands without any problem, but

    When I login as a user, I can't run after the batch file, the changeover of the authority.

    I would like to know if I need to log in as an administrator to run this batch file or not,

    Can I use different accounts group? and always perform this task.

    Does anyone have any suggestions?
    Thanks in advance for your suggestions :>

    off @echo
    echo copy C: d:

    RoboCopy C:\ /MIR R:1 /W:1 D:\
    ECHO done

    Hello
     
    To respond to your request, you must enter the administrator password to access this command file.
    Instructions for Windows 7
    In order to run as administrator, create a shortcut to the batch file.
    1. right click on the batch file, then click on copy
    2. navigate to the location where you the shortcut
    3. right click on the background of the directory
    4. select Paste shortcut
     
    Then, you can set the shortcut to run as Administrator:
    1. right click on the shortcut
    2. Select Properties
    3. in the shortcut tab, click Advanced
    4. check the box "Run as Administrator"
    5. click on OK, OK
    Now when you double-click the shortcut it will ask for confirmation UAC and then run as an administrator (which as I said above is different than running under an account in the administrator group)
     
    I hope this helps.

  • Automatic execution of the batch file at the connection of the USB drive

    I created a batch file that checks the drive e. the presence of a specific file, and if there, copy it to a location on the hard drive. (Drive E is where all USB drives see the place through my window of Windows Explorer.) I would like to set up my computer so that this batch file is executed whenever such a device is plugged into the USB port. How can I accomplish that?

    Otherwise, is it possible to incorporate the Attaché-USB-player status in the batch file itself and just leave that batch file running at any time? I used "IF EXISTS E:\*.*", but that is not do me much good, because I have to keep control of this condition again and again, and eventually the batch file gets tired of the audit and said that the drive does not exist.

    Hello

    You can ask your question on the TechNet forums for batch files.

    http://social.technet.Microsoft.com/forums/en-us/category/windowsvistaitpro

  • How to create the new file alertlog.

    How to create the new file alertlog. Need the DB bounce?

    -Chandra

    H wrote:
    How to create the new file alertlog. Need the DB bounce?

    -Chandra

    Is that your alert log file size seems huge? Rename it with another name, Oracle will automatically creates a new name that alert_.ora

  • CS6 Illiustrator crashes when you create the new file

    Hello.

    I'm using windows 7 x 64. And I installed the two Illiustrators x 64 and x 32. I open the Illiustrator but when I try to create the new file Illiustrator stop working.

    Windows 7 Hompe premium x 64

    processor i3 4x2.93

    RAM: 4 GB

    network with printers

    printer.PNG

    error reaport

    ill.PNG

    Hi Philippe,.

    We are really sorry for all the inconveniences that made you.

    Try the following steps to check the issue.

    1 try resetting preferences

    Press Ctrl-Alt-Shift on PC as soon as you click on the Illustratir icon to reset the preferences to the default settings.

    2. If this help not try to remove all printers from the system one & check.

    3. in addition, you can try to set the boot system & check if still HAVE plant if you try to create a file.

    At the same time if these steps does not resolve your problems you can contact Adobe support by following the link below:

    http://helpx.Adobe.com/contact/

    Thank you

    Florian

  • ID of file of the data file created using CREATE the DATA file

    Version: 10 gr 2

    I lost a test data file that was created in the morning. No available backup. I have all logs archived.

    Question1.
    Here are the steps to recreate. Right?
    1. alter tablespace <tablespace_name> offline immediate;  --- should this be offline drop?
    2. alter database create datafile '/u03/oradata/dbtst/CLM01.dbf';
    3. recover tablespace <tablespace_name>;
    4. alter tablespace <tablespace_name> online;
    Question2.
    The newly created file will retain the ID file from the original file that was lost?

    Since you're on 10g, you have not manually create the data file. Check recovery of a Datafile without backup lost: example for more details.

    The identifier must remain the same.

  • Properties - asking extract that created the Pdf file of the document

    Hello

    I need to extract the original application a pdf file created from javascript.  for example in the properties of the document the application appears as follows:

    Application: AutoCAD 2010

    The script of the console that I have is this:

    Console.println ('Application: ')
    + this.info.Application + "");

    When the script is run, it does not extract the application that created the pdf file from.

    Please can someone tell how the script can be modified to remove the application from the document properties?

    Any help will be most appreciated.

    Thank you.

    It has no property named 'Application' of the information object. Try the "creator".

  • Cannot create the .css file

    What happened to textedit, it's now the fubar for webdesign!

    I used to be able to create the .css files with text edit but now its locked to the rtf format and will not produce a usable file more.

    Look at the preferences and change it to RTF to plain text.

  • Error message Microsoft Word "Word could not create the work file. Check the amount of disk space on your startup disk. »

    I have a MacBook Pro, retina 13inch OS X el Capitan Version 10.11.1 with 16 GB of memory. It's brand new and I have recently installed Microsoft Word/Powerpoint etc. a disc that I bought a few years to my previous MacBook. It seems to work very well, but whenever I want to open a word document a message comes up saying "Word could not create the work file. Check the amount of disk space on your startup disk '. However, once I click 'OK' this message disappears and my word file opens without a problem. I have 16 GB of memory on this laptop and it's new I have not reached anywhere near the maximum amount of storage so I'm puzzled as to what this message means. How can I avoid that this message popping up everytime I open Microsoft Word? Any help would be appreciated!

    This has nothing to do with memory - it's the SSD. Word tries to create a temporary file to use as a backup if the program crashes while you are working. First, run the Microsoft Update program to see if there are updates you have missed. Second, Microsoft currently supports only versions 2011 and 2016, so if yours is older, you should consider the upgrade. Thirdly, I suspect that the temporary file is not get created so that you have fewer cancellations (maybe any) and that if the program crashes you have to restore.

  • create the new file using report generation express vi

    Hello

    In my application, I need to write that certain data in spreadsheet Excel. For whom I created an excel template and I used the express vi report generation Toolkit to record appropriate data in the columns of the place. I need a new file created every day by the name of the day and write the data that he rest of the day. I have problems, create the new file using this express vi. I tried to use the low level vi but not able to make properly.

    Join my code and the excel template.

    Help, please.

    Thank you!

    I suspect that your problem is illegal characters (' / ') in your path, certainly it is the case in your original vi. You need to format your path, something like this (underscore instead of a slash stroke):

  • The attached VI works when I run it initially to create the XML file, but by pressing once the XML file is created, it is not up-to-date. What I am doing wrong?

    The attached VI works when I run it initially to create the XML file, but when I change the data and run once the XML file is created, it is not updated with new data. What I am doing wrong?

    Thank you.

    It sounds like the logic that has been written in VI

    Internal decision of true / false:

    (file exists: false) write in the file XML, unflatten for display

    (file exists: true) read the XML file, unflatten for display

    At no time when the file exists (true case) is the XML file updated...

  • Could not create the work file. Check the temp environment

    After I did my Vista SP2 update, the only thing I could do was to reformat the HD. After all, including Office 2007 reloading, Outlook and work has worked well. Again, I went through the updates, Vista and Office SP 2 and now in Outlook and Word I get this error message Outlook (Word) could not create the work file. Check the temp environment

    variable. I am alos having other problems in Word. Help, I can't find all the answers!

    Follow the steps below at our own risk.  Set a restore point before doing this. Make a mistake in the registry can have bad results

    In your registry HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Explorer\User Shell Folders\Cache Database Cache data value must be %USERPROFILE%\Local Settings\Temporary Internet Files

    Close all programs. Then in the registry editor, once you get in the folder above, right click on "Cache", make a left-click on "Change", paste in "%USERPROFILE%\Local Settings\Temporary Internet Files" (without the quotes), on the left, click 'Ok' close the editor of the register. Restart the PC.

    This should solve your problem.

    - Http://blogs.msdn.com/powlo/archive/2007/01/01/fix-for-error-outlook-could-not-create-the-work-file.aspx

    a. start-> Run-> enter "regedit" and press "Enter" to run the program to change registry variables.

    b. navigate to the folder-> "HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Explorer\User Shell Folders\Cache"

    c. check the values of variables [for everything in the "User Shell Folders" folder] - all the variable should have values from '% USERPROFILE%\ '. ». Any variable that is not of this starting point is probably damaged. In my case, all variables corrupt has been a correspondent of "Backup_VariableName". Example: my variable "cache" was damaged when there is a variable called 'backup_cache' with the correct values

    d. change the value of variables corrupt to correct the values. Example of change variable value "cache" in "%USERPROFILE%\Local Settings\Temporary Internet Files" and so on.

    e. close all of Ms Office programs, and turn. The problem should be solved now.

    I added the text in square brackets [] above.

    Microsoft partner - "gentlemen, you can't fight in here! This is the war room. »

Maybe you are looking for

  • Tecra M10 hangs when booting with the new OEM battery

    Hello world I bought an OEM battery for my tecra and now the laptop freezes at boot (the screen remains black with a flashing underscore) with the battery connected.I have to remove the battery, connect the AC adapater, turn on the laptop and, after

  • Contact notifications problem

    Hello I have a problem, Skype on Windows 8 I gett notifications from everyone. But one contact I don't get a sound or a number of notifications, in my taskbar. I can't find anything to solve this... Notifications works for everyone, except for 1 pers

  • Troubleshooting with wireless - got a Satellite A200

    Well if someone could help me somehow, I'd greatly appreciate it. I have a Satellite A200 started just now sent me problems with the wireless connection. I'm not that great with computers but I know how to follow instructions and the basics quite wel

  • Problem with the system after the update colors

    I have treid adjustting the resolution and the other things baut can't seem to get it back end ready to go back to XP easier to use and navigate!

  • Vista license rubbed off the bottom of the netbook.

    Long story short, I was able to recover the key to home premium 32-bit to vista with jelly beans, but when I try to activate this key, it gives me the error 0XC004E003 code. The tag under the netbook rubbed off so I can't copy. I made sure that I cop