I want to back up other computers' databases on my network to a network-shared folder on its C:\ disk remotely, the shared folder is only open to its own user.
It works fine if I give everyone permission to the shared folder, but I need to restrict it and I don't know how to do the code part.
If you want to take a backup copy of the database in a network path, the User that started the SQL Server service must have write access to that shared folder in the network path. Otherwise you will get an access denied error.