Cold Backup Script for windows

Hi,
I have the following script for windows
set pages 0 lines 500;
set heading off echo off feedback off verify off pagesize 0;
select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP\ORADATA\' from v$datafile
union all
select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP' from v$controlfile
union all
select 'copy ' || member ||' c:\BACKUP\COLD_BACKUP' from v$logfile
union all
select 'copy ' || name || ' c:\BACKUP\COLD_BACKUP' from v$tempfile;
exit;
In the above script I have given COLD_BACKUP directory for Backup....But what i want is Dynamically it should create the Directory with timestamp in COLD_BACKUP Directory and copy the files to that directory..
for example
script should create like this
c:\BACKUP\COLD_BACKUP\ORCL_11112007
Like that..it should create the ORCL_11112007 directory and copy the files....
how can i acheive this...I know we can do it in UNIX..
But in windows..how we can acheive this...please help me

You can try to adapt the following SQL*Plus script to create a directory:
set echo on
alter session set nls_date_format = 'DDMMYYYY';
var dd varchar2(10);
begin
:dd := trunc(sysdate);
end;
set echo off
spool mkd.sql
set heading off
select 'host mkdir ' || :dd from dual;
spool off
set echo on
@mkd.sqlOutput is:
dev001> alter session set nls_date_format = 'DDMMYYYY';
Session altered.
dev001> var dd varchar2(10);
dev001>
dev001> begin
  2  :dd := trunc(sysdate);
  3  end;
  4  /
