I'm creating a (simple) job to restore DB1 > DB2 (sql2k):
p:\backup\DB1.sqb is ok.
DECLARE @exitcode int
DECLARE @sqlerrorcode int
exec master..sqlbackup N'-SQL "RESTORE DATABASE DB2 FROM DISK = ''P:\backup\DB1.sqb'' WITH RECOVERY, REPLACE"' , @exitcode OUTPUT, @sqlerrorcode OUTPUT
IF (@exitcode <>0) OR (@sqlerrorcode <> 0)
BEGIN
RAISERROR ('Restore job failed with exitcode: %d SQL error code: %d', 16, 1, @exitcode, @sqlerrorcode)
END
and outpout file return :
Job 'RestoreJob' : Step 1, 'restore' : Began Executing 2006-03-21 14:00:43
SQL Backup (DLL v4.1.0.207)
--------------------------------------------------------------------------------------------------------------------------------
Restoring rDB2 (database) from:
P:\backup\DB1.sqb
VDI error 1010: Failed to get configuration from server. Check that the SQL Server instance is running, and that you have the
SQL Server Systems Administrator server role. Error code: (-2139684861: The api was waiting and the timeout interval had
elapsed.)
SQL error 3013: RESTORE DATABASE is terminating abnormally.
SQL error 3101: Exclusive access could not be obtained because the database is in use.
SQL Backup exit code: 1010
SQL error code: 3101
name value
---------------------------------------------------------------- exitcode 1010
sqlerrorcode 3101
filename01 P:\backup\DB1.sqb
Msg 50000, Sev 16: Restore job failed with exitcode: 1010 SQL error code: 3101 [SQLSTATE 42000]
can you help me?
thanks
p:\backup\DB1.sqb is ok.
and outpout file return :
can you help me?
thanks