Skip to main content
Solved

Using CMDEXEC with SF_Mirror when xp_cmdshell is restricted

  • September 25, 2025
  • 1 reply
  • 45 views

Forum|alt.badge.img

We are upgrading from DBAMP v.4.1.8 to v.22.  Because we are restricted from using xp_cmdshell, most of our SQL Server Agent jobs run sf_replicate.  If I’m understanding the documentation correctly, we won’t be able to call sf_replicate directly on v.22.  

The CMDEXEC looks like this on 4.1.8:  '"C:\Program Files\DBAmp\DBAmpNet2.exe" replicate pkchunk,batchsize(25000) Account MyServerName  MyDatabase SALESFORCE'

Will the call have to look something like this on v.22?

 "C:\Program Files\CData\CData DBAmp\bin\DBAmpAZ.exe" MirrorCopy Account MyServerName MyDataBase SALESFORCE pkchunk,batchsize(25000)

 

 

Best answer by Ethem Q

Hi ​@nrapoza 

As you already know a good amount of DBAmp's stored procedures make use of xp_cmdshell. DBAmp normally uses xp_cmdshell to run the stored procedures, which usually requires sysadmin.  Indeed there is an option to run the DBAmp stored procedures without xp_cmdshell by calling the DBAmp app directly from the command line and that is available in v22 as well.

Here is documentation on SF_Mirror for example: https://cdn.cdata.com/help/AFH/dbampd/HowToRunTheSF_MirrorProcWithoutUsingxp_cmdshell.html

If you have any other questions, feel free to reach out to [email protected] with your query.

This topic has been closed for replies.

1 reply

Ethem Q
Forum|alt.badge.img
  • Employee
  • Answer
  • September 26, 2025

Hi ​@nrapoza 

As you already know a good amount of DBAmp's stored procedures make use of xp_cmdshell. DBAmp normally uses xp_cmdshell to run the stored procedures, which usually requires sysadmin.  Indeed there is an option to run the DBAmp stored procedures without xp_cmdshell by calling the DBAmp app directly from the command line and that is available in v22 as well.

Here is documentation on SF_Mirror for example: https://cdn.cdata.com/help/AFH/dbampd/HowToRunTheSF_MirrorProcWithoutUsingxp_cmdshell.html

If you have any other questions, feel free to reach out to [email protected] with your query.