BPC 10.0 - UJBR - Restore fails with msg - Connection reset by peer - Why?

Dear All,
I am trying to RESTORE an environment into BPC server and got the attached error message. It is strange as I have done this many times in the past... successfully. Not sure why it is behaving like this suddenly.
The error message is : Connection reset by peer.
With the same BPC server, I am able to BACKUP an environment, successfully(!!!).
Have any of you come across this before?
Pls. help to resolve this.
Thanks,
Peri

One point to note ...
I am using a new laptop now. Earlier, I was using another laptop using which, I have done backup and restore many times, successfully.
Even in the new laptop, backup is successful.
I have disabled Firewall at the machine. Still, there is no break through.
This has happened once before using old laptop and after a while, it was ok.
Is this because, some back ground job is running now?
Thanks,
Peri

Similar Messages

  • HT1212 I am unable to get our of a continuous cycle when trying to update or restore my iPad 2. Plug in to iTunes 12.0.1 (latest version). Click update, told can't update, have to restore. Restore fails with error 9. Any help appreciated.

    When I tried to update my iPad I got an error 9. Now, I am unable to access my iPad. It is in a continuous cycle when I try to update or restore the iPad 2. Plug in to iTunes 12.0.1 (latest version). Click update, told can't update, have to restore. Restore fails with error 9. Any help appreciated.
    Here's the cycle:
    I plug in my iPad when “cable to iTunes shows on iPad screen. It says "Your iPad can't be updated, you must restore it to factory settings." That bad enough news, but it gets worse.
    Click Restore
    Extracting software…
    Preparing iPad for restore
    Waiting for iPad…
    Verifying iPad restore with Apple…
    (empty bar under the Apple logo…does not show any activity)
    “The iPad “iPad” could not be restored. An unknown error occurred (9).”
    Notes: I just upgraded to OS X Yosemite 10.10.1 on my iMac (27-inch, Mid 2011) in the last week. It’s the first time I’m tried to backup/update my iPad since the iMac update.
    I swapped out the USB cable to a new cable and get the same results.
    I also unplugged all other USB devices from the iMac and security on my iPad and still get the same results.
    I find it strange that it shows no Serial number for my my iPad 2 when plugged in. It shows “Serial Number: n/a on the screen when it displays: “iPad Recovery Mode To update your iPad without erasing its contents, click Update. To restore your iPad to its factory settings, click Restore iPad.
    I prefer to update my iPad, but it displays “Your iPad can’t be updated, you must restore it to factory settings. If you previously backed up the iPad, click Restore Backup after the restore process completes.”
    It’s a continuous loop. I get the display on my iPad to plug in the iPad to iTunes, plug it in which ends after going through the above procedure saying an error occurred (9).
    So now I cannot use my iPad. When I turn it on I get the display showing me to plug it into iTunes with the cable. Since this is the only option I have I plug it in and the loop begins.
    Any advice would be appreciated.
    Thanks!

    Hello jaybearden,
    Thanks for the question. After reviewing your post, it sounds like you are not able to restore the iOS device since you get an error 9. I would recommend that you read this article, it may be able to help the issue.
    Resolve iOS update and restore errors - Apple Support
    Check your security software
    Related errors: 2, 4, 6, 9, 1000, 1611, 9006. Sometimes security software can prevent your device from communicating with either the Apple update server or with your device.
    Check your security software and settings to make sure that they aren't preventing a connection to the Apple servers.
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • My IPOD Touch initially had a white screen.  I tried correcting this by restoring default settings via ITunes.  The Restore Failed with error 1602 and now the IPOD touch is completely dead. It will not power on or respond when I plug it into my PC via USB

    My IPOD Touch initially had a white screen.  I tried correcting this by restoring default settings via ITunes.  The Restore Failed with error 1602 and now the IPOD touch is completely dead. It will not power on or respond when I plug it into my PC via USB.  I get an error on my PC stating that device attached to USB port is not recognizable.  Can anyone help?

    Error 1602: Try the following steps to resolve this error:
    Ensure proper USB isolation troubleshooting has been performed, and test with a known-good cable.
    Follow the steps listed for Error 1604.
    This error may be resolved by disabling, deactivating, or uninstalling third-party security, antivirus, and firewall software. See steps in this article for details on troubleshooting security software.
    Above from:
    http://support.apple.com/kb/TS3694

  • Restore fails with Finder error

    Been trying to restore my iPhoto Library (another can of worms) but the restore fails with the following error:
    "The Finder cannot completer the operation because some data in "iPhoto Library" could not be read or written. (Error code -36).
    I am trying to restore it after iPhoto "lost" all the images, even though I can see that everything is still there.
    This is very frustrating to say the least.

    Try doing a +*Repair Disk+* (not permissions) on your Time Machine drive via Disk Utility, in your Applications/Utilities folder.

  • Download and conversion fails with msg...."Must close dialogue box to continue."  I have no such box

    download and conersion of pdf to word fails with msg, "cannot download until you close dialogue box."  I have no such box open.  How to proceed?

    Hi,
    If you are using createPDF or exportPDF services, please submit your question to their forum at http://forums.adobe.com/community/createpdf.
    Thanks,
    Wenlan

  • Updated to OS5, restoration failed with error -50.

    I updated the phone to OS5. Restoration failed with an error -50.
    I lost all my contacts, email setup, photos and other configuration.
    How do I get back my contacts?

    same thing happenned to me.
    IOS5 installed fine, but the restore failed.
    Eventually, I just logged in as if it was a new phone. iTunes remembered my apps, but all the data is still gone.
    And then it backed up on me.
    I'm on a winxp box, and I had gone into C:\Documents and Settings\<username>\Application Data\Apple Computer
    and I copied it to another location. So perhaps, if they get this fixed, I can recover the items from this old location.
    but, to be honest, I have lost a whole day messing with this, and I am very annoyed.

  • Installing OS4 - restore fails with error message 1014 - 3GS unusable

    I tried to install OS4 on my 3GS iPhone. Process reported that a restore and update were required. The restore failed with error message 1014. This has rendered the phone unusable. Any help for me since Apple technicians from India weren't able to help.

    Anyone got this fixed, I also have the same problem. I got an error during update, then the iPhone went into Recovery Mode and iTunes says it has to be restored and updated, but the restore has taken over 15 hours know and Applecare told me to wait or come to an applestore... I'm on holiday in Europe and I have a 12 hour fligth in a few days back to the US...

  • SSL: Connection reset by peer ; Failed to enable crypto error while calling the report using bing API with SOAP client

    Hi,
    I am trying to fetch report using bing API and making a SOAP call for fetching the data. I get the following error:
    [Warning] fopen(): SSL: Connection reset by peer [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    02-04-2015 10:17:41 (BST) : [Warning] fopen(): Failed to enable crypto [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    02-04-2015 10:17:41 (BST) : [Warning] fopen(https://download.api.bingads.microsoft.com/ReportDownload/Download.aspx?q=rzr63XFt5qJduddohoIRyOYAP%2f1%2ftsnhk8L%2bzBmUpdU2CQlcUB98RpY%2bbOaLFFGMqAC4IUUadC%2fNdNnJqeVCY%2f%2bpy6noVsVA%2fMJp47a3Xb1VjABfKhcdKy6vqpgEdcQg%2fQZ7QcEpZ3bEloJjUtGpDquFk53BnkeHEPVWZkDYcsQegRz%2fpG4t4w6gKCCRmhArd6osr6ZU9CMJ3lbxtGXjcQEMPvP2apNyr9P%2fc8niyfWA2aBcm1aEmOLX2KL3aRJ4rz9N7gG7uBslVZH%2b4rUjHdB7CMkbb%2fHyHwvPTqGPbPCHnicefr%2b%2fDP70hlkBEGfyOOswK67%2bl1zh7CyIv%2bcMlaDsuDX1HeFf4uORfD41H1z7):
    failed to open stream: operation failed [file] /var/www/sites/psmedia/perfectstormmedia/tools/class/msn_api.class.php [line] 780
    Whenever I execute my script. Can you please let me know what we can do to solve this issue. The version of PHP we are using is 5.3.3 with open ssl. 

    Hi Shobha,
    I can't confirm what version of PHP you are using, but to err on the side of caution please use the version specified in the sample/SDK:
    PHP 5.4.14 has been installed from PHP.
    Here is our code examples:
    https://msdn.microsoft.com/en-US/library/bing-ads-overview-getting-started-php-with-web-services.aspx
    Thanks,
    Itai

  • Flash Player download keeps failing with lost connection and then gives up.  satellite Internet connection

    Win XP. Firefox 34.0.5 (latest)
    The Flash  Player download keeps failing with lost connection and then gives up.I am on a  satellite Internet connection.
    It seems to be extremely slow even when loading the installer which is only 1MB. Then when I run the installer and it starts to download the installation there are frequent messages about losing the connection and then finally gives up.
    I have had problems with other software failing when I am on a satellite link. This is most likely because of the huge latency which may be taken as a link failure. Ping times are typically 800ms but can be 2000ms sometimes!

    Hello,
    The online shim installer, which you are using actually downloads and installs Flash Player silently in the background.  If your satelite connection is experiencing latency issues it could result in the failure to download.  Please try the full installer posted at the bottom of the Installation problems | Flash Player | Windows page, in the 'Still having problems' section.
    Maria

  • SXPG_COMMAND_EXECUTE - Recv failed:Connection reset by peer

    We are calling external commands in a batch job using the SAP supplied function module SXPG_COMMAND_EXECUTE.  However, if the external command takes longer than 2 minutes (120 seconds) to execute the call to the external command is terminated (from the SAP perspective) with the message Recv failed:Connection reset by peer.  The termination is precisely at 120 seconds.  The external command, however, continues to run as an u201Corphanu201D task and finishes normally.  However, due to the connection termination, SAP is no longer aware of it.
    Do you have any ideas where the termination is occurring and/or where the wait limit of 120 seconds is set?

    CALL FUNCTION 'SXPG_COMMAND_EXECUTE'
        EXPORTING
          commandname                   = 'ZTEST_BATCH'
          additional_parameters         = param1
          operatingsystem               = castserveropsys
          targetsystem                  = target
          stdout                        = 'X'
          stderr                        = 'X'
          terminationwait               = 'X'
        IMPORTING
          status                        = funcstatus
        TABLES
          exec_protocol                 = iserveroutput[]
        EXCEPTIONS
          no_permission                 = 1
          command_not_found             = 2
          parameters_too_long           = 3
          security_risk                 = 4
          wrong_check_call_interface    = 5
          program_start_error           = 6
          program_termination_error     = 7
          x_error                       = 8
          parameter_expected            = 9
          too_many_parameters           = 10
          illegal_command               = 11
          wrong_asynchronous_parameters = 12
          cant_enq_tbtco_entry          = 13
          jobcount_generation_error     = 14
          OTHERS                        = 15.

  • BACKUP LOG suddenly failed with Msg 35250, Level 16, State 11 The connection to the primary replica is not active. The command cannot be processed.

    I have AlwaysOn SQL 2012 Enterprise set-up using Windows Failover Clustering Services (not FCI), and have 1 Primary node (P), 1 Synchronous Commit Auto Failover (SC), and 1 Asynchronous Commit Manual Failover (AC) node.  It is set up to prefer secondary,
    with the highest priority given to AC node.
    I am using Ola Hollengren's scripts for Database Maintenance jobs, including a native BACKUP LOG job for the transaction logs of all user databases on a 1 minute schedule.  His scripts already consider AlwaysOn, and although the job is set-up on all
    3 nodes, only ever runs on AC node.
    The job has been running successfully since initial set-up almost 1 year ago, but suddenly yesterday morning started to fail with the following error, only on 1 of the 13 databases in my availability group:
    Date and time: 2014-06-08 09:36:11
    Command: BACKUP LOG [my_db] TO DISK = N'E:\MSSQL\\Transaction Dumps\my_db\MySQLCL$MySQLAG_my_db_20140608_093610_U_LOG.trn' WITH CHECKSUM, COMPRESSION
    Msg 35250, Level 16, State 11, Server AC, Line 1
    The connection to the primary replica is not active.  The command cannot be processed.
    Msg 3013, Level 16, State 1, Server AC, Line 1
    BACKUP LOG is terminating abnormally.
    Outcome: Failed
    Duration: 00:01:00
    The other 12 databases continued to backup successfully.
    Checking the Availability Group dashboard, windows event logs, and SQL Server error logs, including Failover Cluster events showed no issues.
    However, monitoring software (Idera SQLdm) showed blocked sessions on P node.  When I ran sp_who2, it showed that a background process was being blocked by another background process with an HADR BACKUP LOCK.
    Since both processes were background processes, I was unable to kill either process.  I temporarily disabled the transaction log backup job, but the blocked process was still active.
    I ran DBCC CHECKDB (my_db) WITH all_errormsgs, no_infomsgs, data_purity on both P and AC nodes, with no errors.  However, on AC node, it also showed 1 transaction rolled forward and 0 transactions rolled back.  This also had the effect of releasing
    the blocked background process, but another background process was now blocking with the same HADR BACKUP LOCK.
    I tried to restart SQL Server Agent on AC node, which did not immediately seem to work.  However, after a few minutes, I noticed that the block had disappeared.  I re-enabled the transaction log backup job on AC and it started working normally
    again.  The error has not occurred again, but I am at a loss as to what happened, and how to prevent it from happening again.
    Any help would be greatly appreciated.
    Diane

    And here is part 2 of the stored procedure:
    --// Execute backup commands //--
    WHILE EXISTS (SELECT * FROM @tmpDatabases WHERE Selected = 1 AND Completed = 0)
    BEGIN
    SELECT TOP 1 @CurrentDBID = ID,
    @CurrentDatabaseName = DatabaseName,
    @CurrentDatabaseNameFS = DatabaseNameFS,
    @CurrentDatabaseType = DatabaseType
    FROM @tmpDatabases
    WHERE Selected = 1
    AND Completed = 0
    ORDER BY ID ASC
    SET @CurrentDatabaseID = DB_ID(@CurrentDatabaseName)
    IF DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') = 'ONLINE'
    BEGIN
    IF EXISTS (SELECT * FROM sys.database_recovery_status WHERE database_id = @CurrentDatabaseID AND database_guid IS NOT NULL)
    BEGIN
    SET @CurrentIsDatabaseAccessible = 1
    END
    ELSE
    BEGIN
    SET @CurrentIsDatabaseAccessible = 0
    END
    END
    ELSE
    BEGIN
    SET @CurrentIsDatabaseAccessible = 0
    END
    SELECT @CurrentDifferentialBaseLSN = differential_base_lsn
    FROM sys.master_files
    WHERE database_id = @CurrentDatabaseID
    AND [type] = 0
    AND [file_id] = 1
    -- Workaround for a bug in SQL Server 2005
    IF @Version >= 9 AND @Version < 10
    AND EXISTS(SELECT * FROM sys.master_files WHERE database_id = @CurrentDatabaseID AND [type] = 0 AND [file_id] = 1 AND differential_base_lsn IS NOT NULL AND differential_base_guid IS NOT NULL AND differential_base_time IS NULL)
    BEGIN
    SET @CurrentDifferentialBaseLSN = NULL
    END
    SELECT @CurrentDifferentialBaseIsSnapshot = is_snapshot
    FROM msdb.dbo.backupset
    WHERE database_name = @CurrentDatabaseName
    AND [type] = 'D'
    AND checkpoint_lsn = @CurrentDifferentialBaseLSN
    IF DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') = 'ONLINE'
    BEGIN
    SELECT @CurrentLogLSN = last_log_backup_lsn
    FROM sys.database_recovery_status
    WHERE database_id = @CurrentDatabaseID
    END
    SET @CurrentBackupType = @BackupType
    IF @ChangeBackupType = 'Y'
    BEGIN
    IF @CurrentBackupType = 'LOG' AND DATABASEPROPERTYEX(@CurrentDatabaseName,'Recovery') <> 'SIMPLE' AND @CurrentLogLSN IS NULL AND @CurrentDatabaseName <> 'master'
    BEGIN
    SET @CurrentBackupType = 'DIFF'
    END
    IF @CurrentBackupType = 'DIFF' AND @CurrentDifferentialBaseLSN IS NULL AND @CurrentDatabaseName <> 'master'
    BEGIN
    SET @CurrentBackupType = 'FULL'
    END
    END
    IF @CurrentBackupType = 'LOG'
    BEGIN
    SELECT @CurrentLatestBackup = MAX(backup_finish_date)
    FROM msdb.dbo.backupset
    WHERE [type] IN('D','I')
    AND is_damaged = 0
    AND database_name = @CurrentDatabaseName
    END
    IF @Version >= 11 AND @Cluster IS NOT NULL
    BEGIN
    SELECT @CurrentAvailabilityGroup = availability_groups.name,
    @CurrentAvailabilityGroupRole = dm_hadr_availability_replica_states.role_desc
    FROM sys.databases databases
    INNER JOIN sys.availability_databases_cluster availability_databases_cluster ON databases.group_database_id = availability_databases_cluster.group_database_id
    INNER JOIN sys.availability_groups availability_groups ON availability_databases_cluster.group_id = availability_groups.group_id
    INNER JOIN sys.dm_hadr_availability_replica_states dm_hadr_availability_replica_states ON availability_groups.group_id = dm_hadr_availability_replica_states.group_id AND databases.replica_id = dm_hadr_availability_replica_states.replica_id
    WHERE databases.name = @CurrentDatabaseName
    END
    IF @Version >= 11 AND @Cluster IS NOT NULL AND @CurrentAvailabilityGroup IS NOT NULL
    BEGIN
    SELECT @CurrentIsPreferredBackupReplica = sys.fn_hadr_backup_is_preferred_replica(@CurrentDatabaseName)
    END
    SELECT @CurrentDatabaseMirroringRole = UPPER(mirroring_role_desc)
    FROM sys.database_mirroring
    WHERE database_id = @CurrentDatabaseID
    IF EXISTS (SELECT * FROM msdb.dbo.log_shipping_primary_databases WHERE primary_database = @CurrentDatabaseName)
    BEGIN
    SET @CurrentLogShippingRole = 'PRIMARY'
    END
    ELSE
    IF EXISTS (SELECT * FROM msdb.dbo.log_shipping_secondary_databases WHERE secondary_database = @CurrentDatabaseName)
    BEGIN
    SET @CurrentLogShippingRole = 'SECONDARY'
    END
    -- Set database message
    SET @DatabaseMessage = 'Date and time: ' + CONVERT(nvarchar,GETDATE(),120) + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Database: ' + QUOTENAME(@CurrentDatabaseName) + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Status: ' + CAST(DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') AS nvarchar) + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Standby: ' + CASE WHEN DATABASEPROPERTYEX(@CurrentDatabaseName,'IsInStandBy') = 1 THEN 'Yes' ELSE 'No' END + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Updateability: ' + CAST(DATABASEPROPERTYEX(@CurrentDatabaseName,'Updateability') AS nvarchar) + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'User access: ' + CAST(DATABASEPROPERTYEX(@CurrentDatabaseName,'UserAccess') AS nvarchar) + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Is accessible: ' + CASE WHEN @CurrentIsDatabaseAccessible = 1 THEN 'Yes' ELSE 'No' END + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Recovery model: ' + CAST(DATABASEPROPERTYEX(@CurrentDatabaseName,'Recovery') AS nvarchar) + CHAR(13) + CHAR(10)
    IF @CurrentAvailabilityGroup IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Availability group: ' + @CurrentAvailabilityGroup + CHAR(13) + CHAR(10)
    IF @CurrentAvailabilityGroup IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Availability group role: ' + @CurrentAvailabilityGroupRole + CHAR(13) + CHAR(10)
    IF @CurrentAvailabilityGroup IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Is preferred backup replica: ' + CASE WHEN @CurrentIsPreferredBackupReplica = 1 THEN 'Yes' WHEN @CurrentIsPreferredBackupReplica = 0 THEN 'No' ELSE 'N/A' END + CHAR(13) + CHAR(10)
    IF @CurrentDatabaseMirroringRole IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Database mirroring role: ' + @CurrentDatabaseMirroringRole + CHAR(13) + CHAR(10)
    IF @CurrentLogShippingRole IS NOT NULL SET @DatabaseMessage = @DatabaseMessage + 'Log shipping role: ' + @CurrentLogShippingRole + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Differential base LSN: ' + ISNULL(CAST(@CurrentDifferentialBaseLSN AS nvarchar),'N/A') + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Differential base is snapshot: ' + CASE WHEN @CurrentDifferentialBaseIsSnapshot = 1 THEN 'Yes' WHEN @CurrentDifferentialBaseIsSnapshot = 0 THEN 'No' ELSE 'N/A' END + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = @DatabaseMessage + 'Last log backup LSN: ' + ISNULL(CAST(@CurrentLogLSN AS nvarchar),'N/A') + CHAR(13) + CHAR(10)
    SET @DatabaseMessage = REPLACE(@DatabaseMessage,'%','%%') + ' '
    RAISERROR(@DatabaseMessage,10,1) WITH NOWAIT
    IF DATABASEPROPERTYEX(@CurrentDatabaseName,'Status') = 'ONLINE'
    AND NOT (DATABASEPROPERTYEX(@CurrentDatabaseName,'UserAccess') = 'SINGLE_USER' AND @CurrentIsDatabaseAccessible = 0)
    AND DATABASEPROPERTYEX(@CurrentDatabaseName,'IsInStandBy') = 0
    AND NOT (@CurrentBackupType = 'LOG' AND (DATABASEPROPERTYEX(@CurrentDatabaseName,'Recovery') = 'SIMPLE' OR @CurrentLogLSN IS NULL))
    AND NOT (@CurrentBackupType = 'DIFF' AND @CurrentDifferentialBaseLSN IS NULL)
    AND NOT (@CurrentBackupType IN('DIFF','LOG') AND @CurrentDatabaseName = 'master')
    AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'FULL' AND @CopyOnly = 'N' AND (@CurrentAvailabilityGroupRole <> 'PRIMARY' OR @CurrentAvailabilityGroupRole IS NULL))
    AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'FULL' AND @CopyOnly = 'Y' AND (@CurrentIsPreferredBackupReplica <> 1 OR @CurrentIsPreferredBackupReplica IS NULL))
    AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'DIFF' AND (@CurrentAvailabilityGroupRole <> 'PRIMARY' OR @CurrentAvailabilityGroupRole IS NULL))
    AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'LOG' AND @CopyOnly = 'N' AND (@CurrentIsPreferredBackupReplica <> 1 OR @CurrentIsPreferredBackupReplica IS NULL))
    AND NOT (@CurrentAvailabilityGroup IS NOT NULL AND @CurrentBackupType = 'LOG' AND @CopyOnly = 'Y' AND (@CurrentAvailabilityGroupRole <> 'PRIMARY' OR @CurrentAvailabilityGroupRole IS NULL))
    AND NOT ((@CurrentLogShippingRole = 'PRIMARY' AND @CurrentLogShippingRole IS NOT NULL) AND @CurrentBackupType = 'LOG')
    BEGIN
    -- Set variables
    SET @CurrentDate = GETDATE()
    IF @CleanupTime IS NULL OR (@CurrentBackupType = 'LOG' AND @CurrentLatestBackup IS NULL) OR @CurrentBackupType <> @BackupType
    BEGIN
    SET @CurrentCleanupDate = NULL
    END
    ELSE
    IF @CurrentBackupType = 'LOG'
    BEGIN
    SET @CurrentCleanupDate = (SELECT MIN([Date]) FROM(SELECT DATEADD(hh,-(@CleanupTime),@CurrentDate) AS [Date] UNION SELECT @CurrentLatestBackup AS [Date]) Dates)
    END
    ELSE
    BEGIN
    SET @CurrentCleanupDate = DATEADD(hh,-(@CleanupTime),@CurrentDate)
    END
    SELECT @CurrentFileExtension = CASE
    WHEN @BackupSoftware IS NULL AND @CurrentBackupType = 'FULL' THEN 'bak'
    WHEN @BackupSoftware IS NULL AND @CurrentBackupType = 'DIFF' THEN 'bak'
    WHEN @BackupSoftware IS NULL AND @CurrentBackupType = 'LOG' THEN 'trn'
    WHEN @BackupSoftware = 'LITESPEED' AND @CurrentBackupType = 'FULL' THEN 'bak'
    WHEN @BackupSoftware = 'LITESPEED' AND @CurrentBackupType = 'DIFF' THEN 'bak'
    WHEN @BackupSoftware = 'LITESPEED' AND @CurrentBackupType = 'LOG' THEN 'trn'
    WHEN @BackupSoftware = 'SQLBACKUP' AND @CurrentBackupType = 'FULL' THEN 'sqb'
    WHEN @BackupSoftware = 'SQLBACKUP' AND @CurrentBackupType = 'DIFF' THEN 'sqb'
    WHEN @BackupSoftware = 'SQLBACKUP' AND @CurrentBackupType = 'LOG' THEN 'sqb'
    WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'FULL' AND @Encrypt = 'N' THEN 'hbc'
    WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'DIFF' AND @Encrypt = 'N' THEN 'hbc'
    WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'LOG' AND @Encrypt = 'N' THEN 'hbc'
    WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'FULL' AND @Encrypt = 'Y' THEN 'hbe'
    WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'DIFF' AND @Encrypt = 'Y' THEN 'hbe'
    WHEN @BackupSoftware = 'HYPERBAC' AND @CurrentBackupType = 'LOG' AND @Encrypt = 'Y' THEN 'hbe'
    WHEN @BackupSoftware = 'SQLSAFE' AND @CurrentBackupType = 'FULL' THEN 'safe'
    WHEN @BackupSoftware = 'SQLSAFE' AND @CurrentBackupType = 'DIFF' THEN 'safe'
    WHEN @BackupSoftware = 'SQLSAFE' AND @CurrentBackupType = 'LOG' THEN 'safe'
    END
    INSERT INTO @CurrentDirectories (ID, DirectoryPath, CreateCompleted, CleanupCompleted)
    SELECT ROW_NUMBER() OVER (ORDER BY ID), DirectoryPath + CASE WHEN RIGHT(DirectoryPath,1) = '\' THEN '' ELSE '\' END + CASE WHEN @CurrentBackupType = 'LOG' THEN '\Transaction Dumps\' + @CurrentDatabaseNameFS ELSE '' END, 0, 0
    FROM @Directories
    ORDER BY ID ASC
    SET @CurrentFileNumber = 0
    SET @CurrentMirrorFilePath = NULL
    WHILE @CurrentFileNumber < @NumberOfFiles
    BEGIN
    SET @CurrentFileNumber = @CurrentFileNumber + 1
    SELECT @CurrentDirectoryPath = DirectoryPath
    FROM @CurrentDirectories
    WHERE @CurrentFileNumber >= (ID - 1) * (SELECT @NumberOfFiles / COUNT(*) FROM @CurrentDirectories) + 1
    AND @CurrentFileNumber <= ID * (SELECT @NumberOfFiles / COUNT(*) FROM @CurrentDirectories)
    SET @CurrentFilePath = @CurrentDirectoryPath + '\' + CASE WHEN @CurrentAvailabilityGroup IS NOT NULL THEN @Cluster + '$' + @CurrentAvailabilityGroup ELSE REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') END + '_' + @CurrentDatabaseNameFS + '_' + REPLACE(REPLACE(REPLACE((CONVERT(nvarchar,@CurrentDate,120)),'-',''),' ','_'),':','') + CASE WHEN @NumberOfFiles > 1 AND @NumberOfFiles <= 9 THEN '_' + CAST(@CurrentFileNumber AS nvarchar) WHEN @NumberOfFiles >= 10 THEN '_' + RIGHT('0' + CAST(@CurrentFileNumber AS nvarchar),2) ELSE '' END + '_' + @CurrentDatabaseType + '_' + UPPER(@CurrentBackupType) + CASE WHEN @ReadWriteFileGroups = 'Y' THEN '_PARTIAL' ELSE '' END + CASE WHEN @CopyOnly = 'Y' THEN '_COPY_ONLY' ELSE '' END + '.' + @CurrentFileExtension
    IF LEN(@CurrentFilePath) > 257
    BEGIN
    SET @CurrentFilePath = @CurrentDirectoryPath + '\' + CASE WHEN @CurrentAvailabilityGroup IS NOT NULL THEN @Cluster + '$' + @CurrentAvailabilityGroup ELSE REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') END + '_' + LEFT(@CurrentDatabaseNameFS,CASE WHEN (LEN(@CurrentDatabaseNameFS) + 257 - LEN(@CurrentFilePath) - 3) < 20 THEN 20 ELSE (LEN(@CurrentDatabaseNameFS) + 257 - LEN(@CurrentFilePath) - 3) END) + '...' + '_' + REPLACE(REPLACE(REPLACE((CONVERT(nvarchar,@CurrentDate,120)),'-',''),' ','_'),':','') + CASE WHEN @NumberOfFiles > 1 AND @NumberOfFiles <= 9 THEN '_' + CAST(@CurrentFileNumber AS nvarchar) WHEN @NumberOfFiles >= 10 THEN '_' + RIGHT('0' + CAST(@CurrentFileNumber AS nvarchar),2) ELSE '' END + '_' + @CurrentDatabaseType + '_' + UPPER(@CurrentBackupType) + CASE WHEN @ReadWriteFileGroups = 'Y' THEN '_PARTIAL' ELSE '' END + CASE WHEN @CopyOnly = 'Y' THEN '_COPY_ONLY' ELSE '' END + '.' + @CurrentFileExtension
    END
    IF @CurrentFileNumber = 1 AND LEN(@MirrorDirectory) > 0
    BEGIN
    SET @CurrentMirrorFilePath = @MirrorDirectory + CASE WHEN RIGHT(@MirrorDirectory,1) = '\' THEN '' ELSE '\' END + CASE WHEN @CurrentBackupType = 'LOG' THEN '\Transaction Dumps\' + @CurrentDatabaseNameFS ELSE '' END + '\' + CASE WHEN @CurrentAvailabilityGroup IS NOT NULL THEN @Cluster + '$' + @CurrentAvailabilityGroup ELSE REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') END + '_' + @CurrentDatabaseNameFS + '_' + REPLACE(REPLACE(REPLACE((CONVERT(nvarchar,@CurrentDate,120)),'-',''),' ','_'),':','') + CASE WHEN @NumberOfFiles > 1 AND @NumberOfFiles <= 9 THEN '_' + CAST(@CurrentFileNumber AS nvarchar) WHEN @NumberOfFiles >= 10 THEN '_' + RIGHT('0' + CAST(@CurrentFileNumber AS nvarchar),2) ELSE '' END + '_' + @CurrentDatabaseType + '_' + UPPER(@CurrentBackupType) + CASE WHEN @ReadWriteFileGroups = 'Y' THEN '_PARTIAL' ELSE '' END + CASE WHEN @CopyOnly = 'Y' THEN '_COPY_ONLY' ELSE '' END + '.' + @CurrentFileExtension
    IF LEN(@CurrentFilePath) > 257
    BEGIN
    SET @CurrentMirrorFilePath = @MirrorDirectory + CASE WHEN RIGHT(@MirrorDirectory,1) = '\' THEN '' ELSE '\' END + CASE WHEN @CurrentBackupType = 'LOG' THEN '\Transaction Dumps\' + @CurrentDatabaseNameFS ELSE '' END + '\' + CASE WHEN @CurrentAvailabilityGroup IS NOT NULL THEN @Cluster + '$' + @CurrentAvailabilityGroup ELSE REPLACE(CAST(SERVERPROPERTY('servername') AS nvarchar),'\','$') END + '_' + LEFT(@CurrentDatabaseNameFS,CASE WHEN (LEN(@CurrentDatabaseNameFS) + 257 - LEN(@CurrentFilePath) - 3) < 20 THEN 20 ELSE (LEN(@CurrentDatabaseNameFS) + 257 - LEN(@CurrentFilePath) - 3) END) + '...' + '_' + REPLACE(REPLACE(REPLACE((CONVERT(nvarchar,@CurrentDate,120)),'-',''),' ','_'),':','') + CASE WHEN @NumberOfFiles > 1 AND @NumberOfFiles <= 9 THEN '_' + CAST(@CurrentFileNumber AS nvarchar) WHEN @NumberOfFiles >= 10 THEN '_' + RIGHT('0' + CAST(@CurrentFileNumber AS nvarchar),2) ELSE '' END + '_' + @CurrentDatabaseType + '_' + UPPER(@CurrentBackupType) + CASE WHEN @ReadWriteFileGroups = 'Y' THEN '_PARTIAL' ELSE '' END + CASE WHEN @CopyOnly = 'Y' THEN '_COPY_ONLY' ELSE '' END + '.' + @CurrentFileExtension
    END
    END
    INSERT INTO @CurrentFiles (CurrentFilePath)
    SELECT @CurrentFilePath
    SET @CurrentDirectoryPath = NULL
    SET @CurrentFilePath = NULL
    END
    -- Create directory
    WHILE EXISTS (SELECT * FROM @CurrentDirectories WHERE CreateCompleted = 0)
    BEGIN
    SELECT TOP 1 @CurrentDirectoryID = ID,
    @CurrentDirectoryPath = DirectoryPath
    FROM @CurrentDirectories
    WHERE CreateCompleted = 0
    ORDER BY ID ASC
    SET @CurrentCommandType01 = 'xp_create_subdir'
    SET @CurrentCommand01 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_create_subdir N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + ''' IF @ReturnCode <> 0 RAISERROR(''Error creating directory.'', 16, 1)'
    EXECUTE @CurrentCommandOutput01 = [dbo].[CommandExecute] @Command = @CurrentCommand01, @CommandType = @CurrentCommandType01, @Mode = 1, @DatabaseName = @CurrentDatabaseName, @LogToTable = @LogToTable, @Execute = @Execute
    SET @Error = @@ERROR
    IF @Error <> 0 SET @CurrentCommandOutput01 = @Error
    IF @CurrentCommandOutput01 <> 0 SET @ReturnCode = @CurrentCommandOutput01
    UPDATE @CurrentDirectories
    SET CreateCompleted = 1,
    CreateOutput = @CurrentCommandOutput01
    WHERE ID = @CurrentDirectoryID
    SET @CurrentDirectoryID = NULL
    SET @CurrentDirectoryPath = NULL
    SET @CurrentCommand01 = NULL
    SET @CurrentCommandOutput01 = NULL
    SET @CurrentCommandType01 = NULL
    END
    -- Perform a backup
    IF NOT EXISTS (SELECT * FROM @CurrentDirectories WHERE CreateOutput <> 0 OR CreateOutput IS NULL)
    BEGIN
    IF @BackupSoftware IS NULL
    BEGIN
    SELECT @CurrentCommandType02 = CASE
    WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'BACKUP_DATABASE'
    WHEN @CurrentBackupType = 'LOG' THEN 'BACKUP_LOG'
    END
    SELECT @CurrentCommand02 = CASE
    WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'BACKUP DATABASE ' + QUOTENAME(@CurrentDatabaseName)
    WHEN @CurrentBackupType = 'LOG' THEN 'BACKUP LOG ' + QUOTENAME(@CurrentDatabaseName)
    END
    IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ' READ_WRITE_FILEGROUPS'
    SET @CurrentCommand02 = @CurrentCommand02 + ' TO'
    SELECT @CurrentCommand02 = @CurrentCommand02 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand02 = @CurrentCommand02 + ' WITH '
    IF @CheckSum = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + 'CHECKSUM'
    IF @CheckSum = 'N' SET @CurrentCommand02 = @CurrentCommand02 + 'NO_CHECKSUM'
    IF @Compress = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COMPRESSION'
    IF @Compress = 'N' AND @Version >= 10 SET @CurrentCommand02 = @CurrentCommand02 + ', NO_COMPRESSION'
    IF @CurrentBackupType = 'DIFF' SET @CurrentCommand02 = @CurrentCommand02 + ', DIFFERENTIAL'
    IF @CopyOnly = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COPY_ONLY'
    IF @BlockSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BLOCKSIZE = ' + CAST(@BlockSize AS nvarchar)
    IF @BufferCount IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BUFFERCOUNT = ' + CAST(@BufferCount AS nvarchar)
    IF @MaxTransferSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', MAXTRANSFERSIZE = ' + CAST(@MaxTransferSize AS nvarchar)
    IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', DESCRIPTION = N''' + REPLACE(@Description,'''','''''') + ''''
    END
    IF @BackupSoftware = 'LITESPEED'
    BEGIN
    SELECT @CurrentCommandType02 = CASE
    WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'xp_backup_database'
    WHEN @CurrentBackupType = 'LOG' THEN 'xp_backup_log'
    END
    SELECT @CurrentCommand02 = CASE
    WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_backup_database @database = N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''''
    WHEN @CurrentBackupType = 'LOG' THEN 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_backup_log @database = N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''''
    END
    SELECT @CurrentCommand02 = @CurrentCommand02 + ', @filename = N''' + REPLACE(CurrentFilePath,'''','''''') + ''''
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand02 = @CurrentCommand02 + ', @with = '''
    IF @CheckSum = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + 'CHECKSUM'
    IF @CheckSum = 'N' SET @CurrentCommand02 = @CurrentCommand02 + 'NO_CHECKSUM'
    IF @CurrentBackupType = 'DIFF' SET @CurrentCommand02 = @CurrentCommand02 + ', DIFFERENTIAL'
    IF @CopyOnly = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COPY_ONLY'
    IF @BlockSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BLOCKSIZE = ' + CAST(@BlockSize AS nvarchar)
    SET @CurrentCommand02 = @CurrentCommand02 + ''''
    IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', @read_write_filegroups = 1'
    IF @CompressionLevel IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @compressionlevel = ' + CAST(@CompressionLevel AS nvarchar)
    IF @BufferCount IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @buffercount = ' + CAST(@BufferCount AS nvarchar)
    IF @MaxTransferSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @maxtransfersize = ' + CAST(@MaxTransferSize AS nvarchar)
    IF @Threads IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @threads = ' + CAST(@Threads AS nvarchar)
    IF @Throttle IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @throttle = ' + CAST(@Throttle AS nvarchar)
    IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @desc = N''' + REPLACE(@Description,'''','''''') + ''''
    IF @EncryptionType IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @cryptlevel = ' + CASE
    WHEN @EncryptionType = 'RC2-40' THEN '0'
    WHEN @EncryptionType = 'RC2-56' THEN '1'
    WHEN @EncryptionType = 'RC2-112' THEN '2'
    WHEN @EncryptionType = 'RC2-128' THEN '3'
    WHEN @EncryptionType = '3DES-168' THEN '4'
    WHEN @EncryptionType = 'RC4-128' THEN '5'
    WHEN @EncryptionType = 'AES-128' THEN '6'
    WHEN @EncryptionType = 'AES-192' THEN '7'
    WHEN @EncryptionType = 'AES-256' THEN '8'
    END
    IF @EncryptionKey IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @encryptionkey = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
    SET @CurrentCommand02 = @CurrentCommand02 + ' IF @ReturnCode <> 0 RAISERROR(''Error performing LiteSpeed backup.'', 16, 1)'
    END
    IF @BackupSoftware = 'SQLBACKUP'
    BEGIN
    SET @CurrentCommandType02 = 'sqlbackup'
    SELECT @CurrentCommand02 = CASE
    WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'BACKUP DATABASE ' + QUOTENAME(@CurrentDatabaseName)
    WHEN @CurrentBackupType = 'LOG' THEN 'BACKUP LOG ' + QUOTENAME(@CurrentDatabaseName)
    END
    IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ' READ_WRITE_FILEGROUPS'
    SET @CurrentCommand02 = @CurrentCommand02 + ' TO'
    SELECT @CurrentCommand02 = @CurrentCommand02 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand02 = @CurrentCommand02 + ' WITH '
    IF @CheckSum = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + 'CHECKSUM'
    IF @CheckSum = 'N' SET @CurrentCommand02 = @CurrentCommand02 + 'NO_CHECKSUM'
    IF @CurrentBackupType = 'DIFF' SET @CurrentCommand02 = @CurrentCommand02 + ', DIFFERENTIAL'
    IF @CopyOnly = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COPY_ONLY'
    IF @CompressionLevel IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', COMPRESSION = ' + CAST(@CompressionLevel AS nvarchar)
    IF @Threads IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', THREADCOUNT = ' + CAST(@Threads AS nvarchar)
    IF @MaxTransferSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', MAXTRANSFERSIZE = ' + CAST(@MaxTransferSize AS nvarchar)
    IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', DESCRIPTION = N''' + REPLACE(@Description,'''','''''') + ''''
    IF @EncryptionType IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', KEYSIZE = ' + CASE
    WHEN @EncryptionType = 'AES-128' THEN '128'
    WHEN @EncryptionType = 'AES-256' THEN '256'
    END
    IF @EncryptionKey IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', PASSWORD = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
    SET @CurrentCommand02 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.sqlbackup N''-SQL "' + REPLACE(@CurrentCommand02,'''','''''') + '"''' + ' IF @ReturnCode <> 0 RAISERROR(''Error performing SQLBackup backup.'', 16, 1)'
    END
    IF @BackupSoftware = 'HYPERBAC'
    BEGIN
    SET @CurrentCommandType02 = 'BACKUP_DATABASE'
    SELECT @CurrentCommand02 = CASE
    WHEN @CurrentBackupType IN('DIFF','FULL') THEN 'BACKUP DATABASE ' + QUOTENAME(@CurrentDatabaseName)
    WHEN @CurrentBackupType = 'LOG' THEN 'BACKUP LOG ' + QUOTENAME(@CurrentDatabaseName)
    END
    IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ' READ_WRITE_FILEGROUPS'
    SET @CurrentCommand02 = @CurrentCommand02 + ' TO'
    SELECT @CurrentCommand02 = @CurrentCommand02 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand02 = @CurrentCommand02 + ' WITH '
    IF @CheckSum = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + 'CHECKSUM'
    IF @CheckSum = 'N' SET @CurrentCommand02 = @CurrentCommand02 + 'NO_CHECKSUM'
    IF @CurrentBackupType = 'DIFF' SET @CurrentCommand02 = @CurrentCommand02 + ', DIFFERENTIAL'
    IF @CopyOnly = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', COPY_ONLY'
    IF @BlockSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BLOCKSIZE = ' + CAST(@BlockSize AS nvarchar)
    IF @BufferCount IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', BUFFERCOUNT = ' + CAST(@BufferCount AS nvarchar)
    IF @MaxTransferSize IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', MAXTRANSFERSIZE = ' + CAST(@MaxTransferSize AS nvarchar)
    IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', DESCRIPTION = N''' + REPLACE(@Description,'''','''''') + ''''
    END
    IF @BackupSoftware = 'SQLSAFE'
    BEGIN
    SET @CurrentCommandType02 = 'xp_ss_backup'
    SET @CurrentCommand02 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_ss_backup @database = N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''''
    SELECT @CurrentCommand02 = @CurrentCommand02 + ', ' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) = 1 THEN '@filename' ELSE '@backupfile' END + ' = N''' + REPLACE(CurrentFilePath,'''','''''') + ''''
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    IF @CurrentMirrorFilePath IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @mirrorfile = N''' + @CurrentMirrorFilePath + ''''
    SET @CurrentCommand02 = @CurrentCommand02 + ', @backuptype = ' + CASE WHEN @CurrentBackupType = 'FULL' THEN '''Full''' WHEN @CurrentBackupType = 'DIFF' THEN '''Differential''' WHEN @CurrentBackupType = 'LOG' THEN '''Log''' END
    IF @ReadWriteFileGroups = 'Y' SET @CurrentCommand02 = @CurrentCommand02 + ', @readwritefilegroups = 1'
    SET @CurrentCommand02 = @CurrentCommand02 + ', @checksum = ' + CASE WHEN @CheckSum = 'Y' THEN '1' WHEN @CheckSum = 'N' THEN '0' END
    SET @CurrentCommand02 = @CurrentCommand02 + ', @copyonly = ' + CASE WHEN @CopyOnly = 'Y' THEN '1' WHEN @CopyOnly = 'N' THEN '0' END
    IF @CompressionLevel IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @compressionlevel = ' + CASE WHEN @CompressionLevel = 5 THEN N'ispeed' WHEN @CompressionLevel = 6 THEN N'isize' ELSE CAST(@CompressionLevel AS nvarchar) END
    IF @RetryWrites IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @retrywrites = N''' + @RetryWrites + ''''
    IF @Threads IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @threads = ' + CAST(@Threads AS nvarchar)
    IF @Description IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @desc = N''' + REPLACE(@Description,'''','''''') + ''''
    IF @EncryptionType IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @encryptiontype = N''' + CASE
    WHEN @EncryptionType = 'AES-128' THEN 'AES128'
    WHEN @EncryptionType = 'AES-256' THEN 'AES256'
    END + ''''
    IF @EncryptionKey IS NOT NULL SET @CurrentCommand02 = @CurrentCommand02 + ', @encryptedbackuppassword = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
    SET @CurrentCommand02 = @CurrentCommand02 + ' IF @ReturnCode <> 0 RAISERROR(''Error performing SQLsafe backup.'', 16, 1)'
    END
    EXECUTE @CurrentCommandOutput02 = [dbo].[CommandExecute] @Command = @CurrentCommand02, @CommandType = @CurrentCommandType02, @Mode = 1, @DatabaseName = @CurrentDatabaseName, @LogToTable = @LogToTable, @Execute = @Execute
    SET @Error = @@ERROR
    IF @Error <> 0 SET @CurrentCommandOutput02 = @Error
    IF @CurrentCommandOutput02 <> 0 SET @ReturnCode = @CurrentCommandOutput02
    END
    -- Verify the backup
    IF @CurrentCommandOutput02 = 0 AND @Verify = 'Y'
    BEGIN
    IF @BackupSoftware IS NULL
    BEGIN
    SET @CurrentCommandType03 = 'RESTORE_VERIFYONLY'
    SET @CurrentCommand03 = 'RESTORE VERIFYONLY FROM'
    SELECT @CurrentCommand03 = @CurrentCommand03 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand03 = @CurrentCommand03 + ' WITH '
    IF @CheckSum = 'Y' SET @CurrentCommand03 = @CurrentCommand03 + 'CHECKSUM'
    IF @CheckSum = 'N' SET @CurrentCommand03 = @CurrentCommand03 + 'NO_CHECKSUM'
    END
    IF @BackupSoftware = 'LITESPEED'
    BEGIN
    SET @CurrentCommandType03 = 'xp_restore_verifyonly'
    SET @CurrentCommand03 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_restore_verifyonly'
    SELECT @CurrentCommand03 = @CurrentCommand03 + ' @filename = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand03 = @CurrentCommand03 + ', @with = '''
    IF @CheckSum = 'Y' SET @CurrentCommand03 = @CurrentCommand03 + 'CHECKSUM'
    IF @CheckSum = 'N' SET @CurrentCommand03 = @CurrentCommand03 + 'NO_CHECKSUM'
    SET @CurrentCommand03 = @CurrentCommand03 + ''''
    IF @EncryptionKey IS NOT NULL SET @CurrentCommand03 = @CurrentCommand03 + ', @encryptionkey = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
    SET @CurrentCommand03 = @CurrentCommand03 + ' IF @ReturnCode <> 0 RAISERROR(''Error verifying LiteSpeed backup.'', 16, 1)'
    END
    IF @BackupSoftware = 'SQLBACKUP'
    BEGIN
    SET @CurrentCommandType03 = 'sqlbackup'
    SET @CurrentCommand03 = 'RESTORE VERIFYONLY FROM'
    SELECT @CurrentCommand03 = @CurrentCommand03 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand03 = @CurrentCommand03 + ' WITH '
    IF @CheckSum = 'Y' SET @CurrentCommand03 = @CurrentCommand03 + 'CHECKSUM'
    IF @CheckSum = 'N' SET @CurrentCommand03 = @CurrentCommand03 + 'NO_CHECKSUM'
    IF @EncryptionKey IS NOT NULL SET @CurrentCommand03 = @CurrentCommand03 + ', PASSWORD = N''' + REPLACE(@EncryptionKey,'''','''''') + ''''
    SET @CurrentCommand03 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.sqlbackup N''-SQL "' + REPLACE(@CurrentCommand03,'''','''''') + '"''' + ' IF @ReturnCode <> 0 RAISERROR(''Error verifying SQLBackup backup.'', 16, 1)'
    END
    IF @BackupSoftware = 'HYPERBAC'
    BEGIN
    SET @CurrentCommandType03 = 'RESTORE_VERIFYONLY'
    SET @CurrentCommand03 = 'RESTORE VERIFYONLY FROM'
    SELECT @CurrentCommand03 = @CurrentCommand03 + ' DISK = N''' + REPLACE(CurrentFilePath,'''','''''') + '''' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) <> @NumberOfFiles THEN ',' ELSE '' END
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand03 = @CurrentCommand03 + ' WITH '
    IF @CheckSum = 'Y' SET @CurrentCommand03 = @CurrentCommand03 + 'CHECKSUM'
    IF @CheckSum = 'N' SET @CurrentCommand03 = @CurrentCommand03 + 'NO_CHECKSUM'
    END
    IF @BackupSoftware = 'SQLSAFE'
    BEGIN
    SET @CurrentCommandType03 = 'xp_ss_verify'
    SET @CurrentCommand03 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_ss_verify @database = N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''''
    SELECT @CurrentCommand03 = @CurrentCommand03 + ', ' + CASE WHEN ROW_NUMBER() OVER (ORDER BY CurrentFilePath ASC) = 1 THEN '@filename' ELSE '@backupfile' END + ' = N''' + REPLACE(CurrentFilePath,'''','''''') + ''''
    FROM @CurrentFiles
    ORDER BY CurrentFilePath ASC
    SET @CurrentCommand03 = @CurrentCommand03 + ' IF @ReturnCode <> 0 RAISERROR(''Error verifying SQLsafe backup.'', 16, 1)'
    END
    EXECUTE @CurrentCommandOutput03 = [dbo].[CommandExecute] @Command = @CurrentCommand03, @CommandType = @CurrentCommandType03, @Mode = 1, @DatabaseName = @CurrentDatabaseName, @LogToTable = @LogToTable, @Execute = @Execute
    SET @Error = @@ERROR
    IF @Error <> 0 SET @CurrentCommandOutput03 = @Error
    IF @CurrentCommandOutput03 <> 0 SET @ReturnCode = @CurrentCommandOutput03
    END
    -- Delete old backup files
    IF (@CurrentCommandOutput02 = 0 AND @Verify = 'N' AND @CurrentCleanupDate IS NOT NULL)
    OR (@CurrentCommandOutput02 = 0 AND @Verify = 'Y' AND @CurrentCommandOutput03 = 0 AND @CurrentCleanupDate IS NOT NULL)
    BEGIN
    WHILE EXISTS (SELECT * FROM @CurrentDirectories WHERE CleanupCompleted = 0)
    BEGIN
    SELECT TOP 1 @CurrentDirectoryID = ID,
    @CurrentDirectoryPath = DirectoryPath
    FROM @CurrentDirectories
    WHERE CleanupCompleted = 0
    ORDER BY ID ASC
    IF @BackupSoftware IS NULL
    BEGIN
    SET @CurrentCommandType04 = 'xp_delete_file'
    SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_delete_file 0, N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + ''', ''' + @CurrentFileExtension + ''', ''' + CONVERT(nvarchar(19),@CurrentCleanupDate,126) + ''' IF @ReturnCode <> 0 RAISERROR(''Error deleting files.'', 16, 1)'
    END
    IF @BackupSoftware = 'LITESPEED'
    BEGIN
    SET @CurrentCommandType04 = 'xp_slssqlmaint'
    SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_slssqlmaint N''-MAINTDEL -DELFOLDER "' + REPLACE(@CurrentDirectoryPath,'''','''''') + '" -DELEXTENSION "' + @CurrentFileExtension + '" -DELUNIT "' + CAST(DATEDIFF(mi,@CurrentCleanupDate,GETDATE()) + 1 AS nvarchar) + '" -DELUNITTYPE "minutes" -DELUSEAGE'' IF @ReturnCode <> 0 RAISERROR(''Error deleting LiteSpeed backup files.'', 16, 1)'
    END
    IF @BackupSoftware = 'SQLBACKUP'
    BEGIN
    SET @CurrentCommandType04 = 'sqbutility'
    SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.sqbutility 1032, N''' + REPLACE(@CurrentDatabaseName,'''','''''') + ''', N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + ''', ''' + CASE WHEN @CurrentBackupType = 'FULL' THEN 'D' WHEN @CurrentBackupType = 'DIFF' THEN 'I' WHEN @CurrentBackupType = 'LOG' THEN 'L' END + ''', ''' + CAST(DATEDIFF(hh,@CurrentCleanupDate,GETDATE()) + 1 AS nvarchar) + 'h'', ' + ISNULL('''' + REPLACE(@EncryptionKey,'''','''''') + '''','NULL') + ' IF @ReturnCode <> 0 RAISERROR(''Error deleting SQLBackup backup files.'', 16, 1)'
    END
    IF @BackupSoftware = 'HYPERBAC'
    BEGIN
    SET @CurrentCommandType04 = 'xp_delete_file'
    SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_delete_file 0, N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + ''', ''' + @CurrentFileExtension + ''', ''' + CONVERT(nvarchar(19),@CurrentCleanupDate,126) + ''' IF @ReturnCode <> 0 RAISERROR(''Error deleting files.'', 16, 1)'
    END
    IF @BackupSoftware = 'SQLSAFE'
    BEGIN
    SET @CurrentCommandType04 = 'xp_ss_delete'
    SET @CurrentCommand04 = 'DECLARE @ReturnCode int EXECUTE @ReturnCode = [master].dbo.xp_ss_delete @filename = N''' + REPLACE(@CurrentDirectoryPath,'''','''''') + '\*.' + @CurrentFileExtension + ''', @age = ''' + CAST(DATEDIFF(mi,@CurrentCleanupDate,GETDATE()) + 1 AS nvarchar) + 'Minutes'' IF @ReturnCode <> 0 RAISERROR(''Error deleting SQLsafe backup files.'', 16, 1)'
    END
    EXECUTE @CurrentCommandOutput04 = [dbo].[CommandExecute] @Command = @CurrentCommand04, @CommandType = @CurrentCommandType04, @Mode = 1, @DatabaseName = @CurrentDatabaseName, @LogToTable = @LogToTable, @Execute = @Execute
    SET @Error = @@ERROR
    IF @Error <> 0 SET @CurrentCommandOutput04 = @Error
    IF @CurrentCommandOutput04 <> 0 SET @ReturnCode = @CurrentCommandOutput04
    UPDATE @CurrentDirectories
    SET CleanupCompleted = 1,
    CleanupOutput = @CurrentCommandOutput04
    WHERE ID = @CurrentDirectoryID
    SET @CurrentDirectoryID = NULL
    SET @CurrentDirectoryPath = NULL
    SET @CurrentCommand04 = NULL
    SET @CurrentCommandOutput04 = NULL
    SET @CurrentCommandType04 = NULL
    END
    END
    END
    -- Update that the database is completed
    UPDATE @tmpDatabases
    SET Completed = 1
    WHERE Selected = 1
    AND Completed = 0
    AND ID = @CurrentDBID
    -- Clear variables
    SET @CurrentDBID = NULL
    SET @CurrentDatabaseID = NULL
    SET @CurrentDatabaseName = NULL
    SET @CurrentBackupType = NULL
    SET @CurrentFileExtension = NULL
    SET @CurrentFileNumber = NULL
    SET @CurrentDifferentialBaseLSN = NULL
    SET @CurrentDifferentialBaseIsSnapshot = NULL
    SET @CurrentLogLSN = NULL
    SET @CurrentLatestBackup = NULL
    SET @CurrentDatabaseNameFS = NULL
    SET @CurrentDatabaseType = NULL
    SET @CurrentDate = NULL
    SET @CurrentCleanupDate = NULL
    SET @CurrentIsDatabaseAccessible = NULL
    SET @CurrentAvailabilityGroup = NULL
    SET @CurrentAvailabilityGroupRole = NULL
    SET @CurrentIsPreferredBackupReplica = NULL
    SET @CurrentDatabaseMirroringRole = NULL
    SET @CurrentLogShippingRole = NULL
    SET @CurrentCommand02 = NULL
    SET @CurrentCommand03 = NULL
    SET @CurrentCommandOutput02 = NULL
    SET @CurrentCommandOutput03 = NULL
    SET @CurrentCommandType02 = NULL
    SET @CurrentCommandType03 = NULL
    DELETE FROM @CurrentDirectories
    DELETE FROM @CurrentFiles
    END
    --// Log completing information //--
    Logging:
    SET @EndMessage = 'Date and time: ' + CONVERT(nvarchar,GETDATE(),120)
    SET @EndMessage = REPLACE(@EndMessage,'%','%%')
    RAISERROR(@EndMessage,10,1) WITH NOWAIT
    IF @ReturnCode <> 0
    BEGIN
    RETURN @ReturnCode
    END
    END
    GO
    ALTER AUTHORIZATION ON [dbo].[DatabaseBackup] TO SCHEMA OWNER
    GO
    Diane

  • Restoration Fails with HP recovery disk. Will ordinary retail copy of WIn8 install OK?

    I'm having weeks of pain trying to restore an HP Envy m6 that failed a couple of days outside its warranty.
    I've tried reinstalling from the original recovery partition and recovery disks burnt from the original recovery partition.
    These both failed with the error.  Detect some error during PININST_BBV
    Diagnostic checks suggested the Hard disk might be failing so I've replaced it and bought a new set of HP Recovery disks which HP believed would solve the issue. However I get the same error. Detect some error during PININST_BBV
    The installation in all cases appears to have gone fine.
    I strongly suspect the HP recovery process is faulty but HP want to charge be a 34 pounds just to speak to someone for a few minutes.
    Does anyone know if I can install an ordinary copy of windows 8 bought in a retail store instead?
    The product key seems to be buried in the BIOS at the moment and I don't know if that will affect activation if I try to install a non-OEM version
    Any anwers on help on the original problem would be greatly appreciated.
    This question was solved.
    View Solution.

    I'm sorry, I really don't have a clue how to exclude Fingerprint driver from Recovery.
    =============================
    You should't have to worry about Activation. The BIOS key should work with the Windows 8 you installed from ISO download. Actually the install should have checked for and pulled the key already.
    =============================
    Any drivers you need should be posted on the Support page for the laptop.Get your full Model number or Product number from the Service Tag attached to bottom of laptop (may be under battery)
    How Do I Find My Model Number or Product Number
     Once you have the info,  use the button at top of this page titled "Support", then click "Download drivers" from the menu. Enter your Product Number. After entering PN click 'Go". On the next page use the dropdown menu to select your Operating System, click Next. A list will populate with drivers/software.
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • Please help !!! After installing 3.1.1 restore failing with error code 2002

    Hi All,
    I bought my ipod touch 8GB and received on 24th Sep 2009. On the same day at around 18:30, I downloaded itunes in my laptop (IBM ThinkPad - Win XP OS).
    Everything was fine, I did sync my ipod with itunes. After an hour or so, I got a popup in my itunes to download a latest software update which was OS 3.1.1, I guess. I downloaded that and it took almost 80 minutes. Then I connected my ipod to the laptop, itunes throwed an alert saying
    "itunes has detected an ipod in recovery mode. You must restore this ipod before it can be used with iTunes."
    But restore is failing with restore error code 2002. I tried 44 times with all the guidelines mentioned in Apple support site. Restarted ipod, laptop, complete uninstall of itunes and every software, reinstalled itunes and everything, switch between different USB ports and tried everything but nothing worked.The ipod always shows the connect to itunes symbol and nothing else. Alas!! I am writing this. It is seriously very discouraging for the apple product users. I had high hopes with apple’s products. I could not use my new ipod even for an hour.
    Please help. The below log is being created after every failure.
    I know the below log can help the software guys in finding the issue
    2009-09-26 21:29:38.438 iTunes.exe[2248:160]: restore library built Aug 24 2009 11:22:55
    2009-09-26 21:29:38.438 iTunes.exe[2248:160]: iTunes: iTunes 9.0.1.8
    2009-09-26 21:29:38.438 iTunes.exe[2248:160]: iTunes: Software payload version: 7C145
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: iTunes: Specifying UOI boot image
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: phoning home to gs.apple.com:80
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: ApECID
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: ApChipID
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: ApBoardID
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: ApProductionMode
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: ApSecurityDomain
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: UniqueBuildID
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: @Locality
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: RestoreLogo
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: RestoreDeviceTree
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: RestoreKernelCache
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: RestoreRamDisk
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: iBEC
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: iBSS
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: KernelCache
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: BatteryLow1
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: BatteryLow0
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: LLB
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: iBoot
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: DeviceTree
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: BatteryCharging1
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: BatteryCharging
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: AppleLogo
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: BatteryPlugin
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: BatteryFull
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: BatteryCharging0
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: RecoveryMode
    2009-09-26 21:29:38.539 iTunes.exe[2248:7d4]: tssaddentry: NeedService
    2009-09-26 21:29:40.932 iTunes.exe[2248:7d4]: received tss response
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: _AMRUSBDeviceSendDeviceRequest: CreateFile failed for \\?\USB#VID05AC&PID1281#{ED82A167-D61A-4AF6-9AB6-11E52236C576}\IB0000#c8be590a, error 1450
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: command device request for 'getenv build-version' failed: 2002
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: _AMRUSBDeviceSendDeviceRequest: CreateFile failed for \\?\USB#VID05AC&PID1281#{ED82A167-D61A-4AF6-9AB6-11E52236C576}\IB0000#c8be590a, error 1450
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: command device request for 'getenv build-style' failed: 2002
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: <Recovery Mode Device 09363F98>: operation 44 progress -1
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: _AMRUSBDeviceSendDeviceRequest: CreateFile failed for \\?\USB#VID05AC&PID1281#{ED82A167-D61A-4AF6-9AB6-11E52236C576}\IB0000#c8be590a, error 1450
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: command device request for 'getenv radio-error' failed: 2002
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: radio-error not set
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: unable to open device_map.txt: No such file or directory
    2009-09-26 21:29:52.088 iTunes.exe[2248:20d8]: <Recovery Mode Device 09363F98>: production fused device
    2009-09-26 21:29:52.108 iTunes.exe[2248:20d8]: _AMRUSBInterfaceOpen failed for \\?\USB#VID05AC&PID1281#{ED82A167-D61A-4AF6-9AB6-11E52236C576}\IB0000#c8be590a: 1450
    2009-09-26 21:29:52.108 iTunes.exe[2248:20d8]: <Recovery Mode Device 09363F98>: Recovery mode failed (result = 2002)
    2009-09-26 21:29:56.645 iTunes.exe[2248:160]: iTunes: Restore error 2002
    Thanks in advance, seriously awaiting for your positive response.
    Regards,

    THe network access account is needed for accessing network resources during the task sequence or software distribution.  During OSD, there may not be a computer account yet for the system to use to access the content.  You need to set the NAA.
    http://technet.microsoft.com/en-us/library/hh427337.aspx
    Jeff

  • ITunes Network Diags pass, but Restore fails with Error 3014 and recommended solutions risky and unhelpful

    We've had routine OS updates fail recently (weeks apart)
    on both an iPad mini and a 5th Gen iPod. The devices ended up in recovery mode
    and we had to Restore them to factory defaults.
    That is bad enough, but it gets worse...
    We started iTunes, plugged in the bricked device, and were
    prompted to do a Restore. Clicked OK. It ran for a while, completed the
    extraction step, and the failed with unknown error 3014.
    We searched support, and there is plenty written about
    unknown error 3014 when doing a Restore. Most point to network connectivity
    issues and things like blocked ports or conflicting security software. Sure, I
    can see how those could cause problems that may be outside Apple’s control
    (although doing everything over HTTPS would eliminate the issue.)
    BUT, iTunes has built in network diagnostics (Help ->
    Run Diagnostics… -> Network connectivity tests). Shouldn’t these tell me if
    there is a connectivity problem with iTunes? The support articles all seem to
    tell you to manually dive into all kinds of low level  things such as hosts files.
    iTunes network diagnostics all passed, but out of
    desperation, we still tried shutting off our anti-virus (Avast) and firewall
    (Comodo), connecting directly to the internet without our router blocking or
    filtering anything, editing the hosts file, trying a different PC, etc. as
    instructed. It was all a wild goose chase – nothing helped, and Apple’s
    instructions exposed us to security risks (attaching directly to the Internet
    with no router, firewall or ant-virus software!)
    I can’t be 100% sure because I still had our anti-virus
    SW and firewall turned off, but what seemed to finally work was to just try
    dozens of times until iTunes and Apple’s servers finally worked!
    After dozens of tries on two PCs over two days, the last
    thing I did was to turn off our anti-virus and firewall again, started iTunes,
    plugged in the device, attempted a Restore when prompted, retried when it
    failed. Then closed and reopened iTunes while leaving the device attached, and
    Restored when prompted. That one time, we got lucky and it worked. I’m sure
    many people really have blocked ports, etc. but I can’t see how that could explain
    our problems. Hopefully this posting will help someone.
    ** Apple – If you’re reading this ** Please (1) find out
    why we and others in the forums report persistent 3014 errors that seem to
    magically go away if you retry often enough over a long enough period of time,
    and (2) make sure the iTunes network diagnostics are truly thorough, and then
    direct customers to them rather than making them dig through port mapping
    settings and hosts files. Thanks for your consideration.
    This is a terrible user experience – Please address this!
    A few of the refs I found:
    http://support.apple.com/en-us/HT201413
    http://support.apple.com/en-us/HT203875
    http://support.apple.com/en-us/HT202944
    https://discussions.apple.com/message/20645785#20645785

    P.S.  Here is a copy of one of our update logs that iTunes optionally sends back to Apple when a failure occurs, etc. (We let several of these be sent in) There are several errors near the end, including an "Internal error"
    iPodUpdater 1 2015-01-01.log
    2015-01-01 21:42:12.948 [7316:1c4c]: restore library built Oct  7 2014 at 14:24:11
    2015-01-01 21:42:12.948 [7316:1c4c]: iTunes: iTunes 12.0.1.26
    2015-01-01 21:42:12.948 [7316:1c4c]: iTunes: Software payload version: 12B440
    2015-01-01 21:42:12.948 [7316:1c4c]: iTunes: Using MobileRestore state machine
    [02:42:23.0846] Changing state from '(null)' to 'Restoring'
    [02:42:23.0846] requested restore behavior: Erase
    [02:42:23.0861] requested restore behavior: Erase
    [02:42:23.0861] requested variant: Erase
    [02:42:23.0861] requested restore behavior: Erase
    [02:42:24.0532] amai: _AMAuthInstallBundleCreateServerRequestDictionary: withApTicket is True
    [02:42:24.0532] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "RestoreLogo" Digest = "<CFData 085DB3E0 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0548] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "RestoreDeviceTree" Digest = "<CFData 085DB938 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0548] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "RestoreKernelCache" Digest = "<CFData 085DB6B0 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0548] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "RestoreRamDisk" Digest = "<CFData 085DB308 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0548] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "iBEC" Digest = "<CFData 085DB278 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0548] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "iBSS" Digest = "<CFData 085DB350 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0548] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "KernelCache" Digest = "<CFData 085DB110 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0548] amai: _AMAuthInstallBundleCreateServerRequestDictionary: entry "ftap" not part of manifest, skipping
    [02:42:24.0548] amai: _AMAuthInstallBundleCreateServerRequestDictionary: entry "rfta" not part of manifest, skipping
    [02:42:24.0563] amai: _AMAuthInstallBundleCreateServerRequestDictionary: entry "ftsp" not part of manifest, skipping
    [02:42:24.0563] amai: _AMAuthInstallBundleCreateServerRequestDictionary: entry "rfts" not part of manifest, skipping
    [02:42:24.0563] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "BatteryCharging0" Digest = "<CFData 085DB1A0 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0563] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "BatteryLow1" Digest = "<CFData 085DB7D0 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0563] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "AppleLogo" Digest = "<CFData 085DB4B8 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0563] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "DeviceTree" Digest = "<CFData 085DB5D8 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0563] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "BatteryCharging1" Digest = "<CFData 085DB668 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0563] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "BatteryPlugin" Digest = "<CFData 085DB740 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0579] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "LLB" Digest = "<CFData 085DB428 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0579] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "iBoot" Digest = "<CFData 085DB1E8 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0579] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "BatteryFull" Digest = "<CFData 085DB470 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0579] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "RecoveryMode" Digest = "<CFData 085DB500 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0579] amai: _AMAuthInstallBundleCreateServerRequestDictionary: personalizing "BatteryLow0" Digest = "<CFData 085DB6F8 [7253907C]>{length = 20, capacity = 20, bytes = 0x<<<<<<<<<<<<<<<<<<UDID>>>>>>>>>>>>>>>>>>}"
    [02:42:24.0579] amai: _AMAuthInstallBundleCreateServerRequestDictionary: using UniqueBuildID <CFData 085AD430 [7253907C]>{length = 20, capacity = 20, bytes = 0xb4a53a00140f136ddf267a31b6d37652a4452586}
    [02:42:24.0579] amai: AMAuthInstallRequestSendSync: SSO function returned NULL and no SSO token was provided, SSO disabled.
    [02:42:24.0704] amai: tss_submit_job: HttpEndRequest failed=12031
    [02:42:24.0704] amai: AMAuthInstallRequestSendSync: failed tss submission: Internal error
    [02:42:24.0704] amai: AMAuthInstallApCreatePersonalizedResponse: server request error: Internal error
    [02:42:24.0704] amai: AMAuthInstallBundlePersonalizePartial: failed to create ap ticket
    [02:42:24.0719] failed to personalize the restore bundle: Internal error
    [02:42:24.0719] AMRAuthInstallDeletePersonalizedBundle
    [02:42:24.0782] Restore completed, status:3014
    [02:42:24.0782] Failure Description:
    [02:42:24.0782] Depth:0 Error:Failed to copy preflight options during recovery mode restore.

  • Failed to Update iPhone 4 to 4.2.1 - Subsequent Restore Fails with Error 10

    Wanted to update an unbreaked iPhone 4 with the formerly current software version on a MacBook Pro with MacOS 10.6.5 and iTunes 10.1 (54) to iOS 4.2.1.
    The first Software Update failed as well as multiple tries to restore the iPhone with error 10. Last lines in the iPhoneUpdater.log are always the same:
    2010-11-22 22:29:31.000 iTunes[284:12e23]: <Restore Device 0x1be57580>: operation 18 progress 91
    2010-11-22 22:29:31.000 iTunes[284:12e23]: <Restore Device 0x1be57580>: operation 18 progress 100
    2010-11-22 22:29:41.000 iTunes[284:12e23]: <Restore Device 0x1be57580>: operation 46 progress -1
    2010-11-22 22:29:41.000 iTunes[284:12e23]: <Restore Device 0x1be57580>: operation 46 progress -1
    2010-11-22 22:29:41.000 iTunes[284:12e23]: <Restore Device 0x1be57580>: operation 19 progress -1
    2010-11-22 22:29:42.000 iTunes[284:12e23]: unexpected data type 'BasebandData' in data request message
    2010-11-22 22:29:42.000 iTunes[284:12e23]: AMRAuthInstallDeletePersonalizedBundle
    2010-11-22 22:29:42.000 iTunes[284:12e23]: removed personalized bundle
    2010-11-22 22:29:42.000 iTunes[284:12e23]: <Restore Device 0x1be57580>: Restore failed (result = 10)
    2010-11-22 22:29:43.000 iTunes[284:fb73]: iTunes: Restore error 10
    2010-11-22 22:29:50.000 iTunes[284:207]: device connected (isDFU = 0)
    2010-11-22 22:29:50.000 iTunes[284:207]: iTunes: SCEP 1
    What I did so far:
    - Repaired access rights multiple times
    - Rebooted the Mac multiple times
    - Tried another user on the Mac
    - Deleted the "iPhone3,14.2.1_8C148Restore.ipsw" and downloaded it again.
    What else can I do in order to get the device working? Or shall I better go and take it to a Apple Service Partner?
    Regards
    ccll1

    FIRST disable your antivirus and firewall, that's a common cause of error 13. This is from Apple's troubleshooting tip:
    Error 13 and 14: These errors are typically resolved by performing one of more of the steps listed below:
    +1. Perform USB isolation troubleshooting, including a different USB port directly on the computer.+
    +2. Put a [powered] USB 2.0 hub between the device and the computer.+
    +3. Try a different USB 30-pin dock connector cable.+
    +4. Eliminate third-party security software conflicts.+
    +5. There may be third-party software installed that modifies your default packet size in Windows by inserting one or more TcpWindowSize entries into your Registry. If your default packet size is set incorrectly it can cause this error. Contact the manufacturer of the software that installed the packet size modification for assistance.+
    +6. Connect your computer directly to your Internet source, bypassing any routers, hubs, or switches. You may need to restart your computer and modem to get online.+
    +7. Try to restore from another known-good computer and network.+

Maybe you are looking for

  • Vendor open items aging list - Reg.

    Hi, My client is requesting a transaction in SAP which can be used to produce a Vendor open items aging list and the output should be exactly the same as it is for the Customer open items aging List (transaction S_ALR_87012178). Moreover, It is essen

  • What happened to my contacts list in Yosemite mail

    I use to have a pull down list of contacts that I could pick and choose (holding down the Command Key) several addressees.  I can't find that pull down list.  Selecting the + only allows one selection at a time, not several.

  • [10.6.8]App Store Quit Unexpectedly

    I am trying to update to Mavericks. I open the App Store and it quits unexpectedly. It then gives me this error: Process:         App Store [289] Path:            /Applications/App Store.app/Contents/MacOS/App Store Identifier:      com.apple.appstor

  • Problem with UE ZXKKEU11 in ECC 6.0

    Hi Guys, I have a problem with UE ZXKKEU11. When it was called from VA01 during material insert, the structure i_copa_item is empty and I don't know why. Have you got any suggestion??? Thank you in advance for any useful answer If you could I need he

  • How to clear planned depreciation amount

    We had a purchase order that was incorrectly coded to post to an asset account, instead of an AUC, so when invoice receipt was processed, the asset was posted with the value.   This asset was capitalized in Aug 2006 (although the first depreciation w