Backup_Restore
Database
3
Posts
2
Posters
0
Views
1
Watching
-
- EXEC sp_addumpdevice 'DISK','XYZ', 'c:\abc.bak' BACKUP DATABASE student_database TO XYZ WITH DESCRIPTION='def', STATS RESTORE DATABASE student_database FROM XYZ WITH DBO_ONLY, NORECOVERY, STATS EXEC SP_DBOPTION student_database,'dbo use only','false' ------------- After executing these query,when "use student_database" ---- Error message is =the database is in middle of processing...cannot use.. 2) I also want to delete sp_addumpdevice--"XYZ" and "abc.bak" after completing the task. If I delete manually the abc.bak from device, then also when going to use "EXEC sp_addumpdevice 'DISK','XYZ','c:\abc.bak'"---error message will come as it already exist. How can i solve this.
-
- EXEC sp_addumpdevice 'DISK','XYZ', 'c:\abc.bak' BACKUP DATABASE student_database TO XYZ WITH DESCRIPTION='def', STATS RESTORE DATABASE student_database FROM XYZ WITH DBO_ONLY, NORECOVERY, STATS EXEC SP_DBOPTION student_database,'dbo use only','false' ------------- After executing these query,when "use student_database" ---- Error message is =the database is in middle of processing...cannot use.. 2) I also want to delete sp_addumpdevice--"XYZ" and "abc.bak" after completing the task. If I delete manually the abc.bak from device, then also when going to use "EXEC sp_addumpdevice 'DISK','XYZ','c:\abc.bak'"---error message will come as it already exist. How can i solve this.
simworld wrote:
RESTORE DATABASE student_database FROM XYZ WITH DBO_ONLY, NORECOVERY, STATS
You restore the database with the 'NORECOVERY'-option - this means that the database remains offline and in recovery-mode (normally used within database-mirroring). Remove this option and the first error-message should disappear.
-
simworld wrote:
RESTORE DATABASE student_database FROM XYZ WITH DBO_ONLY, NORECOVERY, STATS
You restore the database with the 'NORECOVERY'-option - this means that the database remains offline and in recovery-mode (normally used within database-mirroring). Remove this option and the first error-message should disappear.