Set Permissions for Roles via DTS

  • Is there a way to set permissions for a Role via a DTS package, possibly using an ActiveX Script?

    If so, what are the objects and properties necessary to accomplish this task.

    Thanks!!!

  • I would use the ExecuteSQL task, but if you use Active X, you would essentially use an ADODB Command object and a RECORDSet object and submit the SQL needed. You could use DMO if it were registered (likely would be), but that would be more complicated.

    Why not use Execute SQL?

    Steve Jones

    steve@dkranch.net

  • To further clarify...

    Simply use the following SQL statement to grant access to a Role:

    GRANT SELECT ON TableName_X TO RoleName_Y

    Place this SQL statement in the ExecuteSQL task within a DTS.

    Thanks for the help!!!

  • You are welcome. Glad it helped and it's the simplest way to do this. You can even use the Dynamic Properties task to "change" the statement based on some other values.

    Steve Jones

    steve@dkranch.net

Viewing 4 posts - 1 through 3 (of 3 total)

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