Is there any way I can achieve this? I have full control over the local and the remote server.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I got it right you trying to execute xp_fileexist with a network path to access a remote server for example:
exec master.dbo.xp_fileexist "\\another_server\path\file"The main reason if you can’t do it – Your SQLSERVER service is running under the LOCALSYSTEM account. This account is a local computer account and has no access to network (though as I know there is a way to grant access to share folder on server2 to localsystem from server1 account). So If you configure your SQL server service to run under DOMIAN\USER you can run above command and get right results. Also beware if you run your SQL server under domain account it will be a hole in your domain security system as soon if a user has access to your SQL server it can remotely execute XP_CMDSHELL ….
I just tested it under SQL server 2000 running under localsystem and then reconfigured to run under domain account.