Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Permission denied for table when querying in WebApp

Avatar

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile

Avatar
Give Back 10
Level 3
vendimb15716755
Level 3

Likes

20 likes

Total Posts

107 posts

Correct Reply

6 solutions
Top badges earned
Give Back 10
Give Back 5
Give Back 3
Give Back
Ignite 3
View profile
vendimb15716755
Level 3

19-01-2021

Hi

in the Adobe campaign Classic v7. I am executing a query from the webapp when the user subscribe to get some reward code and inject into email . I am having permission issues when webapp trying to execute the query even though the webapp user have Administration rights( some time it works though) .. The webapp access control is set up as Anonymous access. The funny thing is that there is another query that gets execute fine. The table that is getting queried is under a custom schema .

below is the query that get executed

 

var query = xtk.queryDef.create( <queryDef schema="vb:promoCodes" operation="select" lineCount="1">
<select>
<node expr="@promoCode"/>
<node expr="@codeStartDate"/>
<node expr="@codeEndDate"/>
<node expr="@id"/>
</select>
<where>
<condition expr="@codeStartDate <= GetDate()"/>
<condition expr="@codeEndDate >= GetDate()"/>
</where>
</queryDef>)

var promoCodes = query.ExecuteQuery();

 

error below

Error | Function getpromoCode() failed | PGS-220000 PostgreSQL error: ERROR: permission denied for table vbpromocodes .

SOP-330011 Error while executing the method 'ExecuteQuery' of service 'xtk:queryDef'

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,090 posts

Correct Reply

509 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile

Avatar
Establish
MVP
wodnicki
MVP

Likes

960 likes

Total Posts

1,090 posts

Correct Reply

509 solutions
Top badges earned
Establish
Affirm 500
Contributor
Shape 1
Give Back 100
View profile
wodnicki
MVP

20-01-2021

Hi,

 

The error is coming from postgres there.

Check that Campaign's db user has read access to the vbpromocodes table.

 

Thanks,

-Jon

Avatar

Avatar
Contributor
Level 3
saikatk2447661
Level 3

Likes

22 likes

Total Posts

57 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
Level 3
saikatk2447661
Level 3

Likes

22 likes

Total Posts

57 posts

Correct Reply

14 solutions
Top badges earned
Contributor
Shape 1
Give Back 5
Give Back 3
Give Back
View profile
saikatk2447661
Level 3

10-02-2021

Hi @vendimb15716755 ,

 

Could you please explain the reason behind "Function getpromoCode()". Is @promoCode coming from a calculated field?

 

Thanks,

Saikat