xp_cmdshell

  • We have a little VB.NET windows application that allows the user to connect to SQL Server (based on credentials entered in the app), along with a backup folder name and if everything validates, it does a database backup. Works great until now.

    A customer has a SQL cluster. I'm told it's 2008R2.

    If you use the application on any server within the network, it works fine.

    If you use the application on a server outside the network, it connects fine but times out when it tries to execute this statement to determine if the backup folder location exists.

    EXECUTE master.dbo.xp_cmdshell 'if exist "T:\SQL_DB\Backup" echo FOUND'

    The customer is claiming that we need to include the server and instance names to make this work.

    EXECUTE [SQL1\MSS006].master.dbo.xp_cmdshell 'if exist "T:\SQL1_DB\Backup" echo FOUND'

    I have zero experience with clusters and servers in different networks. And, the customer only has this configuration in their production environment so I have limited access to it and certainly don't want to experiment in production.

    Are they right? Do we need to specify the server and instance names? If so, why is that?

    UPDATE: They are connecting using SQL authentication with a sql user that is in the sysadmin fixed server role.

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply