SQL Server Backup to Network Share Across Different Active Directory Domains Using Cross-Network Access
0
votes
1
answer
42
views
I have two separate Active Directory domains (FOO and BAA)
A dedicated backup server with S.O Windows exists in the FOO domain.
A SQL Server instance in the BAA domain needs to store backups on this.
The BAA SQL Server accesses the NAS via a dedicated network interface (192.168.137.1). (cross cable)
The NAS has a shared folder: '\\192.168.137.1\Backup'
From Windows Explorer on the BAA SQL Server, I can create and delete files in this share.
However, when I run the following backup script in SQL Server Agent:
DECLARE @DATA CHAR(255)
SELECT @DATA = N'\\192.168.137.1\db_backup_test.bak'
BACKUP DATABASE [test_database]
TO DISK = @DATA
WITH NOFORMAT, INIT,
NAME = N'FULL BACKUP',
SKIP, NOREWIND, NOUNLOAD, STATS = 10
GO
I get an error:
Executed as user: {I tried many users here}. Cannot open backup device '\192.168.137.1\backup\Acesso.bak'. Operating system error 5 (Access is denied.).
I tried to enable access for users on the backup server (both in sharing and security), but since they are not from the same domain, the users do not appear.
Since the administrator user of the machine with SQL Server can create and delete files through Windows Explorer, I tried changing the logon of the user in the SQL Agent service to this user.
I also tried assigning a drive letter to the path using net use z: \\192.168.137.1\backup (both with and without setting users), but the SQL Agent cannot find the Z: drive.
is there a way?
Asked by LegsNotHands
(1 rep)
Jan 6, 2025, 07:34 PM
Last activity: Jan 7, 2025, 01:22 PM
Last activity: Jan 7, 2025, 01:22 PM