We help IT Professionals succeed at work.

backup MSSQL 7 database to network device?

hulken
hulken asked
on
How can I backup a mssql database to a network device?

I have tried to map another share as k: and try to backup the database there but it don't seems to work...

Comment
Watch Question

Guy Hengel [angelIII / a3]Billing Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
You have to define a backup device, pointing to the share, and then backup to the device instead to the share directly.

CHeers

Commented:
1)destination - file
2)Press 'Add'
3)type path and files (for example \\MyComputer\MySharedFolder\MyBackupFile)
4)Pres 'OK'

Author

Commented:
I tried this:

On sql server.

Map Network Drive.

\\machine\backup  to k:

Then I go into SQLManager and RightClick at the database.


Destination

Press Add

type
k:\backup.bak

or

\\machine\backup\backup.bak

Then Click ok

It don't work.

Yes \\machine\backup is set to be shared and allow for everyone.

Author

Commented:
Angle:

I also tried to:

Add.

BackupDevice (new device)

In the Name i filled in Test
and as destination

I tried both k:\backup.bak

or \\machine\backup\backup.bak

Neither works.
Brendt HessSenior DBA
CERTIFIED EXPERT

Commented:
If you want to back up to a disk, you can use syntax like this in the SQL call:

BACKUP DATABASE [MyDatabase] TO DISK = 'K:\Mybackup.dat' WITH INIT,SKIP

This will create a file called Mybackup.dat on the K drive.  Of course, the drive letter and filename can be changed.

To restore from this backup:

RESTORE DATABASE [MyDatabase] FROM Disk='K:\MyBackup.dat' With Recovery, Replace

Commented:
Make sure your SQL Server service is running under a "specific" user account that has privilages on the network share. If you use System account or LocalSystem account, you will not be able to backup to network devices. You can check what account the service is running under from Control Panel--Services--MSSQLServer--Startup or from SQL EM, SQL Server Properties Security tab.

Author

Commented:
Thnks... that was the problem

Explore More ContentExplore courses, solutions, and other research materials related to this topic.