community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
SOLVED

How to prohibit "Drop table" and permit "Truncate table" on SQL Server

Highlighted
Meteor

Hi. We use both Alteryx and SQL Server.

When I use Output Data tool to delete & insert data, we have two output options as follows.


1.Overwrite table (Drop)
  With my understanding, this option works as "Drop & Create Table".
2.Delete Data & Append
  This option works as "Truncate Table".

 

When I select "Overwrite table (Drop)", the table definition has changed unexpectedly.
Therefore, I want to distinguish drop and truncate as authority.

Can anyone tell me how do I authorize users to prohibit "Drop table" and permit "Truncate table" on SQL Server ?

Alteryx
Alteryx

Hi there

 

I don't think you can prohibit the users to select the specific Output Option.  But, you can set the permissions on the database side.  That way even if the user selects the Drop Table option, then this action won't be executed and will fail on error.

Meteor

Thank you for your reply.
Do you know how to set the permissions on the database side?

Alteryx
Alteryx

You can use the GRANT PERMISSIONS way (https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-object-permissions-transact-sql?view=sql...) in the Pre or Post SQL options within the Output tool, or run these in SQL Server itself.

Meteor
Thank you for teaching me very kindly. According to the procedure of the GRANT PERMISSIONS way, we grant only necessary role to truncate table.
Labels