Backup to multiple locations?

I've been able to get RMAN to copy to a networked drive. Is it possible to have the database backups and archivelog backups backup to both the local hard drive and the networked drive? I don't want to have to use a manual process of copying the day's backups to the networked drive if RMAN can do it.

RMAN> backup backupset 3606 format '/tmp/backup_%d_%t_%s_%p_%U.bck' force;
Starting backup at 13-FEB-06
using channel ORA_DISK_1
input backupset count=248 stamp=582039891 creation_time=10-FEB-06
channel ORA_DISK_1: starting piece 1 at 13-FEB-06
piece handle=/tmp/backup_ARON_582039891_248_1_7ohb2eaj_1_2.bck comment=NONE
channel ORA_DISK_1: finished piece 1 at 13-FEB-06
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 13-FEB-06
RMAN> list backupset 3606;
List of Backup Sets
===================
BS Key  Type LV Size
3606    Incr 0  159M
  Controlfile Included: Ckp SCN: 7119710478   Ckp time: 10-FEB-06
  List of Datafiles in backup set 3606
  File LV Type Ckp SCN    Ckp Time  Name
  1    0  Incr 7119710479 10-FEB-06 /db/ARON/fs1/system_d01_0.dbf
  2    0  Incr 7119710479 10-FEB-06 /db/ARON/fs1/test_d01_0.dbf
  3    0  Incr 7119710479 10-FEB-06 /db/ARON/fs1/user_s01_0.dbf
  4    0  Incr 7119710479 10-FEB-06 /db/ARON/fs1/undo_d01_0.dbf
  Backup Set Copy #1 of backup set 3606
  Device Type Elapsed Time Completion Time Tag
  DISK        00:00:39     10-FEB-06       TAG20060210T134450
    List of Backup Pieces for backup set 3606 Copy #1
    BP Key  Pc# Status      Piece Name
    3607    1   AVAILABLE   /db/ARON/BACKUP/RMAN/backup_ARON_582039891_248_1_7ohb2eaj_1_1.bck
  Backup Set Copy #2 of backup set 3606
  Device Type Elapsed Time Completion Time Tag
  DISK        00:00:39     13-FEB-06       TAG20060210T134450
    List of Backup Pieces for backup set 3606 Copy #2
    BP Key  Pc# Status      Piece Name
    3694    1   AVAILABLE   /tmp/backup_ARON_582039891_248_1_7ohb2eaj_1_2.bck
RMAN> host "ls -la /db/ARON/BACKUP/RMAN/backup_ARON_582039891_248_1_7ohb2eaj_1_1.bck /tmp/backup_ARON_582039891_248_1_7ohb2eaj_1_2.bck";
-rw-r-----   1 oracle   dba      167337984 Feb 10 13:45 /db/ARON/BACKUP/RMAN/backup_ARON_582039891_248_1_7ohb2eaj_1_1.bck
-rw-r-----   1 oracle   dba      167337984 Feb 13 10:20 /tmp/backup_ARON_582039891_248_1_7ohb2eaj_1_2.bck
host command completeHere the version with the allocation of 2 channels and the usage of set backup copies. However I think that is not what you need.
RMAN> run {
2> allocate channel ch_1 device type disk format '/db/ARON/BACKUP/RMAN/backup_%d_%t_%s_%p_%U.bck';
3> allocate channel ch_2device type disk format '/tmp/backup_%d_%t_%s_%p_%U.bck';
4> set backup copies=2;
5> backup incremental level 1 database;
6> }  
allocated channel: ch_1
channel ch_1: sid=13 devtype=DISK
allocated channel: ch_2device
channel ch_2device: sid=14 devtype=DISK
executing command: SET BACKUP COPIES
Starting backup at 13-FEB-06
channel ch_1: starting incremental level 1 datafile backupset
channel ch_1: specifying datafile(s) in backupset
channel ch_2device: starting incremental level 1 datafile backupset
channel ch_2device: specifying datafile(s) in backupset
input datafile fno=00004 name=/db/ARON/fs1/undo_d01_0.dbf
input datafile fno=00003 name=/db/ARON/fs1/user_s01_0.dbf
input datafile fno=00002 name=/db/ARON/fs1/test_d01_0.dbf
channel ch_2device: starting piece 1 at 13-FEB-06
including current SPFILE in backupset
including current controlfile in backupset
input datafile fno=00001 name=/db/ARON/fs1/system_d01_0.dbf
channel ch_1: starting piece 1 at 13-FEB-06
channel ch_1: finished piece 1 at 13-FEB-06 with 2 copies
piece handle=/db/ARON/BACKUP/RMAN/backup_ARON_582285544_262_1_86hb9u78_1_1.bck comment=NONE
piece handle=/db/ARON/BACKUP/RMAN/backup_ARON_582285544_262_1_86hb9u78_1_2.bck comment=NONE
channel ch_1: backup set complete, elapsed time: 00:00:26
channel ch_2device: finished piece 1 at 13-FEB-06 with 2 copies
piece handle=/tmp/backup_ARON_582285544_263_1_87hb9u78_1_1.bck comment=NONE
piece handle=/tmp/backup_ARON_582285544_263_1_87hb9u78_1_2.bck comment=NONE
channel ch_2device: backup set complete, elapsed time: 00:00:42
Finished backup at 13-FEB-06
released channel: ch_1
released channel: ch_2deviceAron

