How To: Best way to Back Up and Restore many DBs ?

Hi Forum,
I have 200 databases (SharePoint databases) that are running on one single instance e.g. (Server1\Instance1), and the names of the databases are e.g.: (DB1, DB2, DB3....DB200).
I want to migrate all these 200 databases to another instance e.g. (Server2\Instance2).
Of course, I can use the SSMS to Back Up and Restore the databases, But, For 200 databases, This is quite impractical.
Therefore, I have two questions:
1) Which option is the safest way to Back Up 200 databases which their sizes combined together could be around 80 GB? Using T-SQL or Maintenance Plan? Obviously, I want a process that doesn't hang or fail.
2) I found the script below on: (http://www.mssqltips.com/sqlservertip/1070/simple-script-to-backup-all-sql-server-databases/) - Is it excellent script? Any better script?, Also, Could you please tell me how to keep the exact name of the databases
without any changes at all (Without appending date nor time)?
DECLARE @name VARCHAR(50) -- database name  
DECLARE @path VARCHAR(256) -- path for backup files  
DECLARE @fileName VARCHAR(256) -- filename for backup  
DECLARE @fileDate VARCHAR(20) -- used for file name
-- Back Up Directory
SET @path = 'E:\Backup\'  
-- Filename format
SELECT @fileDate = CONVERT(VARCHAR(20),GETDATE(),112) 
DECLARE db_cursor CURSOR FOR  
SELECT name 
FROM master.dbo.sysdatabases 
WHERE name NOT IN ('master','model','msdb','tempdb')  -- exclude these databases
OPEN db_cursor   
FETCH NEXT FROM db_cursor INTO @name   
WHILE @@FETCH_STATUS = 0   
BEGIN   
       SET @fileName = @path + @name + '_' + @fileDate + '.BAK'  
       BACKUP DATABASE @name TO DISK = @fileName  
       FETCH NEXT FROM db_cursor INTO @name   
END   
CLOSE db_cursor   
DEALLOCATE db_cursor
3) Any script for restoring all these databases from the Backup directory to the new SQL Server instance (Server2\Instance2) ?

You would have to develop the script for a single database move, test it thoroughly, then write the dynamic SQL WHILE loop.
At any rate, this appears like a good task for an experienced DBA
and not for a Data Architect.
Here is another example for a dynamic SQL WHILE loop:
http://www.sqlusa.com/bestpractices2008/rebuild-all-indexes/
PowerShell is another alternative:
Copy user databases to a different server with PowerShell
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