PL/SQL procedure successfully completed.
dev001>
dev001> set echo off
host mkdir 08112007
dev001> @mkd.sql
dev001>
dev001> host mkdir 08112007
dev001>
dev001>
[pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • A decent cold backup script

    Oracle version : 11G release 2
    Platform : AIX
    After going through various OTN posts, i wrote the below Cold backup script (Untested). If there are any unnecessary stuff or enhancements required, please let me know
    $ rman target /
    RMAN>
    run
         allocate channel c1  type disk format '/u05/rmanbkp/%d_COLD_DB_%u';
         sql 'alter system archive log current';
         shutdown immediate;
         startup mount;
         backup database including current controlfile tag='mydbname_full_bkp';
         backup spfile tag = 'mydbname_SPFILE';
         release channel c1;
    }

    Hi T.Boyd
    What do you guys think of the backup script? Any room for improvement? I found in a small percentage of the shutdown immediate commands issued, the instance hangs (specially when the machine is very busy).
    I have modified my rman coldbackup the procedure to:
    shutdown abort;
    host 'sleep 3';
    startup restrict;
    shutdown immediate;
    startup mount;Maybe you can add more channels to improve performance. You can use more resources as there are no users on the database anyway....
    Regards,
    Tycho

  • Hi, i wanted to resize my windows partion. I was thinking of using the default backup system for windows. Then switching to mac partion, deleting the bootcamp and then restoring a new enlarged partion from the backup. Is this possible?

    hi,
    i wanted to resize my windows partition. I was thinking of using the default backup system for windows. Then switching to mac partion, deleting the bootcamp and then restoring a new enlarged partition from the backup. Is this possible?

    I see youhave gotten recommendatons for using WinClone or CampTune.  I have used both and they both work well.
    You have asked about using the WIndows 7 utility to backup your drive and restor it onto a larger partition.  I will tell you fro experience that this will probably not do what you want, and may do something that you don't want.  You can use the Windows 7 native backup tool to make a backup of your Windows 7 partition.  It will most liekly end-up making a dive image of the whole drive.  When yourestore that backup, it will try to re-create teh partitions of exactly the same size as they were when the backup was taken, so it won't increase your partition size for you.  Worse, since Windows doesn't natively know how to read./write HFS+ volumes, the backup will make a partition for your MacOS (replacing any you may have now), except that the copy restored by WIndows will be totally worthless, and you will not be able to boot MacOS from it, or even read it under MacOS.
    Now I will tell you that I've also had some fairly good success working with the free tool CloneZilla.  Since it hasn't been mentioned yet, and everything else mentioned does cost you money, I thought I would throw it out.  CloneZilla is not as easy to use as the tools mentioned, but it has worked for me int hte past, so it is something to consider.  I tend to use CampTune myself, but that was because I purchased a bundle deal for them and it was included in that deal.

  • Adobe CS3Clean Script for Windows

    I have downloaded and unzipped the file located at:
    http://www.adobe.com/support/contact/cs3clean.html
    English/Japanese
    Download the Adobe CS3Clean Script for Windows (ZIP, 978 KB)
    Each time I extract the files, the
    AdobeCS3CleanReadMe.pdf
    will not open because it is corrupt.
    There is an additional file named:
    âNâèü[âôâAâbâvâXâNâèâvâgé+é-éóé-.pdf
    which I have not attempted to open for obvious reasons....

    I don't know for sure, but a good guess is that it's the same
    readme in
    Japanese. I don't have Japanese characters installed so
    perhaps that's why
    the gobbletygook?
    However, the AdobeCS3CleanReadMe.pdf in the download I just
    got is fine.
    Try downloading again .. if that doesn't help .. and your
    Adobe Reader is
    updated .. drop me a line and I'll send you the PDF from my
    download.
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: Dreamweaver CS3: The Missing Manual,
    DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide
    Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "sbuck415" <[email protected]> wrote in
    message
    news:fg5q7a$l0s$[email protected]..
    >I have downloaded and unzipped the file located at:
    >
    >
    http://www.adobe.com/support/contact/cs3clean.html
    >
    > English/Japanese
    > Download the Adobe CS3Clean Script for Windows (ZIP, 978
    KB)
    >
    > Each time I extract the files, the
    > AdobeCS3CleanReadMe.pdf
    > will not open because it is corrupt.
    >
    > There is an additional file named:
    > ?N???[???A?b?v?X?N???v?g?+?-???-.pdf
    > which I have not attempted to open for obvious
    reasons....
    >
    >
    >

  • RMAN Cold backup script

    DB version :10.2.0.4
    Do you find anything wrong in the below mentioned RMAN cold backup script? Any enhancements, corrections required?
    shutdown immediate;
    startup mount;
    backup database including current controlfile tag='full_bkp';
    startup;
    crosscheck backup;
    delete noprompt obsolete device type disk;
    resync catalog;
    }

    Since you are doing a SHUTDOWN IMMEDIATE and STARTUP MOUNT before the BACKUP, there will be no ArchiveLogs generated while the backup is running --- as the database is not OPEN.
    However, the PLUS ARCHIVELOG can include ArchiveLogs that had been generated from the previous STARTUP or ALTER DATABASE OPEN.
    (In that case, I would suggest an SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT' before the SHUTDOWN IMMEDIATE).
    Is your database running in ARCHIVELOG mode ? If not, then this discussion is moot.
    If yes, the next question is, obviously : Why not take a Hot Backup while the database is running (in which case you MUST backup archivelogs !)
    Hemant K Chitale

  • 10g windows cold backup script ...

    we have 10g db on windows server.
    I wnat to perform cold backup of db everyday night.
    at present I am in process on writting .bat to shoudown 10g db
    I nee .bat file to shutdown 10g database

    user580175 wrote:
    Script .bat shutdown database:
    C:\oracle\product\10.2.0\bin\oradim -shutdown -sid ORCL -shuttype INST -shutmode immediate
    Script .bat startup database:
    C:\oracle\product\10.2.0\bin\oradim -startup -sid ORCL -usrpwd oracle -starttype INST -pfile C:\oracle\admin\10.2.0\pfile\initORCL.oraYou might want to get rid of pfile section if using spfile.

  • Script for Windows

    Hi Experts,
    We have Goldengate environment and replicating the data between on source to Many target environments , both source and target environments are Oracle only,  To monitor the process and exceptions we have used shell scripts on both the environments,
    now we have new requirment for replicating the data between oracle to sql server , we have install goldengate on windows NT server for target environment , But in source we are using shell script for monitirong manger process and extract process , like if mgr or extract process is abended immediatly we will get the alert mail through mailx functionality, Now we need to use the same approach for windows sql serer as well , can any one please guide how to achive the monitoring requirment in windows environment as like unix/solaris, is there any option available in windows to writing the scritps like shell also sending the alert mails, Kindly suggest on this.
    Thanks in Advance.
    AT

    I get the scheduler to run this batch file, dbcgen.bat
    rem Set Correct Starting Directory
    D:
    cd \gw8\admin\utility\dbcopy\win32
    cscript //NoLogo dbcgen.vbs > dbcrun.bat
    dbcrun.bat
    and the dbcgen.vbs does the rest
    ' Script to generate DBCRun.Bat file
    ' Result needs to be something like this
    ' D:\gw8\admin\UTILITY\DBCOPY\WIN32\dbcopy.exe /i 12-01-2010 /w n:\gw5po
    c:\gw5back
    Dim cDate
    cDBCPath = "D:\GW8\Admin\Utility\DBCopy\Win32\DBCopy.exe"
    cSrcPath = "N:\GW5PO"
    cTgtPath = "C:\GW5Back"
    dDate = Now() - 1
    'WScript.Echo dDate
    cDay = cStr(Day(dDate))
    if Len(cDay) = 1 then
    cDay = "0" & cDay
    end if
    'WScript.Echo cDay
    cMonth = cStr(Month(dDate))
    if Len(cMonth) = 1 then
    cMonth = "0" & cMonth
    end if
    'WScript.Echo cMonth
    cYear = cStr(Year(dDate))
    'WScript.Echo cYear
    cDate = cMonth & "-" & cDay & "-" & cYear
    'WScript.Echo cDate
    WSCript.Echo cDBCPath & " /i " & cDate & " /w " & cSrcPath & " " & cTgtPath
    set cDate = Nothing
    You can add/alter the various startup flags to suit yourself
    Cheers Dave
    Dave Parkes [NSCS]
    Occasionally resident at http://support-forums.novell.com/

  • Cold backup script

    Hi,
    i want to make a cold backup and schedule it in CRON, but don't know why but it doesn't work. This is what i've in de "full.rman" file:
    connect target /
    shutdown immediate;
    startup mount;
    backup database as compressed backupset;
    crosscheck backup;
    delete expired backup;
    alter database open;
    exit
    i tried to run this script by rman @full.rman
    but when i do this i'm getting the following error:
    RMAN> backup database as
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "as": expecting one of: "archivelog, backup, backupset, channel, copy, controlfilecopy, current, database, datafile, datafilecopy, delete, diskratio, db_recovery_file_dest, filesperset, format, from, force, include, keep, (, maxsetsize, noexclude, nokeep, not, pool, plus, reuse, recovery, ;, skip, spfile, setsize, tablespace, tag, to"
    RMAN-01007: at line 1 column 17 file: full.rman
    In the past i had another error where it looked like it wasn't shutting down the database and starting it up in mount mode. So how can i make a script what wil do what i want :)
    Thanks in advance.
    regards,
    Osman

    Try:
    backup as compressed backupset database;

  • Cisco UT Lite script for windows 2012

    Hi;
    Will Cisco UT Lite script (for Prime LMS 4.2.4) will support with windows Active directory and domain controller on Windows 2012?
    If yes can you please share Link, I try to search but unfortunitly I counldn't found. All document refere till Windows 2003.
    Thanks for your cooperation.
    Best regards;
    Shoaib

    Hi Shoaib,
    there is no workaround. utlite script is supported on below platform only.
    •Windows 2008
    •Windows XP with SP2 or SP3
    •Windows Vista
    Thanks-
    Afroz
    [Do rate the useful post]

  • "samba-discovery". An automounter script for windows shares

    Hi.
    At the last lan party I found it quite annoying to mount samba shares by hand all the time (as I don't use a smb capable browser with fuse like dolphin or the like). So here's what I've come up with. Explenations on how it works are at the start of the script. You can also download it directly from here. Basically you run it and anything available on the lan will be tidily mounted to /mnt/samba-discovery/*.
    #!/bin/bash
    # Hi and welcome to this samba/windows share automounting script.
    # It will:
    # - Scan the network for windows/samba hosts.
    # - Mount all their available guest shares
    # - If rerun it will check if all shares are still accesible
    # - Unmount everything if you use the -u option
    # It will not:
    # - Work on password protected shares. No idea what will happen,
    # I guess mount.cifs will spit an error but the script will continue
    # Run it without options to mount/rescan, use -u to unmount everything.
    # Before running it please specify the options below.
    # Post questions on the Archlinux forum: http://bbs.archlinux.org/viewtopic.php?pid=596979#p596979
    # MOST IMPORTANTLY: If it eats all your files for breakfast, it's none
    # of my responsibility! It should be quite safe though because it's
    # always checking if a dir is empty before deleting it.
    ### Options
    # Specify the name of your network adapter (e.g. eth0):
    netiface='eth0'
    # Specify which range of IPs you're interested in (less is faster)
    lowend=1
    highend=20
    ### Code
    # Prepare samba-discovery folder
    if [[ ! -d /mnt/samba-discovery/ ]]; then
    mkdir /mnt/samba-discovery
    fi
    # Unmount all shares and clean up directories using -u
    umountcount=0
    uhostcount=0
    if [[ $1 == "-u" ]]; then
    shopt -s nullglob dotglob
    dirs=(/mnt/samba-discovery/*)
    (( ${#dirs[@]} )) || sharefolders=1
    shopt -u nullglob dotglob
    if [[ ! $sharefolders == 1 ]]; then
    for i in /mnt/samba-discovery/*/*; do
    umount "$i" 2>/dev/null
    cd "$i" 2>/dev/null
    shopt -s nullglob dotglob
    files=(*)
    (( ${#files[*]} )) || dirempty=1
    shopt -u nullglob dotglob
    if [[ ! $dirempty == 1 ]]; then
    echo ">>> warning: target directory not empty although share unmounted"
    echo ">>> aborting. please investigate directory:"
    echo " $i"
    exit 1
    else
    dirempty=0
    rm -R "$i"
    echo " share on $i unmounted, folder removed."
    ((umountcount++))
    fi
    done
    for i in /mnt/samba-discovery/*; do
    umount "$i" 2>/dev/null
    cd "$i" 2>/dev/null
    shopt -s nullglob dotglob
    files=(*)
    (( ${#files[*]} )) || dirempty=1
    shopt -u nullglob dotglob
    if [[ ! $dirempty == 1 ]]; then
    echo ">>> warning: target directory not empty although all shares unmounted"
    echo ">>> aborting. please investigate directory:"
    echo " $i"
    exit 1
    else
    dirempty=0
    rm -R "$i"
    echo " parent folder $i removed."
    ((uhostcount++))
    fi
    done
    echo "-> Removed $umountcount shares and $uhostcount parent folders"
    exit 0
    else
    echo "no parent folder found, nothing to unmount"
    exit 0
    fi
    fi
    # Normal run. Scan for shares which are no longer on the network...
    if [[ ! $1 == "" ]]; then
    echo "Invalid option. Aborted"
    exit 1
    fi
    shopt -s nullglob dotglob
    dirs=(/mnt/samba-discovery/*)
    (( ${#dirs[@]} )) || sharefolders=1
    shopt -u nullglob dotglob
    if [[ ! $sharefolders == 1 ]]; then
    echo ':: Cleaning up orphaned shares...'
    cleancount=0
    for i in /mnt/samba-discovery/*/*; do
    if [[ ! $(ls $i 2>/dev/null) ]]; then
    umount "$i" 2>/dev/null
    cd "$i" 2>/dev/null
    shopt -s nullglob dotglob
    files=(*)
    (( ${#files[*]} )) || dirempty=1
    shopt -u nullglob dotglob
    if [[ ! $dirempty == 1 ]]; then
    echo ">>> warning: target directory not empty although share unmounted"
    echo ">>> aborting. please investigate directory:"
    echo " $i"
    exit 1
    else
    dirempty=0
    rm -R "$i"
    echo " share on $i no longer accesible, removed."
    ((cleancount++))
    fi
    else
    if [[ ! $(cat /proc/mounts | grep "cifs" | awk '{print $2}' | grep $i) ]]; then
    cd "$i" 2>/dev/null
    shopt -s nullglob dotglob
    files=(*)
    (( ${#files[*]} )) || dirempty=1
    shopt -u nullglob dotglob
    if [[ ! $dirempty == 1 ]]; then
    echo ">>> warning: target directory not empty although nothing mounted there"
    echo ">>> aborting. please investigate directory:"
    echo " $i"
    exit 1
    else
    dirempty=0
    rm -R "$i"
    echo " nothing mounted on $i, removed."
    ((cleancount++))
    fi
    fi
    fi
    done
    echo "-> Cleaned out $cleancount shares"
    fi
    # ... and then scan for new hosts and mount shares
    echo ':: Scanning for new hosts and shares...'
    netaddr=$(ifconfig eth0 | grep "inet addr" | awk '{print $2}' | awk -F ":" '{print $2}' | awk -F "." '{print $1"."$2"."$3}')
    hostcount=0
    sharecount=0
    for ((ip=$lowend; ip<=$highend; ip++)); do
    printf " scanning $netaddr.$ip...\r"
    if (( $(nmap -PN -p139,445 "$netaddr.$ip" | grep -e "139/tcp open" -e "445/tcp open" | wc -l) == 2 )); then
    hostwinname="$( nmblookup -A $netaddr.$ip | grep "<00>" | grep -v "<GROUP>" | awk '{print $1}')"
    hostdirname="$(echo $hostwinname | tr [:upper:] [:lower:])"
    echo " found $hostwinname on $netaddr.$ip"
    IFS=$'\n' shares=($(smbclient -N -gL \\\\$netaddr.$ip\\ 2>&1 | grep -e "Disk|" | grep -v '\$' | awk -F "|" '{print $2}'))
    for share in ${shares[*]}; do
    sharedir="$(echo $share | sed s/\ /_/g | tr [:upper:] [:lower:])"
    if [[ "$(cat /proc/mounts | grep ",unc=\\\\\\\\$netaddr.$ip\\\\$share,")" ]]; then
    echo " share "$share" already mounted in /mnt/samba-discovery/$hostdirname/$sharedir"
    else
    if [[ ! -d "/mnt/samba-discovery/$hostdirname" ]]; then
    mkdir "/mnt/samba-discovery/$hostdirname"
    #echo "$hostwinname:$hostdirname:$netaddr.$ip" >> /mnt/samba-discovery/$hostdirname/ip.txt
    fi
    if [[ ! -d "/mnt/samba-discovery/$hostdirname/$sharedir" ]]; then
    mkdir "/mnt/samba-discovery/$hostdirname/$sharedir"
    else
    cd "/mnt/samba-discovery/$hostdirname/$sharedir"
    shopt -s nullglob dotglob
    files=(*)
    (( ${#files[*]} )) || dirempty=1
    shopt -u nullglob dotglob
    if [[ ! $dirempty == 1 ]]; then
    echo ">>> warning: mounting directory not empty although share not mounted!"
    echo ">>> aborting. please investigate directory:"
    echo " /mnt/samba-discovery/$hostdirname/$sharedir"
    exit 1
    fi
    dirempty=0
    fi
    mount "//192.168.1.$ip/$share" "/mnt/samba-discovery/$hostdirname/$sharedir" -o guest 2>/dev/null
    echo " mounted "$share" in /mnt/samba-discovery/$hostdirname/$sharedir"
    ((sharecount++))
    fi
    done
    ((hostcount++))
    fi
    done
    echo "-> Mounted $sharecount shares from $hostcount hosts."
    # Remove samba-discovery folder if it is empty
    if [[ -d /mnt/samba-discovery/ ]]; then
    cd "/mnt/samba-discovery/"
    shopt -s nullglob dotglob
    files=(*)
    (( ${#files[*]} )) || sambadirempty=1
    shopt -u nullglob dotglob
    if [[ sambadirempty == 1 ]]; then
    rm -R /mnt/samba-discovery/
    fi
    fi
    Here's some sample output of how it will look, including one orphaned share and a new one on a rerun of the script:
    [root@Mothership samba-discovery]# /home/medja/scripts/samba-discovery
    :: Cleaning up orphaned shares...
    share on /mnt/samba-discovery/blackrabbit/conflict_denied_ops no longer accesible, removed.
    -> Cleaned out 1 shares
    :: Scanning for new hosts and shares...
    found BLACKRABBIT on 192.168.1.2
    share CD-Images already mounted in /mnt/samba-discovery/blackrabbit/cd-images
    share CD-Images2 already mounted in /mnt/samba-discovery/blackrabbit/cd-images2
    share Filme already mounted in /mnt/samba-discovery/blackrabbit/filme
    share Filme2 already mounted in /mnt/samba-discovery/blackrabbit/filme2
    mounted Music Library in /mnt/samba-discovery/blackrabbit/music_library
    found MOTHERSHIP on 192.168.1.4
    share space already mounted in /mnt/samba-discovery/mothership/space
    found EEE on 192.168.1.5
    share SharedDocs already mounted in /mnt/samba-discovery/eee/shareddocs
    -> Mounted 1 shares from 3 hosts.
    Last edited by Shapeshifter (2009-08-07 18:51:05)

    thanks a lot, i wanted to write that script for a long time, but never got around. one thing though, you shouldn't mount stuff in a subfolder of /mnt because /mnt itself should be kept for such purposes (unix file hierarchy standards, afaik)
    but that should be easily fixed by myself
    cheers
    Phil
    Last edited by Heller_Barde (2009-08-07 21:42:46)

  • Anybody Used WHG FTP Backup Script for Cpanel?

    Has anybody had experience with this script for automated
    backup with thier
    Cpanel software?
    http://www.webhostgear.com/174.html
    TIA,
    Jon Parkhurst
    PriivaWeb
    http://priiva.net.

    Or this service, or any data backup service?
    http://www.tranxactglobal.com/backupservice.php
    Basically just looking for low-cost backup solutions. Would
    rather have a
    script (bought or free, whichever works better) than a
    service, b/c I want
    to have close control over it.
    Thanks,
    Jons

  • AD script For windows 2008

    Well to get a list of accounts with the never expire parameter you could do this
    dsquery user dc=yourdomain,dc=local -limit 500 | dsget user -samid -fn -ln -pwdneverexpires > output.txt
    That will list all accounts with a yes or no next to it.
    dsquery user dc=aerworldwide,dc=local -limit 500 -stalepwd 30  
    That will give you a list of accounts that have not changed their password in 30 days.  Adjust as you see fit.
    If you have more than 500 users, change the -limit statement accordingly.

    I have a windows 2008 AD. My DC is windows 2008 64bit ( NOT R2)
    I am implementing a new password policy. I need to generate a list of the last time each user's  password was reset and if the "never Expire" flag is set.  All the power shell scripts I see are for windows server 2008 R2 which use the getadUser power shell command.  
    This topic first appeared in the Spiceworks Community

  • RMAN Backup script for RAC Database..please suggest

    Hi All,
    I am currently working on backup policy for RAC Database for my client.The client requirement is to backup while database is shutdown(mount state).I have made below script and could any one please suggest what further things should I need to add with below rman script.
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    srvctl status database -d PROD
    echo "Database shutdown on";date
    echo "Mount Database ";date
    srvctl start instance -d PROD -i "PROD1" -o mount
    srvctl status database -d PROD
    echo "Start Full Database Backup on";date
    $ORACLE_HOME/bin/rman target / nocatalog <<EOF
    configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';
    run{
    allocate channel c1 device type disk connect 'sys/******@node1-vip:1521/PROD';
    allocate channel c2 device type disk connect 'sys/*****@node2-vip:1521/PROD';
    backup format '/BACKUP/PRODBKP/PROD_df_%t_%s_%p.bak'(database);
    backup format '/BACKUP/PRODBKP/archive_%t_%s_%p.bak' archivelog all;
    copy current controlfile to '/BACKUP/PRODBKP/PROD.ctl';
    delete noprompt obsolete;
    release channel c1;
    release channel c2;
    exit
    EOF
    echo "RMAN Backup Finished on";date
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    echo "Start Database";date
    srvctl start database -d PROD
    srvctl status database -d PROD
    Please share your experiences.
    Regards

    Hi,
    Some tweaks for your script.
    echo "Shutdown Database";date
    srvctl stop database -d PROD
    srvctl status database -d PROD
    echo "Database shutdown on";date
    echo "Mount Database ";date
    srvctl start instance -d PROD -i "PROD1" -o mount1. If you database does not shutdown properly , does your script stops the execution of next step?
    2. configure controlfile autobackup on;
    configure controlfile autobackup format for device type disk to '/BACKUP/PRODBKP/%F';(Why you need to configure this every time) ?
    It's persistent at db level one time setting (until some other script changes the settings by other dba - else remove that - set the configuration at db level once for all)
    - Pavan Kumar N
    3.

  • Is there a script for Windows I can use to make iTunes read CD text?

    I've looked all over and all I cannot seem to find one that works for Windows, only Apple. Thanks!

    Yes, but you can always try customized skins from this site: http://itunes-skins.com/ .

  • Scripting for Windows Server Backup for Exchange 2010

    Hi,
    I'm new to writing scripts and was wondering if anyone could assist with writing a script to backup an Exchange Server in a windows 2008 r2 environment.  I currently use Windows Server Backup with a full VSS backup to run exchange backups, however,
    each backup overwrites the previous one, and i would really like to have multiple backups.  I would also like  to specify backup log locations, and have emails sent upon successful backups or failed backups.  I am trying to write this powershell
    but cant seem to get things to work.
    Thanks
    Debbian

    You can use PowerShell in conjunction with the Windows Backup command line utility, wbadmin.exe. The code below should help get you started. I have included the date in order to help maintain multiple back ups, but if you do more than one back up per day,
    you will need to change the date format to include the time. You cannot control the built in logging of Windows Backup, but you could collect your own backup information and write that out to a text file. As far as sending emails, look into the Send-MailMessage
    cmdlet including the -Attachment parameter that could send your log file with your mail message. Cheers.
    $Date = Get-Date -Format 'MM-dd-yyyy'
    $Path = "\\server\share\$Date"
    New-Item -Path $Path -ItemType Directory | Out-Null
    Start-Process wbadmin.exe -ArgumentList "start backup -backupTarget:$Path -allCritical -vssFull -quiet"

Maybe you are looking for

  • Installing premier elements 10

    Can't seem to install from disk or downloaded versions.  Do not yet have mountainlion installed, keep getting an error message about "Install" cannot be opened you should eject the disk image - i get this from both the downloaded version 10 fix and t

  • Messed up albums in itunes

    I have my itunes set so the songs are grouped with the album art. for some reason, sometimes when I upload an album it gets broken up into different parts. For instance, when you click on an album it'll show tracks 1-2 with the album artwork, then th

  • Not apperaring JScrollBar when i am using jdk1.5

    In our application ,we are using JScrollBar that is apperaring while runing jdk1.4 . Then the same application , I had tried to run jdk1.5 ,that is not apperaring in my JPanel .and rest of things are working fine .I had tried so many ways but i did n

  • Can't write to my ntfs external

    So I can't write to my external ntfs anymore through kde. Even through Windows XP it's been giving me "Cannot Access" errors. I did a "chown -R gary /media/Arda-2", but that still didn't work

  • How do I remove photos from my iPhoto trash? I don't want to keep these pictures.

    I have a large number of photos that I really don't want to keep anymore. They are just taking up space on my computer. They are in the trash now, but I don't even want them there.