I am trying to use SSIS to take a backup of Replication scripts. I am using Script task and using ReplicationServer class under Microsoft.SqlServer.Replication.

The problem is, the package is failing at ReplicationServer.Script(ScriptOptions.Creation) statement with exception "You do not have sufficient permission to run this command."

Does anyone know what kind of permissions are required?


User who runs the package must have access to the folder to which you are writing the file. User also needs access to SQL Server with sysadmin rights.

Also, verify you have properly added all libraries.

For more, please read my blog article at http://www.dbadrive.in/2013/03/ssis-package-to-backup-replication_25.html.

Please share some more details of your code if the error persists.

| improve this answer | |
  • When you are suggesting your own material for reading, please disclose that it's yours. – Andriy M Apr 22 '16 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.