MSSQL Backups?

What are people using for their MSSQL backups?
I'm curious.
Michael

Dear Michael,
I would agree with a database dump (this means exporting the database to a file device) and then backing up this file only for small SAP systems or non-productive systems only. 
A "Small" SQL database in August 2006 is less that 600-800GB.  Medium would be around 1TB and large over 1.5TB
There are several reasons why "database dumps" are not desirable for large SQL Databases:
1.  Frequently people will dump the database to a file to a network. Unless you have a dedicated backup LAN this will impact the performance of any application servers sharing the same LAN. This is true even for those using 1000Mb/s LAN.  Networks are sometimes unreliable for long continuous write operations and a small interruption will cause the entire backup to fail.
2.  Sometimes people will backup the database onto a local disk or SAN attached disk.  This is very risky as this is "backing up a system onto itself". Some would argue that if you backup your DB onto a drive on the same SAN holding your SQL datafiles that this is not a backup.  What happens if the SAN fails before the file has been transferred to tape?
3.  In event of a recovery from tape, the backup must first be recovered from tape onto disk, then from disk into the database.  This at least doubles the time to restore the database.
For large databases or for customers who require high availability “three nines” or “four nines” (99.9% or 99.99%) I would recommend at least using a LAN free backup agent.  Most backup vendors offer these.  Depending on the SAN you are using you will be able to use the high speed SAN Fabric to transfer the data directly to tape.
An even better option is using SNAP or FLASH copy options.  This technology uses functionality of the SAN and the database to bring the DB into a consistent state for several seconds and then copy the database at a SAN level.  With SQL this is called the VDI interface, though most DB vendors offer the same functionality.  Using this technology a 1TB database can be “backed up” in 1-2 minutes. 
Hope this helps – today a “database dump” is not the preferred method for backing up critical data.  The technology you use has to be driven by your availability requirements, the RPO and RTO and budget (of course).

