Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

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

Yasu
7 - 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 ?

4 REPLIES 4
RishiK
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.

Yasu
7 - Meteor

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

RishiK
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.

Yasu
7 - 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
Top Solution Authors