Similar Messages

  • Best way to back up and restore.

    shuffle   Windows XP  
    Hi. Not technie here. What's the easiest way to "backup" my iTunes music library off my old laptop onto an external hard-drive and then "restore" onto a new? Export system to do it one file at a time. Another mech will let you do it to a dvd only. What files/folders do I need to copy over?
    What's the easiest way to create an archive for "disasters".

    Simply copy the entire iTunes folder (the top level one, not just the iTunes Music folder inside the iTunes folder) to the external. Then copy off the external to the new computer. Now hold down the SHIFT key and go to the Start menu and pick iTunes to open it (while holding the shift key). It should ask you if you want to start a new library or open an existing one. Existing, then point to the folder you copied over and it should open.
    And your archive backup is the one on the external drive. Just re-copy the internal to the external once in a while to refresh it.
    Patrick

  • What is the best way to back-up and load Hi-8 video onto my i-Mac so I can edit it on i-movie? A camera store will convert it to DVD for $32/120min.ll

    What is the best way to back-up my Hi-8 video tapes and then load them onto my i-Mac so I can edit them on i-movie? A camera store will convert them to DVD for $32/120min. Will I lose a lot of quality that way?

    Quality is not much of an issue with Hi8, the main issue is age of the tapes.  The older the tapes, the more degraded the images are going to be.  Regardless of how you transfer the video, the quality is going to be pretty much the same.
    The "best" way depends on how valuable the images are to you and how many tapes you have.  I did a similar project last winter with a collection of 14 Hi8 tapes that dated from 1994 to 2002.  I bought a converter bridge (Canopus), maximum RAM for my Mac, and a huge hard drive.  I also decided to get Final Cut Express because it had more ability to enhance the pictures after downloading them.  I am very happy with the results, but it cost me nearly $1200 for the upgrades, equipment, and software.
    The only other thing to consider is to be sure that if you go with an outside vendor (like the Camera Store) that the files they provide for you will be in a format that iMovie can recognize.
    Good luck.

  • What's the easiest way to back up and restore my hard drive to a new HD

    I'm going to upgrade my hard drive to a larger one on my MacBook. I have an external backup drive. What is the easiest way to save all my data (documents, emails, etc) and applications and restore them to the new hard drive in my MacBook? I have Leopard OS.
    I've read on the forum everything from using Time Machine to the Disk Utility. I have been backing up everything to my external HD using Time Machine.
    Can you point me to a step by step process.

    I don't use TM, so here's my method that I've used many times for the same thing you are doing.
    How to Clone Using Restore Option of Disk Utility
    1. Open Disk Utility from the Utilities folder.
    2. Select the backup or destination volume from the left side list.
    3. Click on the Erase tab in the DU main window. Set the format type to Mac OS Extended (journaled, if available) and click on the Erase button. This step can be skipped if the destination has already been freshly erased.
    4. Click on the Restore tab in the DU main window.
    5. Select the backup or destination volume from the left side list and drag it to the Destination entry field.
    6. Select the startup or source volume from the left side list and drag it to the Source entry field.
    7. Double-check you got it right, then click on the Restore button.
    Now, boot from the clone to be sure it works correctly by opening Startup Disk, selecting the external volume, then clicking the Restart button. If all is well the computer will boot from the external drive. Now shut down the computer and disconnect the external drive. Disconnect the AC adapter and remove the battery. Install the new hard drive. Once you've completed the installation connect the external drive and restart the computer.
    Now do the following:
    Extended Hard Drive Preparation
    1. Open Disk Utility in your Utilities folder. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger or Leopard.)
    2. After DU loads select your new hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area. If it does not say "Verified" then the drive is failing or has failed and will need replacing. SMART info will not be reported on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Click on the Options button, set the partition scheme to GUID (only required for Intel Macs) then click on the OK button. Set the number of partitions from the dropdown menu (use 1 partition unless you wish to make more.) Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the volume(s) mount on the Desktop.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process will take 30 minutes to an hour or more depending upon the drive size.
    Steps 4-6 are optional but recommended for a drive that has never been formatted before, if the format type is not Mac OS Extended, if the partition scheme has been changed, or if a different operating system (not OS X) has been installed on the drive.
    After formatting is completed use DU to clone the external drive's system back to the new internal drive. The external drive becomes the Source and the internal drive will be the Destination.

  • IPhoto, how is the best way to back up all my many photos?

    I have on my iMac it is finder 10.5 iPhoto does not allow me to back up to USB only burn?

    Most Simple Back Up:
    Drag the iPhoto Library from your Pictures Folder to another Disk. This will make a copy on that disk.
    Slightly more complex: Use an app that will do incremental back ups. This is a very good way to work. The first time you run the back up the app will make a complete copy of the Library. Thereafter it will update the back up with the changes you have made. That makes subsequent back ups much faster. Many of these apps also have scheduling capabilities: So set it up and it will do the back up automatically.
    Example of such apps: Chronosync - but there are many others. Search on MacUpdate or the App Store

  • Best practice for backing up and restoring forms

    Greetings, I would like to pose a question to the forum and understand how many of you, if at all, "backup" your interactive forms so that in the event one or multple become corrupt, you have a method to recover the forms. 
    We recently experienced such a scenario in which the forms we developed in ABAP, and access through our portal, had become corrupt.  What would happen to us when we attempted to access the form via the portal would be a SOAP error.  SOAP errors, I understand, can happen for various reasons but prior to the incident, our forms were working just fine.  We attempted to retrace our steps to identify the cause of the problem but found we could not replicate the issue.  Through analysis of the forms, we identified the corruption in the master page and found that if we copied the sections of the form that were not corrupt to a new master page, the form would work properly again.  Our thought is that this can not be the only method to recover from an incident like this and would like to know if others have experienced or have practices in place that would minimize the impact. 
    We asked SAP support whether or not there was a method to back up Interactive forms and the simple answer we received was to download the XML file from txn SFP.  Can others relate to this strategy as a proper "backup" method or do other best practices exist that would be more ideal??  
    Thank you in advance!

    I had many difficulties with this kind of errors like 2 years ago. Of course it was getting better with every patch level, and with LCD 8, LCD 8.1 etc.I don´t have any problems with the newest solution, but remember the feelings. I had to throw away a three days work once because of this "errors". But the solution is easy:
    - use the versioning like you do in your ABAP development, that works ok
    - if you would like to have an extra backup, copy the form into a backup, I mean with name like Z_YOURNAME_BCK_1
    - if you still feel that is not enough, you can always set your forms to be dynamic, what makes the ADS webservice to change the way the forms are constructed (now it will have a internal structure, you can check this out, if you open a dynamic form in LCD outside SAP, it works like a charm, if you open just a printform, it asks for an import, which does not have anything in common with the template earlier). And you can backup every form you generate with these settings. If a problem appears, you can always open this outside SAP in LCD, copy the hierarchy and paste it into your SAP window with LCD development.
    Hope that helps.
    Regards Otto

  • I accidently backed up another iPhone on my new iPhone. How do I delete the back up and restore my original data, contacts, etc.

    I accidently backed up another iPhone on my iPhone.  How do I delete (reverse) the back up to keep my contacts, etc.? Any way to do so?

    You would have to essentially start again.
    Settings>General>Reset>Erase All Contents And Settings
    This will take the handset right back to the original setup, where you will find an option to Restore From iCloud Backup.

  • What is the best way to remove apps and restore hard drive space?

    My bilt in drive is running out of room and I need to remove some stuff.  Wondering what "other" catagory is in the storage chart.

    1. Empty Trash.
        http://support.apple.com/kb/PH10677
    2. Delete "Recovered Messages", if any.
        Hold the option key down and click "Go" menu in the Finder menu bar.
        Select "Library" from the dropdown.
        Library > Mail > V2 > Mailboxes
        Delete "Recovered Messages", if any.
        Empty Trash. Restart.
    3. Repair Disk
        Steps 1 through 7
        http://support.apple.com/kb/PH5836
    4. For more on this and very helpful tips:
        http://pondini.org/OSX/DiskSpace.html
        http://pondini.org/OSX/LionStorage.html
    5. Local Snapshots?
      http://support.apple.com/kb/ht4878

  • Back up and Restore iTunes

    Hi all. I am having problems with my windows PC, i am going to have to wipe the hard drive and reinstall windows.
    What is the best way to back up and restore iTunes?
    I want to keep all my playlists, music data, such as number of times player etc and which songs are ticked.
    I also have a iphone and a ipad, is there anyway to transfer their data and backups?
    I don't want the trouble of re-syncing the iphone and ipad apps/music etc.
    My library is about 40gb. In the past I have simply copied and pasted the itunes folder (on a portable harddrive), but it never remembers the data listed above and I have always had to re-sync all of my music and apps to iphone and ipad, which are full up with 32gb and would take a considerable amount of time.
    Is there any way to do this so my iPhone and iPad think itunes is exactly the same and won't require (wiping and) re-syncing/re-authorising and will carry on as normal.
    I would be greatful for any help. Thank you.

    Copying and later restoring the entire iTunes folder should have you covered. I suspect you did something wrong with the restore phase on your previous attempts.
    All your media should be inside your iTunes\iTunes Media folder. If that is not the case then you should consolidate the library. File > Library > Organize Library > Consolidate files. If the option is available you should also use File > Library > Organize Library > Rearrange files in the folder "iTunes Media". If your media folder isn't a subfolder of the main iTunes library folder then see this post.
    Backup the library with UserTip. Before you wipe the hard drive deauthorize the computer and make one final update of the backup.
    Once you have rebuilt your computer install SyncToy and use the same process to clone the backup copy of your library back into the Music folder of your new profile as ...<User's Music>\iTunes. Then install iTunes and authorize the install of the operating system to your account. Your devices can now be connected and backed up on the new system. They will sync without losing any data.
    Keep using SyncToy periodically to keep your backup up to date.
    tt2

  • What is the best way to back up photos and videos to a dvd from iPhoto, not in iPhoto format but just in jpeg format to access on either windows or mac

    what is the best way to back up photos and videos to a dvd from iPhoto, not in iPhoto format but just in jpeg format to access on either windows or mac

    When you export the videos out of iPhoto be sure to select Kind = Original.  Otherwise you'll just get an image file of the first frame of the video.
    OT

  • I have an intel iMac OS X 10.8.3 and haven't yet backed up anything. Please advice on best ways of backing up everything before it's too late - external drive etc.

    I have in Intel iMac OS X 10.8.3 and haven't yet backed up anything.  Please advise on best ways of backing up everything (external drive etc?) before it's too late.

    Buy any external hard drive - USB/Firewire/Thunderbolt, etc that is compatible with your Mac. Opinions will vary, but I use Western Digital externals without problem, others will suggest LaCie, but there are no shortage of other manufacturers making equally good drives, I'm sure. It's preferable to buy a drive that is equal to the size of your internal HD, some will say twice the size. Mine are less than the size of my internal HD, but I don't have masses of data.
    The simple and free option is to then connect the drive to the Mac and turn on Time Machine. Leave the drive permanently connected and it will backup your data regularly.
    An alternative, and my preferred option is to use SuperDuper! or Carbon Copy Cloner to make regular bootable clones of your drive. Some (me included) keep multiple backups - clones and TMachine.
    When I had my HD replace recently I re-installed from the clone and was back where I left off in around an hour.

  • What is the best way to back up iPhoto and create disc space

    what is the best way to back up iPhoto and then remove the iphoto folder from the mac book and onto the external apple time capsule

    Two different questions
    the best qway to backup is to use TimeMachine or other automatic backjup program
    However this does not allow you to reduce space since a backup need to be a copy of your existing library and as soond as you changge the library you no longer have a backup and sooner or later the photos will be gone form the bakcujp too
    You need to run the iPhoto library on an external drive or had a complete library on and external drive and a smaller library on yoru internal drive using iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  to move photos between the two libraries
    Moving the iPhoto library is safe and simple - quit iPhoto and drag the iPhoto library intact as a single entity to the external drive - depress the option key and launch iPhoto using the "select library" option to point to the new location on the external drive - fully test it and then trash the old library on the internal drive (test one more time prior to emptying the trash)
    And be sure that the External drive is formatted Mac OS extended (journaled) (iPhoto does not work with drives with other formats) and that it is always available prior to launching iPhoto
    And backup soon and often - having your iPhoto library on an external drive is not a backup and if you are using Time Machine you need to check and be sure that TM is backing up your external drive
    LN

  • What's the best way to back up laptop?

    Hi all,
    This is probably a dumb question, but I'm going to ask it anyway. What's the best way to back up a laptop: hooking up a hard drive manually, or via WiFi?
    In the past, I've just hooked up a hard drive to my MacBook Pro, and manually synced it with Time Machine. But, of course, sometimes I'm busy and I don't get around to doing that as faithfully as I should. So, I'm thinking of hooking up a hard drive to my AirPort so that my laptop will automatically sync over WiFi whenever I'm home.
    Before I do that, however, two questions:
    1) Is that easier to do than the way I'm currently backing up? Or are there problems with that route that I'm not foreseeing right now? How do you all back up your laptops?
    2) I also have a Mac Pro on my network at home. Will I have a problem with my Mac Pro seeing the WiFi "Time Machine" hard drive and wanting to back up to it, rather than the Time Machine hard drive I already have physically hooked up to it?
    Thanks for your advice!

    learn about backups VS. archives, and data protection:
    Methodology to protect your data. Backups vs. Archives. Long-term data protection
    excerpt:
    Four words: "compartmentalized autonomous redundancy of data" or C.A.R.D. What this means regarding your data is “centralize it, isolate it, and multiply it”. This easy acronym to remember about how to approach your data is a great first approach to keep in mind.
    Compartmentalized: separating out your data from your system files, centralizing all static and active files into a location or two to make backups, and archived data easier to update and locate. Centralizing your data collection is the primary hazard to overcome for what usually is the case of data that is scattered everywhere throughout your internal hard drive.
    Autonomous: Isolation of data from changes, theft, decentralizing data to safes, fire boxes, offsite and online locations. Importantly ‘freezing’ data onto independent storage media for protection and from alterations, such as DVDs, hard drives, and online encrypted files, or .DMG created files of static data collections.
    Redundancy: making copies of all autonomous isolated data such that data is decentralized not only in place and in media storage type (DVD, HD, online) for safety and protection as a failsafe, but each aspect of that failsafe has at the very least two redundant copies.
    Data: all files made, saved, created, modified or working on. Important pictures, documents, videos, PDF, financial, personal. Any data large or small which you would not dare lose, which is private, important, hard or impossible to recreate, or most importantly, would take tremendous time to regenerate. Essentially anything important to you, your company, your loved ones (will, medical records, financial information, etc.), friends or otherwise.

  • Best Way to Stack 2d and 3d in a Composite

    Hey everyone, it seems I'm really on a 3d binge with Photoshop CS6. It's just a blast! Anyway, I'm looking to figure out the best way to stack 2d and 3d items together in the same document, and maximize the editibility...
    I'm working on a digital room setting, and I have part of the room in 3d and part in 2d. So, for example, the walls, ceiling, floor, table, chairs and corner hutch are 3d, but the regular hutch and buffet server are in 2d.
    - The table and chairs need to be in the foreground
    - The regular hutch and server are behind the table and chairs
    - The corner hutch needs to be behind all other pieces of furniture
    So, you may be catching on by now to my little dilemna... I want all the 3D items to have the same lighting and reflect off one another, however, I need the 2d layers to somehow fit "inbetween" the 3d objects. The simple question is, how can this be done? Is there a way to mask the foreground 3D objects so that they appear to be in from of the 2D objects? My only current solution is this:
    - Move the whole 3D layer (the scene layer) all the way to the back
    - Make the final decision on the position of the table and chairs
    - Hide all other meshes in the scene besides the table and chairs
    - Render, so the edges are clean
    - Load the newly rendered 3D layer as a selection (which loads the table and chairs only)
    - Either create a new layer from the selection of the rendered 3D layer, or mask the 3D layer so that the table and chairs appear to be in the foreground
    I didn't anticipate this post being this long, so I apologize,... but as you can assume, the method above means I can no longer edit/reposition/scale the 3D at all, so if there's a better way to stack these room elements I would be extremely grateful to whoever knows how!
    Thanks!
    Andy

    First, I was wrong about layers needing to be hidden to prevent their appearance being included in a new Postcard. I misunderstood something that happened when working with a 3D document a while ago.
    Materials support transparency/opacity. A material has an opacity control that can use a texture. The material opacity percentage is multiplied by the opacity of the texture.
    When a Postcard is created, its default material's opacity control will contain an instance of the texture that's in the diffuse control, which is a PSB file containing the 2D layer (pixels, Shape, Smart Object or Group) from which the Postcard was created.
    Here is an example. Two solid Pyramid meshes and a Postcard of a cloud Shape layer:
    The Shape layer from which the Postcard was created is in the document that can be opened by picking Edit in the dropdown of the buttons highlighted above:

  • Best way to back up hard drive?

    Hi. I have finally got round to downloading OS X Yosemite and looking to upgrade from Mavericks. What I would like to know is, what is the best way for me to back up my current hard drive to an external HD?
    The external HD I will be using is a '1TB Seagate Backup Plus Portable Drive' which I partitioned into two separate HD's when I bought it. One is 320gb (same capacity as my current internal HD) and the other is used to copy general files, documents, music etc. I like to take on the go.
    I have also never used Time Machine before, are there any advantages/disadvantages to using it? Any help/advice would be greatly appreciated, thanks.

    You don't have sufficient space in the small partition to use Time Machine. I suggest you use other software like:
    Suggested Backup Software
      1. Carbon Copy Cloner
      2. Get Backup
      3. Deja Vu
      4. SuperDuper!
      5. Synk Pro
      6. Tri-Backup
    Others may be found at MacUpdate.
    Visit The XLab FAQs and read the FAQ on backup and restore.  Also read How to Back Up and Restore Your Files.
    You can start by simply cloning your current startup drive to the backup partition on the backup drive:
    Clone Yosemite, Mavericks, Lion/Mountain Lion using Restore Option of Disk Utility
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         1. Select Disk Utility from the main menu then press the Continue
             button.
         2. Select the destination volume from the left side list.
         3. Click on the Restore tab in the DU main window.
         4. Select the destination volume from the left side list and drag it
             to the Destination entry field.
         5. Select the source volume from the left side list and drag it to
             the Source entry field.
         6. Double-check you got it right, then click on the Restore button.
    Destination means the small partition on the external backup drive. Source means the internal startup drive.
    Maintain this clone by using one of the six utilities listed above. You may get free trials of all to find the one your prefer. My personal favorities are Carbon Copy Cloner, SuperDuper!, and Deja Vu.

Maybe you are looking for

  • 3450 printer offline, can't get it to print!

    I just hooked up a (new-- I know it's old, but I got it with my MacBook Pro 1.5 yr ago, and am only now using it) deskjet 3450 printer to my macbook pro (OSx 10.6), and I cannot get it to print. "Printer is offline" I don't necessarily want wireless,

  • EDI processing and the application log

    All, It is my understanding that when an EDI message is processed if there is more than one error the errors will be put in the application log.   If only one error it is not placed in the application log.   Does any one have any ideas why on occassi

  • HT1529 How to mirror screen with OS 10.6 and apple TV

    I just purchased an apple TV and wondering if I can mirror my computer with the apple TV.  Can I purchase the software to do it?

  • Error when publishing project

    Hi, I am getting the below error when I am trying to publish existing project back to server after making changes The error message was The project could not be saved to the server.  Please retry saving the project.  If the probelm persists, save the

  • Can't uninstall firefox 31.1 on windows 7

    I have tried to uninstall it using the option from the program and features area in control panel as well as from the uninstall folder in the programs file folder. I have ran this both as a regular user and as administrator with no success. I will go