Similar Messages

  • RMAN backup into multiple locations

    Hi All,
    Our database size is 1.4 TB. I am planning to schedule RMAN full backu. But i do not have mount point of size 1.4 TB. We have mount point /rmanbkp1 of size 1200GB and /rmanbkp2 of size 200GB. How can i distribute RMAN backup to these two filesystems.
    Can i take tablespace level backups..?
    Please suggest.
    Thanks
    Sandeep Vadlamudi

    Hello;
    First of all 1200GB, might be enough since you probably are not using all the blocks in the 1.4 TB and will compress you will also lose less.
    Can i take tablespace level backups..?
    Yes but the value is limited. You cannot for example recover a dropped tablespace.
    Test a backup first and get an idea of how much space you really need.
    Also once you have a backup how do you free space for the next backup?
    You could use the FORMAT command to backup the database to one location and the Archive to the other. 200 GB is not much space.
    RMAN backup into more than one location :
    http://www.oracle-class.com/?p=2043
    Best Regards
    mseberg

  • Can we take rman backup image copy to multiple location

    Hi All,
    We are planing to move database from old storage to new storage on the same server.
    planing to use RMAN image copy to copy the db files from old storage to new storage and then switch database to copy.
    Currently dbfiles are on /u01, /u02, /u03, /u04 and we are planing to move to new storage /u05, /u06/, /u07
    Is there any way that i can copy all the dbfiles to /u05,/u06,/u07
    Backup as copy database format '/u05
    As i know i can move to single location. Is there any way copy to multiple location using image copy.
    Please suggest.
    Thanks

    Hi
    I will try the below command.
    BACKUP AS COPY
      DB_FILE_NAME_CONVERT ('/u01/..','/u05/...','/u02/...,','/u06/..')
    database;
    I believe this will work.
    Thanks

  • RMAN Backup to ASM and DISK Multiple Locations

    Hi
    We currently have a RAC database that backs up to the Flash Recovery Area on ASM.
    Is there any way of backing up to ASM and Local Disk at the same time? I know you can configure multiple locations but what is the syntax to backup to ASM?
    I've seen the line
    format '/disk1/......','/disk2/.....' etc which backs upto multiple locations.
    Is ASM just '+data/......' ?
    Thanks

    as you said, use the ASM path in the format scope.
    also if you want to backup the DBF's as is(not a backup set) - use:
    backup as copy database;
    good luck

  • Broadcast To Multiple Locations?

    Trying to output to multiple servers - tried launching multiple window of FMLE - but get an error message with the second broadcast attempt.  Any ideas?

    Do you want to publish different input source to multiple locations or same input source to multiple locations. If its former then invoking multiple FMLE's wont be good idea - you can go for Multi-point publish feature of FMS (if its just two servers and one is kinda back up server - then you use backup URL of FMLE).
    If its latter then please check that when you invoke second FMLE - whether input source is defined - i mean check if there is valid device for Video.

  • SQLServer 2000 Backup on Multiple Disks

    I have one of the database on SQL Server 2000. The database is close to 200 GB. Any single local disks I have are not free enough to accommodate the entire backup. Is there a T-SQL script that I can run to specify the multiple backup file location with size
    so I can distribute my backup across multiple disks. Or Any other workaround someone wants to suugest? I tried the USB disks , however SQL Server wont use that to save the backup file.
    Thanks

    there is no way you can limit the size in the backup command but
    As you said the database is 200 GB, check the free space left the drive.
    Let's say f drive has 60, G Drive has 70 and H drive has 120 gb
    create 8 files...
    place 2 files  f drive ,2 files on G and 4 files on H. Data will spread using proportional fill algorithm.
    Once the backup is completed, you will find that each file is approximately 25 GB in size.
    Test for small database using the above logic
    --Prashanth

  • Can RMAN Backup to multiple destinations on disk?

    Hello -
    Does RMAN have the ability to backup to multiple destinations?
    For example, local filesystem, as well as a remote location?
    Thanks in advance!

    user11340104 wrote:
    Hello -
    Does RMAN have the ability to backup to multiple destinations?Yes with duplexed backup sets: http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmcncpt.htm#BRADV89491.
    For example, local filesystem, as well as a remote location?
    Not on another machine but on tape yes.

  • Can anyone please make an app or intergrate location based reminders as multiple locations and have reminders pop up as a whole list just like you list them on a piece of paper and check them off as you walk in a store?

    My name is Tess Loggins and I am a lover of Omnifocus for iphone. I
    > love Omnifocus ,but it is lacking a feature for me. I don't really
    > know how to write this so, please bear with me. Ok. Take out a piece
    > of paper and label it on top Grocery List. Keep in mind that you like
    > to shop at Giant Eagles and Trader Joes. (these two stores are your
    > multiple locations)Write on your list eggs, pickles, butter, wine,
    > tomatoes and lobster(my favorite). So now you have your list. Now it's
    > time to go shopping. let's get into the car..(Please imagine all of
    > this on your iphone/and or using Omnifocus).Lets go to Giant Eagles
    > first. Wow! my whole list on that piece of paper pops up on my screen
    > on my iphone, so all I have to do is check off the items I needs as I
    > walk through the store. Now, I have decided that I will now go to
    > Trader Joes for the wine, pickles and lobster... (I didn't check off
    > the wine, pickles or lobster) Ok, back into the car.lets now drive to
    > Trader Joes. Now ,we are pulling into the driveway of Trader Joes and
    > BAM. my list wine, pickles and lobster (Just like I  wrote it on that
    > piece of paper) pops up. Now we enter Trader Joes and as we walk down
    > the aisle, we can check of the whole list because it's now on our
    > iphone screen. This to me is what I call technology.. I hope you
    > understand my point I am trying to get across. In your next Omnifocus
    > update can you PLEASE implement this to your app. I  want that whole
    > experience in the app. Is this at all possible to do? Is there even a
    > way that I can help to make this happen! In all the apps in the Appstore no one has come up with this idea and has not made app just like this.

    You seem to think you are talking to Omnifocus here.  The odds of actually reaching them here are practically 0%, I would guess.
    I suggest you go to the omnigroup forums and present your suggestions in the omnifocus forum.
    http://forums.omnigroup.com

  • How to integrate bing map for including or displaying multiple locations at the same time

    how to integrate bing map for including or displaying multiple locations at the same time

    Have you aware of the geolocation field that's been introduced with SharePoint 2013?  You can store location data within a list and then integrate this within Bing.  The second tutorial on this Bing team blog will show it well.
    https://www.bing.com/blogs/site_blogs/b/maps/archive/2013/03/26/connecting-a-sharepoint-list-to-bing-maps.aspx
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • Suddenly my event library in iMovie 11 is empty.  I have tried deleting the plist, importing clips from multiple locations (to see if they show up in the library), re-installing iMovie, and re-installing Mountain Lion. Help??

    Suddenly my event library in iMovie 11 is empty.  I have tried deleting the plist, importing clips from multiple locations (to see if they show up in the library), re-installing iMovie, and re-installing Mountain Lion.
    I was working on a project, when all of a sudden the event library went blank.  There are no devices showing in the left column, only "last import" and "aperture videos".  There are no video clips in the editing window.  I have "Show: All Clips" selected.  I've tried "group events by disk". 
    When I have a Project open, it plays just fine.  There are no yellow triangles saying "source clip is missing".  Yet, again...nothing is in the event library large editing window.  So, it seems the data is still there, but invisible.  This is true with all the projects, and all the external devices I've experimented by plugging in to see if their video clips show up in the event library. 
    I have tried to import new movies, and iMovie responds as normal...looking like it's importing, then "generating thumbnails", then it makes the "ding" signalling that the import is complete...but nothing shows in the event library.  I've tried importing movies from the harddrive, from quicktime, and from an external drive.
    I have searched the forums, and found many users with a similar, but not the same, problem.  For them, it seems the "go to users-library-preferences and delete iMovie plist" has solved their problem.  This didn't work for me. 
    I uninstalled/reinstalled iMovie, I even have re-installed Mountain Lion (from a last-ditch effort suggestion from Apple technician). 
    HERE'S AN INTERESTING DETAIL:  After almost 5 hours on the phone with Apple, I decided to cut my losses and take my project to another Mac I have.  I'm working on a project, for work, that is critical that it's completed by tonight (whoops), and all my video is on an external drive.  So, I plug in the external drive to Mac #2, open iMovie, and everything is looking fine.  I continue importing some files I was converting, through Wondershare, and suddenly (whether or not this has to do with the importing, I'm not sure), the SAME THING happened to Mac #2!!!!  I can't believe this. 
    Does anyone have any suggestions?  Have you ever heard of this happening?  Could it have to do with the files I'm importing??? 
    I apologize if my language is confusing.  Obviously, I'm not an Apple genius-person!  I hope I've provided all the information you need.
    Mac #1 is a 27" desktop, mid-2012, software up-to-date.  Mac #2 is a 24" desktop, about 4 years old, OSX 10.7.5

    I'm adding more information:
    in Finder, my iMovie folders are all visible and accessible.  When I click on a clip from iMovie Events folder, Quicktime opens and plays the clip.  ALL my video is not missing - it just isn't showing up in the Event Library!
    This happened all of a sudden, while I was working on iMovie project (on both computers).
    All my Projects are intact, and play when I open them. 

  • Distributing the GOA to multiple locations in the same backend

    Hello Folks,
    We are implementing SRM 5.0 (SAPKIBKT10 Support Package level) with Extended Classic Scenario, with only one backend system (R3 V4.6b) integrated with the SRM system.
    Queries:
    At GOA header - Distribution,  Example is shown below....
    Backend Purchase Organization 1 - Location A
    Backend Purchase Organization 1 - Location B
    When we distribute one GOA to the backend with multiple locations for the same Purchase organiation.
    In the backend system two idocs are getting generated with the same contract number. While processing the first Idoc the system is creating the contract but while processing the second idoc the system is changing the previously created contract, instead of creating a new contract.
    So, in standard does the system creates actually creates two contract numbers for two different locations?
    Can somebody throw some light on the logic of the distribution
    Regds
    Amith
    Edited by: Amith Varma on Feb 26, 2008 4:51 AM

    Hi Amith,
    this is normal behaviour of the system in the case POrgs are set up accross company codes. In the Contract IDoc the Comany Code is derived from the location. When the system finds the same company code, it does not create an additional contract, but just updates the already distributed contract.
    Cheers,
    Claudia

  • Aim to process all files in folders on desktop to run through photoshop and save in multiple locations

    Aim to process all files in folders on desktop to run through photoshop and save in multiple locations
    Part one:-
    Gather information from desktop to get brand names and week numbers from the folders
    Excluding folders on desktop beginning with "2" or "Hot"
    Not sure about the list of folders
    but I have got this bit to work with
    set folderPath to "Hal 9000:Users:matthew:Desktop:DIVA_WK30_PSD" --<<this would be gained from the items on the desktop
    set {oldTID, my text item delimiters} to {my text item delimiters, ":"}
    set folderName to last text item of folderPath
    set my text item delimiters to "_WK"
    set FolderEndName to last text item of folderName
    set brandName to first text item of folderName
    set my text item delimiters to "_PSD"
    set weekNumber to first text item of FolderEndName
    set my text item delimiters to oldTID
    After running this I have enough information to create folders in multiple locations, (i need to know where they are so that photoshop can later save them in those multiple locations
    So I need the following folders created
    Locally
    Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber
    Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName
    Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName: brandName + "_WK" + weekNumber + "_LR" --(Set path for Later)PathA
    Hal 9000:Users:matthew:Pictures:2011-2012:"WK" + weekNumber: brandName: brandName + "_WK" + weekNumber + "_HR"--(Set path for Later)PathB
    Network
    Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:"Week" + weekNumber
    Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:"Week" + weekNumber:brandName + "_WK" + weekNumber + "_LR"  --(Set path for Later)PathC
    Volumes:GEN:Website_Images --(no need to create folder just set path)PathD
    FTP (Still as a normal Volume) So like another Network
    Volumes:impulse:"Week" + weekNumber
    Volumes:impulse:"Week" + weekNumber:Brand
    Volumes:impulse:"Week" + weekNumber:Brand:brandName + "_WK" + weekNumber + "_LR"  --(Set path for Later)PathE
    Volumes:impulse:"Week" + weekNumber:Brand:brandName + "_WK" + weekNumber + "_HR"  --(Set path for Later)PathF
    I like to think that is end of Part 1
    Part 2
    Take the images  (PSD's) from those folders relevant to the Brand then possibly run more applescript that opens flattens and then saves it in the locations above.
    For example….
    An image in folder DIVA_WK30_PSD will then run an applescript in Photoshop, lets call it DivaProcessImages within this we then save to PathA, PathB, PathC, PathD, PathE, PathF the folder path of C should therefore look like this
    Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:Week30:DIVA_WK30_LR and of course save the image as original filename.
    Then from the next folder
    An image in folder Free_WK30_PSD will then run an applescript in Photoshop, lets call it FreeProcessImages within this we then save to PathA, PathB, PathC, PathD, PathE, PathF the folder path of C should therefore look like this
    Volumes:GEN:Brands:Zoom:Brands - Zoom:Upload Photos:2012:Week30:Free_WK30_LR and of course save the image as original filename.
    The photoshop applescript i'm hoping will be easier as it should be a clearer step by step process without any if's and but's
    Now for the coffee!!

    Hi,
    MattJayC wrote:
    Now to the other part, where each folder was created (and those that already existed) how do I set them as varibles?
    For example,
    set localBrandFolder_High_Res to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", localBrandFolder)
    This line was used to create more than one folder as it ran though the folders on the desktop. The next part is I will need to reference them to save files to them.
    You can use a records
    Examples
    if you want the path of localBrandFolder_High_Res  of "Diva", if "Diva" is the second folder of the Desktop
    You get the path with this : localBrandFolder_High_Res of record 2 of myRecords
    if you want the path of localWeekFolder  in the first folder of the Desktop
    You get the path with this : localWeekFolder of record 1 of myRecords
    Here is the script
    set myRecords to {}
    set dtF to paragraphs of (do shell script "ls -F ~/Desktop | grep '/' | cut -d'/' -f1")
    repeat with i from 1 to number of items in dtF
        set this_item to item i of dtF
        if this_item does not start with "2_" and this_item does not start with "Hot" then
            try
                set folderPath to this_item
                set {oldTID, my text item delimiters} to {my text item delimiters, ":"}
                set folderName to last text item of folderPath
                set my text item delimiters to "_WK"
                set FolderEndName to last text item of folderName
                set brandName to first text item of folderName
                set my text item delimiters to "_PSD"
                set weekNumber to first text item of FolderEndName
                set my text item delimiters to oldTID
            end try
            try
                set this_local_folder to "Hal 9000:Users:matthew:Pictures:2011-2012"
                set var1 to my getFolderPath("WK" & weekNumber, this_local_folder)
                set var2 to my getFolderPath(brandName, var1)
                set var3 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var2)
                set var4 to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", var2)
                --set up names to destination folders and create over Netwrok including an already exisiting folder
                set this_Network_folder to "DCKGEN:Brands:Zoom:Brand - Zoom:Upload Photos:2012:"
                set var5 to my getFolderPath("WK" & weekNumber, this_Network_folder)
                set var6 to my getFolderPath(brandName, var5)
                set var7 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var6)
                set website_images to "DCKGEN:Website_Images:"
                --set up names to destination folders and create over Netwrok for FTP collection (based on a mounted drive)
                set this_ftp_folder to "Impulse:"
                set var8 to my getFolderPath("Week" & weekNumber, this_ftp_folder)
                set var9 to my getFolderPath(brandName, var8)
                set var10 to my getFolderPath(brandName & "_WK" & weekNumber & "_LR", var9)
                set var11 to my getFolderPath(brandName & "_WK" & weekNumber & "_HR", var9)
                set end of myRecords to ¬
      {localWeekFolder:var1, localBrandFolder:var2, localBrandFolder_Low_Res:var3, localBrandFolder_High_Res:var4, networkWeekFolder:var5, networkBrandFolder:var6, networkBrandFolder_Low_Res:var7, ftpWeekFolder:var8, ftpBrandFolder:var9, ftpBrandFolder_Low_Res:var10, ftpBrandFolder_High_Res:var11}
            end try
        end if
    end repeat
    localBrandFolder_High_Res of record 2 of myRecords -- get full path of localBrandFolder_High_Res in the second folder of Desktop
    on getFolderPath(tName, folderPath)
        tell application "Finder" to tell folder folderPath
            if not (exists folder tName) then
                return (make new folder at it with properties {name:tName}) as string
            else
                return (folder tName) as string
            end if
        end tell
    end getFolderPath

  • Multiple Locations in Receiver File channel

    Hi Experts,
                      Can i give multiple locations to pick the file in receiver filec hanel depending on some condition.
    Thanks
    Ajay Garg

    Hi,
    Definately you can....
    in sender Communication channel check the ADVANCED SELECTION FOR SOURCE FILES.......
    Thanks,
    Madhu

  • Delete multiple files from multiple locations using config file

    Hello All,
    I am fairly new to .net and I have to make a windows application to delete files older than 90 days from multi ple locations. these multiple locations cant be hard coded and have to be configurable, also the number of days to delete the files have to be
    configurable.
    I think the answer to this would be an app.config file. but dont know how to use the same.
    can anyone tell me about this and if possible help me out with a code snippet.?

    Add settings like picture below.  Add the string by press the double dot icon.
    The use the code below
    static void Main(string[] args)
    int deleteDays = Properties.Settings.Default.DeleteDays;
    StringCollection folders = Properties.Settings.Default.Folders;
    foreach (string folder in folders)
    DirectoryInfo info = new DirectoryInfo(folder);
    FileSystemInfo[] deleleteFiles = info.EnumerateFiles()
    .Where(x => x.LastWriteTime < DateTime.Today.AddDays(deleteDays))
    .ToArray() ;
    foreach(FileSystemInfo file in deleleteFiles)
    File.Delete(file.FullName);
    jdweng

  • T-SQL: Manual Backup of Multiple Databases

    I am looking to change the way I do manual backups of multiple databases on the same instance of SQL Server 2008 R2.
    Currently I have T-SQL scripts for each database that look like this:
    BACKUP DATABASE [mydbname]
    TO DISK = N'D:\backup\manual\2014-01-01_1618\mydbname_2014-1-01_1618.bak'
    WITH NOFORMAT,
    NOINIT,
    NAME = N'mydbname-Full Database Backup',
    SKIP,
    NOREWIND,
    NOUNLOAD,
    STATS = 10
    GO
    But there are six of these scripts, one for each database. Now in another language and my past programming experience I would just use an array of database names and a loop, so that BACKUP DATABASE would only exist once in the script, but be executed multiple
    times, once for each database name in the array.
    I have such a very limited understanding of T-SQL, but I am guessing there is a completely different paradigm for the equivalent of, say, a for loop.
    I'd also like a solution where the date_time directory for the output of each backup to be dynamically generated. Instead of having to pre-create the dirs myself.
    Any help would be appreciated.

    I don't understand why you haven't been answered directly considering the simplicity of the question you are asking.  Maybe it's because I'm the only truly "old school" DBA left.  I don't use the GUI based maintenance or performance tools included
    with SQL Server not because I'm "old school" but because every time I've tried the results have been mediocre at best and in an environment where critical data is on the line mediocre doesn't cut it.
    Since I've had this type of tool in my "tool box" for more than a decade allow me to share what I typically do in this type of situation...
    declare @DatabaseName nvarchar(50),
    @DynamicSQL nvarchar(4000),
    @FileNameDate nvarchar(18)
    declare Database_Cursor
    cursor fast_forward for
    select d.name
    from sys.databases as d
    where d.name in ('MyDB1', 'MyDB2', 'MyDB3', 'MyDB4', 'MyDB5', 'MyDB6')
    open Database_Cursor
    fetch next
    from Database_Cursor
    into @DatabaseName
    while @@fetch_status = 0
    begin
    set @FileNameDate = cast(year(getdate()) as varchar(4)) + '-' +
    right('00' + cast(month(getdate()) as varchar(2)), 2) + '-' +
    right('00' + cast(day(getdate()) as varchar(2)), 2) + '_' +
    right('00' + cast(datepart(hour, getdate()) as varchar(2)), 2) +
    right('00' + cast(datepart(minute, getdate()) as varchar(2)), 2)
    set @DynamicSQL = '
    BACKUP DATABASE ' + quotename(@DatabaseName) + '
    TO DISK = N''D:\backup\manual\' + @FileNameDate + '\' + @DatabaseName + '_' + @FileNameDate + '.bak''
    WITH NOFORMAT,
    NOINIT,
    NAME = N''' + @DatabaseName + '-Full Database Backup'',
    SKIP,
    NOREWIND,
    NOUNLOAD,
    STATS = 10'
    print @DynamicSQL
    --execute sp_executesql
    -- @DynamicSQL
    fetch next
    from Database_Cursor
    into @DatabaseName
    end
    close Database_Cursor
    deallocate Database_Cursor
    There are two items you need to change in the above script to make it do precisely what you are asking...
    This should be obvious but you need to change the where clause in the cursor definition to include the 6 databases you want o backup instead of leaving it as "where d.name in ('MyDB1', 'MyDB2', 'MyDB3', 'MyDB4', 'MyDB5', 'MyDB6')"
    I've commented out two lines of code in the script.  Those lines actually run the backup statements which are built by the cursor.  The lines I'm referring to begin with the "execute sp_executesql" statement.  I've commented those lines out
    because you'll need to test the code prior to using it.  The code as designed will output the backup statements it procedures allowing you to verify it.
    I hope that helps.

Maybe you are looking for

  • What are the corresponding field names

    Hi, What are the corresponding field names for the followings: (1) Last post goods issue date (2) No of finished goods movement days (3) Unit price per carton (4) Per carton quantity Thanks.

  • Can no longer create custom page size for printing to PDF?

    When printing from FrameMaker to PDF in Windows, I used to be able to create a custom page size by clicking on the Add button that appeared to the right of the Adobe PDF Page Size window, in the Adobe PDF Document Properties dialog box. With Frame 9,

  • Proximity Sensor Problem

    I have a problem with proximity sensor, it is very sensible to sunlight. To understand better what i am talking about look at this video posted by someone who has the same problem: http://www.youtube.com/watch?v=LvbkVY_sFYc. This happens for either i

  • ASP usage is very high

    Hello I am having 380GB ASP1 size nad 12 GB ASP2. Before SGEN ASP use is 23% but now it's 50%. It will reduce after full backup? kindly give me guideline in this regards. regards sachin

  • New window instead of new tab

    on my mac book pro, when i click on an internet link from an email, it used to open a new tab in the same window.  now for some reason, it opens a completely new window, instead of opening a tab in the same window.  how do i go back to it being a new