Hi,

I want to issue TRUNCATE TABLE SQL to delete a large amount of data.


But, since AdvancedSQL does not have DDL execution privilege, it can not be realized.


Can it be realized in other ways?

Ex) Using Extension?


I do not want to change rights like the following method

https://www.outsystems.com/forums/discussion/22247/best-way-to-truncate-tables/


thank you in advance.

Solution

Hi Ryosuke Takeuchi,

Typically your extensions would make use of the database connections setup for the environment, which means they would have the same user restrictions on the (Main) OutSystems database.

I guess you could manually implement direct database access to the main OutSystems database in your extension, as long as the database user the extension uses to connect has privileges to TRUNCATE the relevant table... but don't forget the relevant table's name could change from environment to environment.

Otherwise I don't see many choices not already covered on the post you linked to.

Solution

I see.

I follow the method of the link destination.


It solved by giving OSRUNTIME the right as follows. (oracle)

GRANT DROP ANY TABLE TO OSRUNTIME;


But,It is dangerous because immature or malicious developers can accidentally DROP TABLE ...


Thank you, Jorge!