I have seen that there are similar questions like this but I tried all of them and my problem still exist. I want to backup a db.
- I created a shared folder on NAS
- I can reach this shared folder from windows explorer on DB server like
\\10.1.1.x\yedek_db
. I can create and delete files in this folder. - I checked all the services related to SQL Server. Previously they were running using network service account and I changed it to domain administrator (which has full access to the NAS folders) and restarted the services.
I executed the following command on command line
net use H: \\10.1.1.x\yedek_db
to map the NAS folder to
H:
. After this I can reach that folder by typingh:
.I created a backup device on SQL Server which is named
NAS_YEDEK_DB
. The drop and create script is below.IF EXISTS (SELECT name FROM master.dbo.sysdevices WHERE name = N'NAS_YEDEK_DB') EXEC master.dbo.sp_dropdevice @logicalname = N'NAS_YEDEK_DB' GO EXEC master.dbo.sp_addumpdevice @devtype = N'disk', @logicalname = N'NAS_YEDEK_DB', @physicalname = N'H:\' GO
I try to backup using this backup device by the following code:
BACKUP DATABASE evrak TO NAS_YEDEK_DB WITH DESCRIPTION = 'Test DB Backup';
But I get this error :
Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'NAS_YEDEK_DB(H:\)
'. Operating system error 3(failed to retrieve text for this error. Reason: 15105).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
I will be very happy if I can solve this problem.