Similar Messages

  • MSSQL - Backup to external hard drive failed

    Hi gurus,
    I am tryin to backup a database using MSSQL2005 Studio to an external hard drive. but i couldn't execute the backup to my external hard drive which is USB. I've checked the error log file in MSsql . I have pasted the following error message below. I done some research and few suggested about the permission or file system could be the issue. I am not sure how to change it. I'm still beginner in MSSQL. Please guide me through to resolve this issue.
    BackupDiskFile::OpenMedia: Backup device 'G:\MSSQL\backup' failed to open. Operating system error 2(The system cannot find the file specified.).
    2009-11-24 14:39:11.41 spid52      Error: 18204, Severity: 16, State: 1.

    Hi Ram,
    As quick resolution for your issue, please follow below instructinos.
    Get into Enterprise manager
    Right click on the database name.
    Select Tasks -> Shrink -> Database
    Then click OK!
    As long term plan, please refer below link that refered when i was settingup backup stragy for my system.
    http://www.sql-server-performance.com/articles/dba/creating_backup_jobs_p1.aspx
    I hope this will reduce a significatly and gains you free space.
    Regards
    Sekhar
    Edited by: sekhar on Nov 24, 2009 8:25 AM
    Edited by: sekhar on Nov 24, 2009 8:27 AM

  • Mssql backup failed in db13

    SQL Job information   ******************************
    Jobname:    SAP CCMS Full DB Backup of ADQ [20110118203423-3-030000]
    Type:       TSQL
    DB-Name:    ADQ
    For Run:    20110119  03:00:00
    Job history information  *****************************
    Stepname:   CCMS-step 1
    Command:    declare @exeStmt nvarchar(2000) exec adq.sap_backup_databases @dbList=
                "ADQ",@r3Db="ADQ",@bDev="R3DUMP0",@expDays= 27,@bkupChecksum="N",@jobN
                ame= "SAP CCMS Full DB Backup of ADQ [20110118203423-3-030000]",@bkupT
                ype="F",@nativeBkup="N",@exeDate = "20110119030000",@bkupSim = "N",@fo
                rmat = 0,@init = 0,@bkupDb = "ADQ",@unload = 0,@exeStmt = @exeStmt OUT
                PUT
    Status:     (failure)
    Message:    2528
    Severity:                                                                                16
    Duration:   0  hours(s)  0  min(s) 0  sec(s)
    Last msg:   Executed as user: NT AUTHORITY\SYSTEM. Cannot open backup device 'R3DU
                MP0(
    .\tape0)'. Operating system error 2(The system cannot find the f
                ile specified.). [SQLSTATE 42000] (Error 3201)  BACKUP DATABASE is ter
                minating abnormally. [SQLSTATE 42000] (Error 3013)  DBCC execution com
                pleted. If DBCC printed error messages, contact your system administra
                tor. [SQLSTATE 01000] (Error 2528).  The step failed.
                        <----
    End of Job Step History -
    >
    Job history information  *****************************

    DATA BASE MSSQL 2008 after schedule backup in DB13 it was giving above error
    anybody help me out
    Thanks,
    Ram.
    Edited by: ramnathreddy on Jan 19, 2011 1:02 PM

  • SQL Server Backup Script

    Hello all, 
    not sure if I'm on the right thread but if not please do point me to the correct one.
    basically I have a script that run every end of the month to do a backup of a database (Detach, Mount a new, and move the database to a new
    location) bu since this month this is coming back with an error when running it. as far as i know nothing has changed since two or three months ago but this is not longer working. 
    Assistance is really needed. here.
    Here is my code but this is now coming back with
    Msg 5105, Level 16, State 4, Server PRITL1, Line 1 
    Device activation error. The physical file name 
    'E:\SQL\MSSQL\Data\Syslogd.mdf' may be incorrect.
    @echo off
    rem ***************************************************
    rem * This script automates the Syslog Backup process *
    rem ***************************************************
    echo 192.168.0.9 > report.txt
    date /t >> report.txt
    time /t >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Starting Syslog DB Maintenance" -server 192.168.0.26
    echo ******************************************* >> report.txt
    echo * Stopping the Kiwi Syslog Daemon Service * >> report.txt
    echo ******************************************* >> report.txt
    net stop "Kiwi Syslog Daemon"
    for /F "tokens=3 delims=: " %%A in ('sc query "Kiwi Syslog Daemon" ^| findstr " STATE"') do (
    if /I "%%A" NEQ "RUNNING" (
    echo Stopping the Kiwi Syslog Daemon Service succeeded >> report.txt
    echo. >> report.txt
    ) else (
    echo -----!!! Stopping the Kiwi Syslog Daemon Service failed !!!----- >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    echo ********************************** >> report.txt
    echo * Detaching the Syslogd database * >> report.txt
    echo ********************************** >> report.txt
    ping 127.0.0.1
    ping 127.0.0.1
    osql -E -b -Q "master..sp_detach_db 'Syslogd'" >> report.txt
    set ReturnCode=%errorlevel%
    if %ReturnCode% equ 0 (
    echo Detaching the Syslogd database succeeded >> report.txt
    echo. >> report.txt
    ) else (
    echo. >> report.txt
    echo -----!!! Detaching the Syslogd database failed !!!----- >> report.txt
    echo. >> report.txt
    echo ********************************************* >> report.txt
    echo * Restarting the Kiwi Syslog Daemon service * >> report.txt
    echo ********************************************* >> report.txt
    net start "Kiwi Syslog Daemon"
    for /F "tokens=3 delims=: " %%A in ('sc query "Kiwi Syslog Daemon" ^| findstr " STATE"') do (
    if /I "%%A" NEQ "STOPPED" (
    echo Restarting the Kiwi Syslog Daemon Service succeeded >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    ) else (
    echo -----!!! Restarting the Kiwi Syslog Daemon Service failed !!!----- >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    echo *************************************************** >> report.txt
    echo * Moving the Syslogd database to the _Burn folder * >> report.txt
    echo *************************************************** >> report.txt
    Move E:\SQL\MSSQL\Data\Syslogd*.* \\server\Syslogs2\_Burn\
    set ReturnCode=%errorlevel%
    if %ReturnCode% equ 0 (
    echo Moving the Syslogd database to the _Burn folder succeeded >> report.txt
    echo. >> report.txt
    ) else (
    echo -----!!! Moving the Syslogd database to the _Burn folder failed !!!----- >> report.txt
    echo ************************************ >> report.txt
    echo * Reattaching the Syslogd database * >> report.txt
    echo ************************************ >> report.txt
    osql -E -b -Q "master..sp_attach_db 'Syslogd','E:\SQL\MSSQL\Data\Syslogd.mdf','E:\SQL\MSSQL\Data\Syslogd_log.ldf'" >> report.txt
    echo. >> report.txt
    echo ********************************************* >> report.txt
    echo * Restarting the Kiwi Syslog Daemon service * >> report.txt
    echo ********************************************* >> report.txt
    net start "Kiwi Syslog Daemon"
    for /F "tokens=3 delims=: " %%A in ('sc query "Kiwi Syslog Daemon" ^| findstr " STATE"') do (
    if /I "%%A" NEQ "STOPPED" (
    echo Restarting the Kiwi Syslog Daemon Service succeeded >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    ) else (
    echo -----!!! Restarting the Kiwi Syslog Daemon Service failed !!!----- >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    echo **************************************** >> report.txt
    echo * Restoring the blank Syslogd database * >> report.txt
    echo **************************************** >> report.txt
    osql -E -b -Q "Restore Database Syslogd from disk = 'E:\SQL\MSSQL\Backup\SyslogD_Blank.bak'" >> report.txt
    set ReturnCode=%errorlevel%
    if %ReturnCode% equ 0 (
    echo Restoring the blank Syslogd database succeeded >> report.txt
    echo. >> report.txt
    ) else (
    echo. >> report.txt
    echo -----!!! Restoring the blank Syslogd database failed !!!----- >> report.txt
    echo ************************************ >> report.txt
    echo * Moving back the Syslogd database * >> report.txt
    echo ************************************ >> report.txt
    Move \\server\Syslogs2\_Burn\Syslogd*.* E:\SQL\MSSQL\Data
    echo ************************************ >> report.txt
    echo * Reattaching the Syslogd database * >> report.txt
    echo ************************************ >> report.txt
    osql -E -b -Q "master..sp_attach_db 'Syslogd','E:\SQL\MSSQL\Data\Syslogd.mdf','E:\SQL\MSSQL\Data\Syslogd_log.ldf'" >> report.txt
    echo. >> report.txt
    echo ********************************************* >> report.txt
    echo * Restarting the Kiwi Syslog Daemon service * >> report.txt
    echo ********************************************* >> report.txt
    net start "Kiwi Syslog Daemon"
    for /F "tokens=3 delims=: " %%A in ('sc query "Kiwi Syslog Daemon" ^| findstr " STATE"') do (
    if /I "%%A" NEQ "STOPPED" (
    echo Restarting the Kiwi Syslog Daemon Service succeeded >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    ) else (
    echo -----!!! Restarting the Kiwi Syslog Daemon Service failed !!!----- >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    echo ******************************************* >> report.txt
    echo * Starting the Kiwi Syslog Daemon service * >> report.txt
    echo ******************************************* >> report.txt
    net start "Kiwi Syslog Daemon"
    for /F "tokens=3 delims=: " %%A in ('sc query "Kiwi Syslog Daemon" ^| findstr " STATE"') do (
    if /I "%%A" NEQ "STOPPED" (
    echo Starting the Kiwi Syslog Daemon Service succeeded >> report.txt
    ) else (
    echo -----!!! Starting the Kiwi Syslog Daemon Service failed !!!----- >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    echo ************************************** >> report.txt
    echo * Compressing the Syslog backup file * >> report.txt
    echo ************************************** >> report.txt
    "C:\program files\winrar\rar.exe" M -df -ep -ag -m5 \\server\Syslogs2\_Burn\PR-Syslog \\server\Syslogs2\_Burn\syslogd*.* >> report.txt
    echo. >> report.txt
    set ReturnCode=%errorlevel%
    if %ReturnCode% equ 0 (
    echo Compressing the Syslog backup file succeeded >> report.txt
    echo. >> report.txt
    ) else (
    echo -----!!! Compressing the Syslog backup file failed !!!----- >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report" -server 192.168.0.26
    exit
    echo **************************** >> report.txt
    echo * Completed * >> report.txt
    echo * Ready for burning! * >> report.txt
    echo * Check Archived files on * >> report.txt
    echo * \\\server\Syslogs2 * >> report.txt
    echo *************************** >> report.txt
    echo. >> report.txt
    date /t >> report.txt
    time /t >> report.txt
    blat report.txt -to [email protected] -f [email protected] -subject "Queen - Syslog DB Maintenance Report - Ready to Burn" -server 192.168.0.26

    Bill thanks for that, 
    this is actually an SQL express edition and not a full SQL server.
    Environment:
    Databases will be detached, copied to from  E:\SQL\MSSQL\Data\ to a shared location and then mount black database foles .MDF
    and .LDF files to the SQL express and then restart the kiwi syslog applications.
     why not powershell? well I've inherited this and machine is a 2003 server and we do not install PS on all machines except
    if they are needed.
    SQLServer Express comes with tools to backup the database.  Post is SQLServer forum to learn how to set up and use SQLExpress tools.
    SQLExpress has support in PowerShell for managing the  server.
    Here si on emethod posted by Microsoft that is useful.  Methods using the scheduler and other tools are available.
    http://support.microsoft.com/kb/2019698
    ¯\_(ツ)_/¯

  • Backup/Restore - File Source Not Found

    I'm having trouble restoring a .bak file while moving it from laptop A to laptop B. First, on A, I backed up the 'Staging' db, creating the Staging.bak file which I transferred to laptop B. I restored (or thought I did) the .bak on B but it doesn't show
    up on my list  of B's Databases even after refreshing and restarting SQL Server.
    Second, I then tried with T-SQL as below and got the error shown. I'm specifying a path with '\Program Files' and the error msg refers to 'Program Files (x86)' which, on my machine, doesn't have the subdir's listed in the err msg. Those dir's are part of the
    \Program Files path (and this is also the 'Data Path' listed in SQL Server Config Mgr).  I'm running SQL Server 2014 Express on Windows 8.1.
    RESTORE DATABASE Staging
    FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\Backup\Staging.bak' ;
    Msg 5133, Level 16, State 1, Line 1
    Directory lookup for the file "C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\Staging.mdf" failed with the operating system error 3(The system cannot find the path specified.).
    Msg 3156, Level 16, State 3, Line 1
    File 'Staging' cannot be restored to 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\Staging.mdf'. Use WITH MOVE to identify a valid location for the file.
    Msg 5133, Level 16, State 1, Line 1
    Directory lookup for the file "C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\Staging_log.ldf" failed with the operating system error 3(The system cannot find the path specified.).
    Msg 3156, Level 16, State 3, Line 1
    File 'Staging_log' cannot be restored to 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\Staging_log.ldf'. Use WITH MOVE to identify a valid location for the file.
    Msg 3119, Level 16, State 1, Line 1
    Problems were identified while planning for the RESTORE statement. Previous messages provide details.
    Msg 3013, Level 16, State 1, Line 1
    RESTORE DATABASE is terminating abnormally.

    When you take a backup all information including the file path(.mdf/ldf) is included as part of the backup. As you found out if you just run restore database it will try to restore to the exact same location(C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\).
    Looks like you dont have this path(C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.SQLEXPRESS\MSSQL\DATA\) on target server where you are performing this restore.
    To know the files and locations from backup file, you can use RESTORE FILELISTONLY option allows you to see a list of the files that were backed up and their original path.  So for example if you have a full backup you will see all of the data files
    (mdf) and the log file (ldf) and their path.
    RESTORE FILELISTONLY FROM DISK = 'C:\AdventureWorks.BAK' WITH FILE = 1
    The result set would like the following.  The things that are helpful here include the LogicalName and PhysicalName.
    ColumnName
    Value
    Value
    LogicalName
    AdventureWorks_Data
    AdventureWorks_Log
    PhysicalName
    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf
    C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Log.ldf
    So as suggested please use WITH MOVE option while restore to provide the valid path.

  • Backup and restore the fields in the same date format...

    In the form, there is one date field , the value is entered by using jquery, datepicker. The sceanrio is, after I picking the date value in date field , then I decided to click the back button, moved the precious form then forward again that date field form.. My query is I need to restore and backup the Same format I entered previously..
    Query is When i hit back and forward again the date format will be changed from "2010/02/21" to "2010-01-21 00:0:0 +5:30".
    The below codes were used for picking the date field in the form..
    <script type="text/javascript">
    $(document).ready(function() {
    $(function(){
    $(".date").datepicker({ dateFormat: 'yy/mm/dd' });
    });

    Hi Benjamin,
    you could restore database with new name using below script
    RESTORE
    DATABASEWSS_Content_NewFROMDISK='C:\Program
    Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\WSS_Content.bak'
    WITH
    MOVE'WSS_Content'TO'C:\Program
    Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WSS_Content_New.mdf',
    MOVE'WSS_Content_log'TO'C:\Program
    Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WSS_Content_Newt_log.ldf'
    Regards,
    Regards, <b>Khalil Kothia, PMP </b>
    Blog

  • Backup parameters for legato backup

    Hi All,
    We are doing SAP Migration for 4.6C on HP-UX 11 v2 64bit with oracle 9. We are having Tivoli backup system in our exisiting landscape. We want to take the offline backup of our PRD system in readable format. We will not have Tivoli backup storage in our new landscape. Will you please let us know what parameter we need to change in INIT<SID>.SAP file to make the offline backup in DLT format for our new landscape. Also please let me know any process we need to follow up to take the offline back up in DLT format. We will have the Legato backup process in our new landscape. Currently all online and offline backup is running on Tivoli client format in our old landscape.
    If you have any documents for defining new backup stratergy then please send me on [email protected]
    Thanks for your support.
    Thanks and regards,
    Ripal

    Backup job for User databases is failing.
    I found below errors
    View job history
    Step 0:
    The job failed. The job was invoked by schedule 4(DBMP_User). The last step to run was step 1(subplan)
    Step 1:
    Message: Executed as user Servername\System. The package execution failed. The step failed
    Appln-event log:
    SQL server scheduled job DBMP_User failed. Invoked on 2007-12-24 , the job was failed.
    Sql server error log
    Database backed up. DBname creation,date()time……paged dumped 8434659,first LSN: 21126:101410:48,last LSN :21128:933:1, number of dump devices:1, device information: file=1,type=disk (E:\MSSQL\BACKUP\  )
    This is an informational message only. No user action is required
    Error log:
    Date:
    Log: SQL Agent (current …)
    Message:
    (396) An idle CPU condition has not been defined-OnIdle job schedules will have no effect.
    If we look at the error message "An idle CPU condition has not been defined", it seem like that while taking backup the CPU goes on idle for a long period of time. Probably more than 10 min. We can try setting the properties of SQL Server Agent by right
    clicking and select "Advanced" option or extend the time for Idle CPU condition. For more details refer
    http://msdn.microsoft.com/en-us/library/ms189065(v=sql.90).aspx
    One reason for going CPU idle when the job is running can be due to space issue in the server. Here we have a solution where the user cleanup some backup files and the issue got resolved. Refer
    http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=94668
    Regards, RSingh

  • Windows Authentication login cannot access backup files stored in Users\[User] folder.

    I am currently logged in to my database engine using SSMS and Windows Authentication; specifically, I am logged in with Joe-PC\Joe, where Joe-PC is the domain name of the machine hosting the database, and Joe is the user that created the database. 
    If it matters, I am running all of this locally from Joe-PC.
    I have a .bak backup file stored in my C:\Users\Joe\Desktop folder that I am trying to restore.  However, I get an error saying 'Either the location does not exist, or the current login account does not have access to it.'  I am certain the location
    exists, as I am looking at it right now, and I can't see why Joe-PC\Joe wouldn't have access to it's own user folder. 
    I am absolutely baffled as to why this is behaving this way.  I am fully aware that I can work around the issue, but I'd like to know why this isn't working as it seems like it should.  Does the Windows Authentication that SQL Server uses not have
    the permissions that the account would normally have?  Is the Windows Authentication user even the same thing as the user that logs into Windows?  What else could be going on that I don't understand?

    Keith
    Thanks for your answer.  My user account is one of two administrator accounts on this computer (the other is only set up for consistency sake, and has probably only been logged into a total of 5 times; all of our computers have the account though, so
    I thought I should put it on here as well).  The issue isn't that my account doesn't have restore permissions, just that SSMS can't access the user folder when logged in using Windows Authentication.  Another issue that I assume is related results
    in a lack of permissions on backup files until I manually set permissions to 'Everyone' under the backup file's properties\security tab.  Also, not sure if it matters, the backup is taken from a customer's computer running Win 7 Pro x86 while my computer
    is on Win 7 Ultimate x64.
    Not sure if this helps pinpoint the issue, but my current workaround is as follows:
    Copy the .bak file to the C:\Program Files (x86)\Microsoft SQL Server\MSSQL10_50.WSA\MSSQL\Backup (default backup folder)
    Right-click the .bak file and go to the properties toolbox.  Select the Security Tab, give full permission to 'Everyone'.
    In SSMS, select 'Restore Database' after right-clicking on 'Databases' in left-hand tree.
    Give the DB a name, restore from device, select my file.
    This method hasn't failed me yet, but any deviation (other than setting permissions before or after moving) causes me to get access errors when I try to restore.  Fortunately, this isn't a production database engine, just a testing environment, but
    I'd like to get an idea of what's going on, because I know it's only a matter of time before I or a customer runs into this issue.

  • DB13 backup on usb drive.

    Hello gurus,
         I want to backup my database to my External USB HDD mapped on my PRD server, through DB 13.
    The database I am using is MS SQL 2005 and OS Windows 2003.
    Please tell me about the steps involved to do the same
    Thanks and Regards,
    Rahul

    Rahul,
    High-level steps are as follows:
    1) Connect USB drive so that it can be seen by O/S, (locally or remotely), etc.
    2) In SQL Server Management Studio, expand Server Objects and Backup Devices - create a new Device Name using "File" destination.  Specify file location - here is the section from SQL Server help:
    "View the destination file of an existing backup device, or specify a destination file for a new backup device. For an existing device, the full path and file name of the device are displayed, and the Browse button is unavailable.
    When creating a new device, you can override the path, file name, and extension either by navigating to a different file or by editing the information directly. To browse for a local file, click the Browse button to the right of the File text box and navigate to a file on one of the fixed drives of the computer running the server.
    For a remote file, enter the full path and name (for example,
    remote_server\mssql\backup\sales\monthly\September.bak)."
    Click Ok.
    3) You didn't mention your SAP version but in DB13, choose database backup, select your device and your other options, schedule or execute.
    Good luck.
    Regards,
    Ken S.

  • Backup and restore the wss_content db to the same server with different name

    Hi,
     I want to restore the content db of 80 port in my sp 2013  web appln to a different web appl. is this possible?
    By default wss_content is pointing to the 80 port. so if i wanna take the backup of this content db and restore it in the same machine as a  different content db name, is this achievable?
    if this is achieved, i want to mount this newly restored content db to a new  web appln.

    Hi Benjamin,
    you could restore database with new name using below script
    RESTORE
    DATABASEWSS_Content_NewFROMDISK='C:\Program
    Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\WSS_Content.bak'
    WITH
    MOVE'WSS_Content'TO'C:\Program
    Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WSS_Content_New.mdf',
    MOVE'WSS_Content_log'TO'C:\Program
    Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\WSS_Content_Newt_log.ldf'
    Regards,
    Regards, <b>Khalil Kothia, PMP </b>
    Blog

  • RSP Backup Problem

    Hi Experts,
                   I Shedule a backup in certain path,its a shared folder but my backup is not taking there its taking backup in another path,C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup how to do this in sheduled path.
    Regards
    Vinoth

    Hi,
    Please check SAP help file:
    Configuring Databases - Remote Support Platform for SAP Business One - SAP Library
    Thanks & Regards,
    Nagarajan

  • Can CDC enabled database DIFF backups be RESTORED while maintaining the CDC integrity?

    We tried restoring FULL + subsequent DIFF backups of a CDC enabled database to a different SQL server and found that the CDC integrity is not being maintained. We did RESTORE the databases with the KEEP_CDC option.
    Can someone please guide us on how to successfully restore the CDC enabled database backups(FULL + DIFF) while maintaining the CDC integrity?
    Note: SQL Server Version: SQL Server 2012 SP1 CU2

    Hi YoungBreeze,
    Based on your description, I make a test on my computer.
    Firstly, I create a database named ‘sqldbpool’ , then enable the
    Change Data Capture (CDC) feature and take full+ differential backups of the database. Below are the scripts I used.
    -- Create database sqldbpool
    CREATE DATABASE [sqldbpool] ON PRIMARY
    ( NAME = N'SQLDBPool', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\SQLDBPool.mdf' , SIZE = 5120KB ,
    MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
    LOG ON
    ( NAME = N'SQLDBPool_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\SQLDBPool_log.LDF' , SIZE = 3840KB ,
    MAXSIZE = 2048GB , FILEGROWTH = 10%)
    GO
    use sqldbpool;
    go
    -- creating table
    create table Customer
    custID int constraint PK_Employee primary key Identity(1,1)
    ,custName varchar(20)
    --Enabling CDC on SQLDBPool database
    USE SQLDBPool
    GO
    EXEC sys.sp_cdc_enable_db
    --Enabling CDC on Customer table
    USE SQLDBPool
    GO
    EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name = N'Customer',
    @role_name = NULL
    GO
    --Inserting values in customer table
    insert into Customer values('jugal'),('shah')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking full database backup
    backup database sqldbpool to disk = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\sqldbpool.bak'
    insert into Customer values('111'),('222')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking differential database backup
    BACKUP DATABASE sqldbpool TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\sqldbpooldif.bak' WITH DIFFERENTIAL
    GO
    Secondly, I restore the ‘sqldbpool’ database  in a different SQL Server instance with the following scripts. After the restoration, everything works as expected and the database maintains the CDC integrity.
    Use master
    Go
    --restore full database backup
    restore database sqldbpool from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\sqldbpool.bak' with keep_cdc
    Restore Database sqldbpool From Disk = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\sqldbpool.bak'
    With Move 'SQLDBPool' To 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\SQLDBPool.mdf',
    Move 'SQLDBPool_log' To 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\SQLDBPool_log.LDF',
    Replace,
    NoRecovery;
    Go
    --restore differential database backup
    restore database sqldbpool from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\sqldbpooldif.bak' with keep_cdc
    --add the Capture and Cleanup jobs
    Use sqldbpool
    exec sys.sp_cdc_add_job 'capture'
    GO
    exec sys.sp_cdc_add_job 'cleanup'
    GO
    insert into Customer values('TEST'),('TEST1')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    When we restore a CDC enabled database, we need to note that the CDC feature is available only on the Enterprise, Developer, and Evaluation editions of SQL Server. And we need to add the Capture and Cleanup agent jobs after restoring the database.
    For more details about restoring a CDC enabled database in SQL Server, you can review the following similar articles.
    Restoring a SQL Server database that uses Change Data Capture:
    http://www.mssqltips.com/sqlservertip/2421/restoring-a-sql-server-database-that-uses-change-data-capture/
    CDC Interoperability with Mirroring and Recovery:
    http://www.sqlsoldier.com/wp/sqlserver/cdcinteroperabilitywithmirroringandrecovery
    Thanks,
    Lydia Zhang

  • [Forum FAQ] How do I restore the CDC enabled database backups (FULL + DIFF) while maintaining the CDC integrity

    Question
    Background: When restoring Full + DIFF backups of a Change Data Capture (CDC) enabled database to a different SQL server, the CDC integrity is not being maintained. We did RESTORE the databases with the KEEP_CDC option.
    How do I successfully restore the CDC enabled database backups (FULL + DIFF) while maintaining the CDC integrity?
    Answer
    When restoring a CDC enabled database on a different machine that is running SQL Server, besides using use the KEEP_CDC option to retain all the CDC metadata, you also need to add Capture and Cleanup jobs. 
    In addition, as you want to restore FULL + DIFF backups of a CDC enabled database, you need to note that the KEEP_CDC and NoRecovery options are incompatible. Use the KEEP_CDC option only when you are completing the recovery. I made a test to display
    the whole process that how to restore the CDC enabled database backups (FULL + DIFF) on a different machine.
    Create a database named ’CDCTest’ in SQL Server 2012, then enable the CDC feature and take full+ differential backups of the database.
    -- Create database CDCTest
    CREATE DATABASE [CDCTest] ON  PRIMARY
    ( NAME = N'CDCTest ', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ CDCTest.mdf' , SIZE = 5120KB ,
    MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
     LOG ON
    ( NAME = N'CDCTest _log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ CDCTest _log.LDF' , SIZE = 3840KB ,
    MAXSIZE = 2048GB , FILEGROWTH = 10%)
    GO
    use CDCTest;
    go
    -- creating table
    create table Customer
    custID int constraint PK_Employee primary key Identity(1,1)
    ,custName varchar(20)
    --Enabling CDC on CDCTest database
    USE CDCTest
    GO
    EXEC sys.sp_cdc_enable_db
    --Enabling CDC on Customer table
    USE CDCTest
    GO
    EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name = N'Customer',
    @role_name = NULL
    GO
    --Inserting values in customer table
    insert into Customer values('Mike'),('Linda')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking full database backup
    backup database CDCTest to disk = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ CDCTest.bak'
    insert into Customer values('David'),('Jane')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking differential database backup
    BACKUP DATABASE CDCTest TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ CDCTestdif.bak' WITH DIFFERENTIAL
    GO
    Restore Full backup of the ‘CDCTest’ database with using KEEP_CDC option in a different server that is running SQL Server 2014.
    Use master
    Go
    --restore full database backup
    restore database CDCTest from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTest.bak' with keep_cdc
    Restore Diff backup of the ‘CDCTest’ database.
    Restore Database CDCTest From Disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTest.bak'
        With Move 'CDCTest' To 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\CDCTest.mdf',
            Move 'CDCTest _log' To 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\CDCTest _log.LDF',
            Replace,
            NoRecovery;
    Go
    --restore differential database backup
    restore database CDCTest from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTestdif.bak' with keep_cdc
    Add the Capture and Cleanup jobs in the CDCTest database.
    --add the Capture and Cleanup jobs
    Use CDCTest
    exec sys.sp_cdc_add_job 'capture'
    GO
    exec sys.sp_cdc_add_job 'cleanup'
    GO
    insert into Customer values('TEST'),('TEST1')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    Reference
    Track Data Changes (SQL Server)
    Restoring a SQL Server database that uses Change Data Capture
    Applies to
    SQL Server 2014
    SQL Server 2012
    SQL Server 2008 R2
    SQL Server 2008
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    Question
    Background: When restoring Full + DIFF backups of a Change Data Capture (CDC) enabled database to a different SQL server, the CDC integrity is not being maintained. We did RESTORE the databases with the KEEP_CDC option.
    How do I successfully restore the CDC enabled database backups (FULL + DIFF) while maintaining the CDC integrity?
    Answer
    When restoring a CDC enabled database on a different machine that is running SQL Server, besides using use the KEEP_CDC option to retain all the CDC metadata, you also need to add Capture and Cleanup jobs. 
    In addition, as you want to restore FULL + DIFF backups of a CDC enabled database, you need to note that the KEEP_CDC and NoRecovery options are incompatible. Use the KEEP_CDC option only when you are completing the recovery. I made a test to display
    the whole process that how to restore the CDC enabled database backups (FULL + DIFF) on a different machine.
    Create a database named ’CDCTest’ in SQL Server 2012, then enable the CDC feature and take full+ differential backups of the database.
    -- Create database CDCTest
    CREATE DATABASE [CDCTest] ON  PRIMARY
    ( NAME = N'CDCTest ', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ CDCTest.mdf' , SIZE = 5120KB ,
    MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
     LOG ON
    ( NAME = N'CDCTest _log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\ CDCTest _log.LDF' , SIZE = 3840KB ,
    MAXSIZE = 2048GB , FILEGROWTH = 10%)
    GO
    use CDCTest;
    go
    -- creating table
    create table Customer
    custID int constraint PK_Employee primary key Identity(1,1)
    ,custName varchar(20)
    --Enabling CDC on CDCTest database
    USE CDCTest
    GO
    EXEC sys.sp_cdc_enable_db
    --Enabling CDC on Customer table
    USE CDCTest
    GO
    EXEC sys.sp_cdc_enable_table
    @source_schema = N'dbo',
    @source_name = N'Customer',
    @role_name = NULL
    GO
    --Inserting values in customer table
    insert into Customer values('Mike'),('Linda')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking full database backup
    backup database CDCTest to disk = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ CDCTest.bak'
    insert into Customer values('David'),('Jane')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    --Taking differential database backup
    BACKUP DATABASE CDCTest TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup\ CDCTestdif.bak' WITH DIFFERENTIAL
    GO
    Restore Full backup of the ‘CDCTest’ database with using KEEP_CDC option in a different server that is running SQL Server 2014.
    Use master
    Go
    --restore full database backup
    restore database CDCTest from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTest.bak' with keep_cdc
    Restore Diff backup of the ‘CDCTest’ database.
    Restore Database CDCTest From Disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTest.bak'
        With Move 'CDCTest' To 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\CDCTest.mdf',
            Move 'CDCTest _log' To 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\DATA\CDCTest _log.LDF',
            Replace,
            NoRecovery;
    Go
    --restore differential database backup
    restore database CDCTest from disk = 'C:\Program Files\Microsoft SQL Server\MSSQL12.SQL2014\MSSQL\Backup\CDCTestdif.bak' with keep_cdc
    Add the Capture and Cleanup jobs in the CDCTest database.
    --add the Capture and Cleanup jobs
    Use CDCTest
    exec sys.sp_cdc_add_job 'capture'
    GO
    exec sys.sp_cdc_add_job 'cleanup'
    GO
    insert into Customer values('TEST'),('TEST1')
    -- Querying CDC table to get the changes
    select * from cdc.dbo_customer_CT
    Reference
    Track Data Changes (SQL Server)
    Restoring a SQL Server database that uses Change Data Capture
    Applies to
    SQL Server 2014
    SQL Server 2012
    SQL Server 2008 R2
    SQL Server 2008
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

  • How to change the default backup location?

    SQL Server puts backups in a default folder C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup
    Is there a way to change that to a different location?
    I'm using Smo.Backup object in my code to create backups. The backups I create are stored in that default folder, but I was hoping that I can change that default location without having to make code changes.
    Is that possible?
    thanks.

    SQL Server puts backups in a default folder C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup
    Is there a way to change that to a different location?
    I'm using Smo.Backup object in my code to create backups. The backups I create are stored in that default folder, but I was hoping that I can change that default location without having to make code changes.
    Is that possible?
    thanks.
    To read the value from the registry you can issue the following command:
    DECLARE  @BackupDirectory  VARCHAR ( 100 )
    EXEC  master.. xp_regread  @rootkey = 'HKEY_LOCAL_MACHINE' ,
       @key = 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.2\MSSQLServer' ,
       @value_name = 'BackupDirectory' ,
       @BackupDirectory = @BackupDirectory  OUTPUT
    SELECT  @BackupDirectory
    This will provide the following output, since we changed the value above directly in the registry.
    If we want to change this back to the default folder we can use the following command
    EXEC  master.. xp_regwrite
          @rootkey = 'HKEY_LOCAL_MACHINE' ,
          @key = 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.2\MSSQLServer' ,
          @value_name = 'BackupDirectory' ,
          @type = 'REG_SZ' ,
          @value = 'C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Backup'
    If we run this command again we can see that this has changed:
    DECLARE  @BackupDirectory  VARCHAR ( 100 )
    EXEC  master.. xp_regread  @rootkey = 'HKEY_LOCAL_MACHINE' ,
       @key = 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.2\MSSQLServer' ,
       @value_name = 'BackupDirectory' ,
       @BackupDirectory = @BackupDirectory  OUTPUT
    SELECT  @BackupDirectory
    To determine where SQL Server is installed you can right click on the server name, select Properties.  The root directory as highlighted below will show you the corresponding install name for the instance such as "MSSQL2" highlighted below, so you know which registry entry needs to be changed.

  • Error - Exclusive access could not be obtained because the database is in use

    I am actually trying to make a script (in Sql Server 2008) to restore one database from one backup file. I made the following code and I am getting an error -
    Msg 3101, Level 16, State 1, Line 3
    Exclusive access could not be obtained because
    the database is in use.
    Msg 3013, Level 16, State 1, Line 3
    RESTORE DATABASE is terminating abnormally.
    How do I fix this problem ?
    IF DB_ID('AdventureWorksDW') IS NOT NULL
    BEGIN
    RESTORE DATABASE [AdventureWorksDW]
    FILE = N'AdventureWorksDW_Data'
    FROM
    DISK = N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\Backup\AdventureWorksDW.bak'
    WITH FILE = 1,
    MOVE N'AdventureWorksDW_Data'
    TO N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\DATA\AdventureWorksDW.mdf',
    MOVE N'AdventureWorksDW_Log'
    TO N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\DATA\AdventureWorksDW_0.LDF',
    NOUNLOAD, STATS = 10
    END

    Check, if there are existing connections to the database you are restoring by following command
    select spid from sys.sysprocesses where dbid = db_id('AdventureWorksDW')
    if you see any existing connections then kill them by issuing KILL command Syntax for kill is
    KILL <SPID>
    once you see there are no more connections then 
    Use mastergoIF DB_ID('AdventureWorksDW') IS NOT NULL
    BEGIN
    RESTORE DATABASE [AdventureWorksDW]
    FILE = N'AdventureWorksDW_Data'
    FROM
    DISK = N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\Backup\AdventureWorksDW.bak'
    WITH FILE = 1,
    MOVE N'AdventureWorksDW_Data'
    TO N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\DATA\AdventureWorksDW.mdf',
    MOVE N'AdventureWorksDW_Log'
    TO N'C:\Program Files\Microsoft SQL Server\
    MSSQL10_50.SS2008\MSSQL\DATA\AdventureWorksDW_0.LDF',
    NOUNLOAD, STATS = 10
    END
    Mark as answer, if it works.

Maybe you are looking for

  • Multiple session open in SAP on JCO function call with setSAPGUI(2)

    Dear all I have a standalone java program, which is internally calling an SAP function using JCO 2.0. This SAP function is internally calling a tCode using ABAP4_CALL_TRANSACTION. I have set SAPGUI to 2.             mConnection =                    

  • 2 tier database application

    Hi J brothers, I am trying to build a 2 tier database application using java as a front end to run on a windows platform. I am not so familiar with java, what I want is to design a GUI (forms) using java which should query the back end database (MySQ

  • Quicktime plug in problem

    Ever since installing itunes and quicktime on my computer, Quicktime plug in is not loading when I'm on the internet. I just see a Q with a question mark. I have tried reinstalling Quicktime and itunes but the problem is still there. Please help!

  • Khols Charge Card Problem

    Applied online for Khols Charge Card. Got approved for $300 line. Got account number emailed and able to make first purchase. I wait til the next day and make a purchase online utilizing 80% of credit. Order goes through. The following morning get an

  • Button states not working

    I have created different button states on my buttons in Muse but none of them show up in the browser. The buttons are created using a webfont from Typekit so not sure if this is the problem or not. Does anyone know what the problem is here? Thanks!