Is there any way of telling, using C#, if the Sql Server I'm connected to in Ado.Net is on the local machine rather than remote?
I'm wanting to know whether I have access to the file system where SQL Server stores, for example it's backup files. That would let me determine whether I would be able to delete a backup file programatically if I get SQL Server to create one. I have read about xp_cmdshell and such like, but I believe it's best to avoid them.