Are you the publisher? Claim or contact us about this channel

Embed this content in your HTML


Report adult content:

click to rate:

Account: (login)

More Channels

Channel Catalog

Channel Description:

Product Support and Discussion

older | 1 | .... | 5 | 6 | (Page 7) | 8 | 9 | .... | 36 | newer

    0 0

    I am looking to automate doing virtual restores on a number of databases after each nightly backup. The extended sp does this nicely, but it doesnt take advantage of the virtual restore feature -- too bad.

    Using native sql then for each database that I want to check, I need something like this:

    -- Script generated by Red Gate SQL Virtual Restore v2.4.0.164
    -- Multi-threaded SQL Backup backups are handled by repeating the DISK parameter in the RESTORE command, once for each thread used during the backup process.
    WITH MOVE N'MyDB_Data' TO N'F:\SQLBackup\MyDB\MyDB_MyDB_Virtual.vmdf',
    MOVE N'MyDB_Log' TO N'F:\SQLBackup\MyDB\MyDB_MyDB_Virtual.vldf',
    DBCC CHECKDB ([MyDB_Virtual])
    DROP DATABASE [MyDB_Virtual]

    Obviously, this script changes each night in terms of file names and, if for some reason, the number of threads used changes.

    So, is there something available that will generate this sort of sql given a database name and the folder that holds the full+diff backups?


    0 0

    Is the secondary database read-only, or read-write?

    0 0

    Standy/Read-only because it's the log shipping target.


    0 0

    Could you please post the contents of the SQL Backup log file for the restore process that failed? The default folder where the logs are stored is C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\<instance name> on Windows 2003 and older, and C:\ProgramData\Red Gate\SQL Backup\Log\<instance name> on Windows Vista and newer.

    0 0

    Here is the log. The names have been changed to protect the innocent. javascript:emoticon('Rolling Eyes') Failed_LS is the target database for the restore, and server2 is the Windows Server 2003 the instance is on.

    I included only a partial list of the connections that were listed because I didn't want to go through changing all of them. There are a number that are shown as connected to the database we are trying to restore to but immediately before i start the restore I kill all the connections to that database. The connections listed for the restore DB are therefore created in the intervening 6 hours that the restore is failing - i checked the last batch time for all of them.

    If you can figure out why it seems the restore still does not work despite the disconnect_existing, and my kill spids routine that would be a bonus. I've also tried having a trigger on the database to disallow any connections for 5 mins around the time the restore starts and that didn't work either.


    SQL Backup log file

    -SQL "RESTORE LOG [Failed_LS] FROM DISK = '\\server2\Failed_LS_Share\LOG_Failed_*.sqb' WITH ERASEFILES = 5, DISCONNECT_EXISTING, FILEOPTIONS = 1, STANDBY = 'I:\Failed_LS\UNDO_Failed_LS.dat', MOVETO = 'J:\Failed_LS\Completed' "

    ----------------------------- ERRORS AND WARNINGS -----------------------------

    2/10/2013 9:30:00 PM: Restoring Failed_LS (transaction logs) from:
    2/10/2013 9:30:00 PM: \\server2\Failed_LS_Share\LOG_Failed_20130209220000.sqb


    2/11/2013 4:19:40 AM: VDI error 1010: Failed to get the configuration from the server because the timeout interval has elapsed. Check that the SQL Server instance is running, that you have the SQL Server System Administrator server role; and that no other processes are blocking the backup or restore process; or try increasing the value of the VDITimeout registry setting in HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SQL Backup\BackupSettingsGlobal\[InstanceName]
    2/11/2013 4:19:40 AM: Also check that the database is not currently in use.
    2/11/2013 4:19:40 AM:
    2/11/2013 4:19:40 AM: SPID Status Login HostName BlkBy DBName Command CPUTime DiskIO LastBatch ProgramName SPID_1 REQUESTID
    2/11/2013 4:19:40 AM: ----- ------------------------------ -------------------------------------------------------- ---------- ----- ---------------- ---------------- ------- -------- -------------- ------------------------------------------------------------------------- ------ ---------
    2/11/2013 4:19:40 AM: 1 BACKGROUND sa . . RESOURCE MONITOR 1257406 26548 01/25 14:46:54 1 0
    2/11/2013 4:19:40 AM: 2 SUSPENDED sa . . LOG WRITER 2825296 0 01/25 14:46:54 2 0
    2/11/2013 4:19:40 AM: 3 BACKGROUND sa . . master SIGNAL HANDLER 0 0 01/25 14:46:54 3 0
    2/11/2013 4:19:40 AM: 4 BACKGROUND sa . . LOCK MONITOR 31 0 01/25 14:46:54 4 0
    2/11/2013 4:19:40 AM: 5 BACKGROUND sa . . LAZY WRITER 1626859 0 01/25 14:46:54 5 0
    2/11/2013 4:19:40 AM: 6 sleeping sa . . master TASK MANAGER 0 0 01/25 14:46:54 6 0
    2/11/2013 4:19:40 AM: 7 BACKGROUND sa . . master TRACE QUEUE TASK 11765 0 01/25 14:46:54 7 0
    2/11/2013 4:19:40 AM: 8 sleeping sa . . UNKNOWN TOKEN 0 0 01/25 14:46:54 8 0
    2/11/2013 4:19:40 AM: 9 BACKGROUND sa . . master BRKR TASK 0 0 01/25 14:46:54 9 0
    2/11/2013 4:19:40 AM: 10 BACKGROUND sa . . master CHECKPOINT 2473062 97776 01/25 14:46:54 10 0
    2/11/2013 4:19:40 AM: 11 BACKGROUND sa . . master TASK MANAGER 125 38 01/25 14:46:54 11 0
    2/11/2013 4:19:40 AM: 12 BACKGROUND sa . . master BRKR EVENT HNDLR 15 39 01/25 14:46:54 12 0
    2/11/2013 4:19:40 AM: 13 BACKGROUND sa . . master BRKR TASK 0 0 01/25 14:46:54 13 0
    2/11/2013 4:19:40 AM: 14 sleeping sa . . master TASK MANAGER 0 3 01/25 14:46:54 14 0
    2/11/2013 4:19:40 AM: 15 sleeping sa . . master TASK MANAGER 0 0 01/25 14:46:54 15 0
    2/11/2013 4:19:40 AM: 16 sleeping sa . . master TASK MANAGER 0 114 01/25 14:46:54 16 0
    2/11/2013 4:19:40 AM: 17 sleeping sa . . master TASK MANAGER 0 0 01/25 14:46:54 17 0
    2/11/2013 4:19:40 AM: 18 sleeping sa . . master TASK MANAGER 0 0 01/25 14:46:54 18 0
    2/11/2013 4:19:40 AM: 19 sleeping sa . . master TASK MANAGER 0 29 01/25 14:46:54 19 0


    2/11/2013 4:19:40 AM:
    2/11/2013 4:19:40 AM: SQL error 3013: RESTORE LOG is terminating abnormally.
    2/11/2013 4:19:40 AM: SQL error 3101: Exclusive access could not be obtained because the database is in use.

    0 0

    Does this question have to now be raised in a different forum?

    0 0

    By default, SQL Backup would only wait 30 seconds for SQL Server to start the restore, before it aborts the process. In this case, it waited almost 7 hours. What is the VDITimeout value in the HKEY_LOCAL_MACHINE\SOFTWARE\Red Gate\SQL Backup\BackupSettingsGlobal\[InstanceName] registry node?

    0 0

    The value is 24576 which would be 6.8 hours (I assume that is in seconds) so it seems to make sense. I have no idea why that would be set to such a high value. I switched it to 30 so we'll see what happens with that.



    0 0

    Thanks for your forum post. This does not need to be raised in a new post.

    The TSQL script that you have generated using the wizard is the correct one and should work fine for that specific backup. To dynamically generate the TSQL depending on the backup will require using variables to substitute the relevant values. Unfortunately we haven't written any TSQL that can do this at the moment.

    Please note this will need to be customised in your environment and depending on the number of threads, database structure the 'move syntax' will change as well.

    Thanks for your patience and feedback in this matter.

    0 0

    We added FusionIO cards to a database server. HP recommends changing the sector size from 512 to 4096 for SQL Server. We did that and moved our log files from DASD to the FusionIO cards. The backups are now 6 times larger but the database activity has not changed.

    Has anyone else experienced this?

    0 0

    Could you please post the contents of a SQL Backup log file for the backup of a transaction log that grew in size?

    The default folder where the logs are stored is C:\Documents and Settings\All Users\Application Data\Red Gate\SQL Backup\Log\<instance name> on Windows 2003 and older, and C:\ProgramData\Red Gate\SQL Backup\Log\<instance name> on Windows Vista and newer.

    Could you also please post the contents of a log file for a transaction log backup prior to the switch to FusionIO?


    0 0

    You might want to look at this KB
    You didn't mention what version of SQL or O/S you were running?



    0 0

    Do failed backups require rollback?
    Are multiple instances of process "SQBCoreService.exe " normal?

    One of our production servers was experiencing memory pressure which required intervention. The memory pressure was caused from SQL utilizing 31GB of 32GB when max memory was set to 28GB. (No other memory heavy programs/processes run from this box)

    I stopped the sql agent service.
    I stopped SQL Backup service. (redgate)
    Multiple backups were hung for over 3 hours. 2 FULL backups and 2 LOG backups.
    An attempt to kill the proccesses inside SQL resulted in a KILLED/ROLLBACK status for all 4 processes.

    Further investigation found multiple instances of process "SQBCoreService.exe "

    All other production servers (even during multiple backups) have only 1 instance of process "SQBCoreService.exe "

    Do failed backups require rollback?
    Are multiple instances of process "SQBCoreService.exe " normal?

    0 0

    I am running backups to a location with limited storage. Because these backups aren't exactly critical, I only need one backup file. I am setting the program to run and delete existing backup files except for the latest "1" and also with "delete prior to start of backup" enabled. However, when I run this, it keeps the last backup and causing space issues on the drive. How can I change the program to delete all backup files before the program runs? Can i change the step in the job within sql and set it to 0b instead of 1b?


    0 0

    I contacted support for this issue and we were unable to rectify the issue. I don't believe the underlying issue was caused by Redgate software. I will be reviewing the cause for the memory 'explosion'.

    We have scheduled an emergency server reboot this evening.

    I did learn that 1 process =SQBCoreService.exe is expected per SQL instance on the box. We only have a single instance, so 4 was abnormal, but no investigation was possible.

    Support also shared this ...unfortunately for my scenario it requires that SQL Backup Agent service be operational.

    Thanks for your call - to try and get the crash-log, do the following:

    USE master
    EXECUTE master..sqbutility 9997

    0 0

    I think you will get more assistance if you provide the code you are currently running.
    You can adjust database/server names for confidentiality.

    I know we had an issue with this some time back, but in recent versions no problems.

    Be sure to pay attention to any TAPE backup that may be picking up(locking) the previously created file.
    You should be able to rename the file as a test to see if it is locked.

    0 0

    Sure, below is the code,

    DECLARE @exitcode int
    DECLARE @sqlerrorcode int
    IF (@exitcode >= 500) OR (@sqlerrorcode <> 0)
    RAISERROR ('SQL Backup failed with exit code: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode)

    I also double checked and no tape backups are running or did run at the same time.

    0 0

    We use the erasefiles_atstart option with a value of 40h.
    This assumes we are running a daily backup (every 24 hours) and wish to always have at least 1 complete backup available on disk.

    If you wish to essentially overwrite the previous backup you can simply set this value to less than your expected backup schedule.

    So if you are running a daily backup, try

    erasefiles_atstart = 1h

    0 0

    Thanks epetro, I thought of something like that too. It's not super clean but it should work for our office.

    0 0

    Thanks for posting back the end result - and I'm glad you're up and running now!

older | 1 | .... | 5 | 6 | (Page 7) | 8 | 9 | .... | 36 | newer