rajprabuit (8/7/2012)
Sir,I Want to backup sql server file in remote hard disk directly.But sql server takes only internal drives as backup location.
Someone help me to solve this problem
DO you mean like some $80 external hard drive you bought at Best Buy? Or something a little better like a READYNAS or even much better SAN?
What version of SQL server are you using and do you use any 3rd-party backup compression software?
The reason I ask is most software compression tools add in network resiliency (to avoid lost packets/network interruptions, etc)
I don't see any reason not to back up a database to an external location (providing it's a sound/hardware-wise storage location), in fact, I back up hundreds of them (up to compressed 200GB in size) all the time and rarely have issues.
I do get the odd blip...but I get notified and then just rerun the job - in the vent the kind of location you are talking about it a "Best Buy" type of solution, I'd agree with everyone else 😉
BACKUP DATABASE [F1Settings] TO DISK = N'\Networkstorage\backupfolder\servername\MyBackup.bak' WITH NOFORMAT, NOINIT,
NAME = N'MyDBBackup-Full', SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
DECLARE @backupSetId AS int
SELECT
@backupSetId = position
FROM
msdb..backupset
WHERE
database_name = N'MyDBBackup'
AND backup_set_id = (SELECT
MAX(backup_set_id)
FROM
msdb..backupset
WHERE
database_name = N'MyDBBackup')
IF @backupSetId IS NULL
BEGIN
RAISERROR(N'Verify failed. Backup information for database ''MyDBBackup'' not found.', 16, 1)
END
RESTORE VERIFYONLY FROM DISK = N'\Networkstorage\backupfolder\servername\MyBackup.bak' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience