SQL Server Database backup and restore issue

Hi
I am trying to take a backup of the database and using restore to create  its copy on the same server
Basically I am following this approach
http://stackoverflow.com/questions/3912221/ms-sql-2008-create-a-copy-of-the-database-without-the-data 
Using the restore command is giving me the following error
RESTORE DATABASE [TargetDB]
FROM DISK = N'D:\backup.bak' WITH FILE = 1,
MOVE N'OriginalDB' TO N'D:\sql data\TargetDB.mdf',
MOVE N'OriginalDB' TO N'C:\SQL Data\TargetDB_1.ldf',
NOUNLOAD, STATS = 33
Logical file "ORIGINALDB" is not part of database "TARGETDB" . Use RESTOREFILELIST only to list
plz suggest as I checked the syntax is fine too as per
https://technet.microsoft.com/en-us/library/ms190447%28v=sql.105%29.aspx
I am using SQL Server 2012 

LogicalName cant be same for mdf and ldf. verify again with FILELISTONLY. Also you have put wrong logical name 
MOVE N'OriginalDB' TO N'D:\sql data\TargetDB.mdf'
Please paste the output of
RESTORE FILELISTONLY FROM DISK = 'D:\backup.bak'

Similar Messages

  • WIll cancel sql server database backup cause anything to be hurt?

    I run full backup of one big database. After 20 seconds, I click "stop action now" to cancel this backup. Will it cause anything to hurt? Want to make sure that database is still safe.
    Thanks

    I run full backup of one big database. After 20 seconds, I click "stop action now" to cancel this backup. Will it cause anything to hurt? Want to make sure that database is still safe.
    No it will not cause any issue to SQL server database.Backup request reads data from disk using separate thread you just killed the thread.
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How to take SQL Server Database backup from DB side

    Dear All,
    Please suggest how to take SQL Server Database backup from DB side?
    System Info-
    Portal Server (EP7)
    MS SQL Server
    Microsoft Windows 2003 Server
    Suggest ASAP.
    Thanks & Regards,
    Sameer

    Hi,
          I am planning to take SAP DB backup I need the procedure how to take backup. With in the server.
          My Operating System is IBM AIX
                 Database is  Oracle 10g
                 SAP BI7.0 through this I need to take backup.
         Note:
                1)  First of all I gone to /oracle/<SID>/102_64/dbs/init<SID>.sap and I changed the settings backup_dev_type = disk
                 backup_root_dir = /home/db0/test/sateesh/DB0backup
                 stage_root_dir = /home/db0/test/sateesh/DB0backup
               2) Then I gone to BRTOOLS I changed to disk there I scheduled Online backup
               3) Then I came to SAP DB13 I want to take daily backup. But the backup is not going properly what to do any mistake I had done
                    Try to give the valuable solution to take Online backup

  • Full database backup and restore

    I have a doubt on the syntax for a full database backup and restore. For a single schema, the syntax for backup & restore is :-
    exp JISPREPCORBILLINGPRD501/JISPREPCORBILLINGPRD501 owner=JISPREPCORBILLINGPRD501 STATISTICS=none
    log=JISPREPCORBILLINGPRD501_exp.log grants=y constraints=Y rows=y compress=N
    file=JISPREPCORBILLINGPRD501
    imp <userid/password> file=<export dump file location> fromuser=<export user name> touser=<import user name>
    grants=y constraints=Y rows=y log=<import log file location>
    I hope, my question is clear.
    Please, help in solving the doubt.
    regards

    hi,
    thanks, for your answer. I took a export of one schema of the database. But, when I tried to import the schema to the destination database, it showed
    imported with errors with the existence of functions showing. The commands used by me for export and import are as follows:-
    exp JISPREPCORBILLINGPRD501/JISPREPCORBILLINGPRD501 owner=JISPREPCORBILLINGPRD501 STATISTICS=none log=JISPREPCORBILLINGPRD501_exp.log grants=y constraints=Y rows=y compress=N file=JISPREPCORBILLINGPRD501
    imp JISPREPCORBILLINGPRD501/JISPREPCORBILLINGPRD501 file=JISPREPCORBILLINGPRD501 fromuser=JISPREPCORBILLINGPRD501 touser=JISPREPCORBILLINGPRD501 grants=y constraints=Y rows=y log=JISPREPCORBILLINGPRD501_imp.log
    Do, we need to drop the existing schema before importing or somethinig else. Please, help.
    regards

  • Sql Commands for Backup and restore database

    Hi,
    What are the SQL commands used for database backup nad restore?
    Is it possible to use these command in pl/sql block or it is used only
    from sql plus?
    Thanks
    Jobin .SP

    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/intro005.htm

  • Is it possible to have different authentication mode for SQL Server Database Engine and corresponding SQL Server instance?

    Hi,
    I have installed the x64 SQL Server 2008 R2 Express with default settings and run MBSA 2.3 (using default settings too). It shows three SQL Server instances: MSSQL10_50.SQLEXPRESS, SQLEXPRESS and SQLEXPRESS (32-bit). For the first, authentication
    mode is Windows, for the rest two - mixed. Here https://social.msdn.microsoft.com/Forums/sqlserver/en-US/03e470dc-874d-476d-849b-c805acf5b24d/sql-mbsa-question-on-folder-permission?forum=sqlsecurity question
    about such multiple instances was asked and the answer is that "MSSQL10.TEST_DB
    is the instance ID for the SQL Server Database Engine of the instance, TEST_DB", so in my case, it seems that MSSQL10_50.SQLEXPRESS is the instance ID for SQL Server Database Engine  of the SQLEXPRESS instance.
    I have two questions:
    1) How can it be that SQL Server DB Engine instance has different authentication mode than corresponding SQL Server Instance?
    2) Why 32-bit instance reported although I installed only 64-bit version?
    Also, this https://social.technet.microsoft.com/Forums/security/en-US/6b12c019-eaf0-402c-ab40-51d31dce968f/mbsa-23-reporting-sql-32bt-instance-is-running-in-mixed-mode-when-it-is-set-to-integrated?forum=MBSA question seems to be related to this
    issue, but there is no answer :(.
    Upd: Tried on clean Windows 8 installation and Windows 7 with the same result.

      Because I DO NOT want the three people who will be having access to the production SQL Server to also have access to the primary host ProductionA.  Since I have to allow them to RDC into the box to manage the SQL Server, I figure why not create
    a separate VM for each one of them and they can RDC into those instead.
    Does this make any sense?
    Any tips are greatly appreciated.  The main reason for doing this is because the three people who will be accessing the box, I need to isolate each one of them and at the same time keep them off of the primary ProductionA.
    Thanks for your help.
    M
    Hello M,
    Since you dont want the 3 guys to have access to Production machine A.You can install SQL Server client .By client i mean SQL server management studio(SSMS) on there local desktop and then create login for them in SQL Server.Open port on which your SQL server
    is running for three of the machines so that they can connct.Now with SSMS installed on each machine each can connect to SQL server from there own machine.
    I would also like you to be cautious with giving Sysadmin privilege to all three of them ,first please note down what task they would do and then decide what rights to be provided.
    Your option will also work but you need to create 3 VM for that .Which is more tedious task.
    Hope this helps
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • Exchange Server 2013 backup and restoration question

    Good afternoon
    I am wondering if I can pick people's brains here if that's not too much trouble.
    I have recently implemented an Exchange 2013 environment with 3 servers (two multi-role CAS & MBX physical machines, and one further virtual CAS server). Everything is working correctly and mail-flow is fine. My question relates to backup and restoration
    procedures. I am running a single Database Availability group with the two multi-role servers members of the this group and I have one Mailbox Database on the DAG, passive on one member and active on the other. Failover has been tested and this is functioning
    as expected.
    The backup environment I have implemented is as follows. I have utilized a separate Microsoft DPM 2012 server that runs a nightly Bare Metal backup on both multi-role servers with a retention range of 14 days and I have protected the DAG using DPM with a
    nightly full-express backup and 4 hourly syncs on one of the multi-role servers. Furthermore the Mailbox Database is protected, again nightly with a copy-backup.
    I am confident I know what to do should the mailbox database become corrupted or lost or need to be restored for one reason or another (it would just be a case of restoring the backed up mailbox database using DPM to a pre-created recovery database), what
    I am not quite so sure on is what I would do should I lose one or both of the multi-role CAS and MBX servers (the third CAS I am not so worried about as it is not used for incoming mail flow from the internet and we really only use it for ECP as we did not
    want to expose this to the internet). I wonder what process should follow to restore my Exchange servers (I know how to perform the Bare Metal recoveries using WSB) and what configuration would be required after restoring the Bare Metal backups.
    I know this is a reasonably long question but if anyone has any advice for me I would appreciate it greatly in the unlikely event something goes horribly wrong with my Exchange environment.
    Thanks in advance

    Hi,
    Yes, Most of the configuration settings are stored in AD. Mail data and personal related data are store in Mailbox DB. We just need to take consideration of these two points.
    Thanks,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Simon Wu
    TechNet Community Support

  • BPC 7.5 NW BackUp and Restore Issue

    Hi,
    When we did the Backup and Restore from Dev to QA. we landed in an error saying that Invalid Value of Dimension Member for Entity and Intco Dimension.
    Appreciate on any inputs
    Thanks,
    Vamsi

    Compare contents of entity & intco dims (dev vs qa).
    You can also manual adjust entries of dims in QA and use restored appset normally.

  • SQl Server Error:927 and Restoring

    i have a problem with sharepoint database in SQL 2005.
    status of tow database in sql studio mamagment are restoring...
    how can i stop that? (change status to normal)
    AND SO :
    WHEN I GET A PROPERTISE OF THOSE DATABASE THIS ERROR APEAR:
    database cannot be openned. it is  in middle of restore. microsoft SQL server Error:927

    Hi Tibor,
    I am getting same error but here database is set to standby mode(logshipped), suggestion please..
    Error:
    database cannot be openned. it is  in middle of
    restore. microsoft SQL server Error:927
    TARAK
    Hi Tarak,
    Did the restore complete? If there are no further backups to be restored then try below command
    RESTORE DATABASE <name_here> WITH RECOVERY
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • SQL Server Database backup

    Hi Team ,
    I have SQL Cluster 2012 server running with Couple of Critical data base instance . Each instance installed in different drive.
    One of my application database is having mdf of size 1 Gb and ldf is 250 GB . Database is set to full recovery model.
    Now I want to change recovery model to simple and want to shrink the los also. before than I want to take database backup.
    I have 50 GB space left in drive .
    i want to take full database backup on same drive .please let me know how much space i need on that drive to take full backup.
    thanks
    Ravi

    There are two options for you here
    1. Take transaction log backup and try shrinking the log file but you might have to take multiple transaction log backups to actually shrink the log file
    2. If you are switching from full recovery to simple you dont need to take full backup reason is switching from full to simple breaks log chain so its better to have Transaction log backup and like Praveen suggested if you take transaction log backup with
    compression it likely it would fit in free space. But you have to try.
    3. This you have to do on your own risk: (If backup of log in point 2 fails) I dont think changing from full recovery to simple would cause any
    data loss. So you can switch to simple shrink logs switch back to full and schedule frequent log backups
    Reason why log grew so much because you did not took sufficient transaction log backups. So create maintenance plan which would take frequent log backups also if you dont want point in time recovery for this database let it be in simple recovery
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Database backup and Restore do not bring latest Schema/Data.

    Hi,
    I have scheduled a Full SQL backup for a LIVE database every evening. Now, if I restore this backup to Test environment, it does not bring the changes from LIVE. The script I am using is:
    BACKUP DATABASE [XXX_Applications] 
    TO  DISK = N'\\XXXX\XXX_Applications.bak' WITH NOFORMAT, 
    NOINIT, 
    NAME = N'XXXX_Applications-Full Database Backup',
    SKIP, 
    NOREWIND, 
    NOUNLOAD, 
    COMPRESSION, 
    STATS = 10
    GO
    declare @backupSetId as int
    select @backupSetId = position from msdb..backupset where database_name=N'XXXX_Applications' 
    and backup_set_id=(select max(backup_set_id) from msdb..backupset 
    where database_name=N'XXXX_Applications' )
    --Check for backupSetId  NULL
    RESTORE VERIFYONLY FROM  DISK = N'\\XXXX\XXX_Applications.bak' 
    WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND
    I had to manually go to SSMS->Tasks->SQL Backup. Restoring the manual backup brought all the latest changes from live.
    Not sure what might be the issue with scripted backup.How do I make sure that Backup generated is correct?
    Shady

    BACKUP DATABASE [XXX_Applications] 
    TO  DISK = N'\\XXXX\XXX_Applications.bak' WITH NOFORMAT, 
    NOINIT, 
    Hello Shady,
    NOINIT means the backup file stays as it is and the new backup is appended to the backup file. With the default RESTORE Syntax you restore the first backup in the file, not the latest backup; therefore you get old data/Schema.
    Change it to INIT to clear the backup file first before the backup is added or address the latest backup in the RESTORE command.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Exchange Server 2010 Backup and Restore

    Hai,
    I have Exchange server 2010 stand alone server combined with mailbox, hub and cas role. i dont have backup application program. I want to take my exchange database backup to my SAN storage automatically everyday...
    Using windows server backup i can take full backup only and i can schedule it to happen daily.. Is it possible can i take incremental backup??????????for exchange 2010 database.
    Thanks Chandru CT. MCITP

    You have two basic options to backup Exchange 2010, VSS snapshots and "native backup" (meaning a Lag copy).  As far as VSS backups go, there are three components; the VSS Writer, the VSS Provider, and the VSS Requestor.  The Writer is built into
    Exchange.  In fact in Exchange 2010 there are two - the Exchange VSS Writer and the Exchange VSS Replica Writer.  The provider can be a software VSS provider such as the Microsoft Shadow Copy provider or a hardware provider (usually supplied by your
    SAN vendor.  The requestor is what you would tend to think of as the backup application; it coordinates activities between the Writer and the Provider.
    As far as the Exchange 2010 plugin for Windows backup goes, it a very minimal requestor.  It only supports the Exchange 2010 VSS Writer, not the Replica Writer.  This means you can only take backups of the Active copy of a database.  The requirement
    to backup the entire "volume" in the windows sense, or partition to the rest of us is a function of the way VSS works and is no real surprise.  In fact, another limitation of VSS is that the logs and database need to be on seperate volumes: see
    http://technet.microsoft.com/en-us/library/ee832794.aspx. 
    That it only takes full backups makes sense as well.  Shadow copies, like many software providers and many hardware providers out there are copy on write.  Initially, after the first one that is, they take up minimal space for some metadata. 
    As data is writen to the volume while the the snapshot is in place, the original blocks are evacuated to a "difference area" and the write is then written to the newly evacul\ated spot.  You can generally put the difference area on the same volume or
    somewhere else.  The downside is to write a block while a copy on write snapshot is in place means a read and two writes for every write.  This gets ugly on RAID 5 which already has a write penalty of 4; that turns into 9 IOs for every write while
    the copy on write snapshot is in place.  Since you can't do the snapshots on the replica because the replica writer isn't supported, that IO hit is on the active copy.  When using copy on write snapshots, you generally want as few around as possible
    for as short a time as possible; usually just long enough to export or copy the snapshot to another set of spindles.  I really wouldn't want to use WSB plugin for Exchange 2010 in anything but the smallest deployments.
    What about native backup?  Well then you take a 100% space hit for every lag copy.  In addition, restoring a LAG is a one shot deal.  As you strive with the LAG to match what you could achieve with even daily or weekly copy on write snapshots,
    the number of database copies, and Exchange mailbox servers,  poliferates.  You may want to consider a "Happy medium" that combines a LAG for fault tolerance/protection against logical corruption with copy on write snapshots (replicated or copied
    to seperate storage) for HA.  Perhaps DPM would be worth a look in your situation.
    You did mention that you have a SAN.  Most SAN vendors offer hardware VSS Providers.  Many are copy on write, and you shift that set of problems to the, albeit likey a bit more performant SAN, Some vendors use other stratagies.  The vendor
    I work for uses allocate on write, so it avoids the 3 IOs per write copy on write penalty while a snapshot is in place.  This means you can snapshot frequently and keep many of them around without penalty shortening your RPO and RTO.  They optionally
    archive truncated logs allowing for "up to the minute" restore of older snapshots, not just the last one.  They also provide a proprietery version of RAID 6, called RAID DP that outperforms RAID 1.  Combine that with all the storage efficiency features
    like dedupe of primary storage, thin provisioning, compression, etc., that can all be combined and it starts to get compelling as the size of your deployment increases.  Although I might be a bit biased when it comes to SAN vendors, if your SAN is someone
    other than NetApp I still encourage you to talk with your SAN vendor and see what features/functionality they offer that can help you address your backup needs for Exchange 2010.  I think you'll find much to like; it really comes down to scale and a cost/benefit
    analysis.
    If you decide that hardware VSS providers are not you thing and want to stay with a software vss provider, I encorage you to talk to the usual backup software vendors as well.  Many can integrate with DAS and/or SAN, and have their own software
    VSS providers often including support for the Exchange 2010 replica writer.  This at a minimum allows you to snapshot passive copies.  Features like replication (to get the changed blocks to other storage or off site), tape support (to roll backups
    off to tape potentially to store off site) and catalogs come to mind as very useful things to have.
    I'd take a look around at what's available and see if any of the things offered meet your business needs at a price you can afford to pay.  The WSB Plug-in is a bare bones sort of thing, and it only gets better from there.
    J

  • IOS 7.04 and configurator 1.4.2 backup and restore issues

    I have 20 brand new iPad air's and I am trying to establish a base image in configurator, then use that to restore from as a mass deployment option. I created the backup from the first iPad air succesfully, I installed a few apps via configurator and tweaked icon placement via itunes, I also changed a few settings from the device, wallpaper, bluetooth, and I turned on reduce motion. I am able to backup the first device succesfully in configurator, when I attempt to restore then next device it errors out with a message "Could not restore backup code 4 domain com.apple.configurator.operation.error". I have tried manually proceeding past the greeting screen, rebooting the mac running configurator, restoring the device via itunes, and recreating the backup image. It continues to fail with the same error. The frustarting thing is that i cannot find a table to tell me what these error codes mean, so im left in the dark as to what is causing the issue. does anyone have any ideas?

    I have gotten this resolved, but as to how i got this accomplished I am unsure. I ended up deleting the backup image I had created, and starting over from the beginning. I then created a backup at each step of the process, then tested it to see if it failed to apply. At no step in the process did the process fail, so I dont have a clue what change was the culprit. The last issue I'm having, which appears to be fairly widespread, is that when the image is applied theres a 3-5 minute hang where it stays in the "waiting for device to be ready" state. Im not overly concerned about this but it is a pain to have to wait so long for each device to finish. Anyone have a clue about this?

  • Steps to take in case of any emergency... Project Server 2013 backup and restore

    Hi There !
    We have a Project Server 2013 environment which is scheduled for daily backup on a recovery server. Just wanted to know what will be steps  that we should follow if we were to face a situation in which production is down and we have to look to recovery
    server.
    Your help is much appreciated !
    Thanks

    This will do the Project Sever 2013 rollover -
    https://pwmather.wordpress.com/2013/05/02/projectserver-2013-environment-migration-rollover-steps-powershell-ps2013-msproject-sp2013/
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS |
    MVP | Downloads

  • Backup and Restore Issues

    So my girlfriend has a 4+ year old macbook, and we just put 10.6 on it. We started by backing up her old hard drive, she has a fairly large external drive and we partitioned that into a 75gb backup drive and a 200+gb storage drive. I read that a really simple way to backup a hard drive on a mac is to use disk utility by "restoring" Macintosh HD to the backup partition. We did that, it seemed successful, and then we re-imaged the hard drive to put Snow Leopard on it.
    Next, we used migration assistant to restore all her documents and data, but it seems that not only are non of her documents on her main hard drive, but they appear to have disappeared from the backup external partition as well. Any ideas as to if everything is gone or if there is some way to save it?

    Welcome to Apple Discussions.
    Ouch!
    adb421 wrote:
    I read that a really simple way to backup a hard drive on a mac is to use disk utility by "restoring" Macintosh HD to the backup partition. We did that, it seemed successful, and then we re-imaged the hard drive to put Snow Leopard on it.
    Simpler and more functional to use SuperDuper or CarbonCopy Cloner.
    Next, we used migration assistant to restore all her documents and data
    When Migration Assistant is used after the install it may create a new user, check in /Users to see if this is what happened?
    but it seems that not only are non of her documents on her main hard drive, but they appear to have disappeared from the backup external partition as well.
    Again, check /Users or for a file at the root level "/" called (old).
    -mj

Maybe you are looking for

  • How to test a new SQL Server installation

    Hi, We are in the process of consolidating several database on a single SQL Server instance. We first installed a test server and we want to use this installation as the base for our production server. I checked: - the server collation is the one req

  • How can I change an apple id on a computer?

    I am a new owner of a used MacBook, but I cannot install updates because it is linked to the old user's apple id.

  • How can I include, in the table of content, a title that I have put on a shape?

    Hello all, 1. I have a table of content 2. I have added shapes 3. I wrote text (titles. subtitles) on the shapes 4. They do not appear in the table of content. 5. They only appear in the table of content if they are not on a shape. Pages 5.5.2 Can yo

  • Bullseye Media Manager

    Hello, I just finished a working version of a media manager I use for my personal account to handle my music and pictures collection. I decided to published it on AUR as I assume it might interest some people. It's a python app with several modules.

  • How to invoke WADL files from BPEL?

    Hi, I have an urgent requirement of invoking WADL files from BPEL process. Can anybody help me on how to do it and provide some documentation on it. Thanks in advance!!