All Forums Database
Jimmymj 1 post Joined 06/15
05 Jun 2015
Macro - SELECT WITH GRANT OPTION access error



I created a macro for delete and insert records to a table from a view on another DB.


REPLACE MACRO DB1.macro_ins as (
delete from  DB2.tab1  all;
insert into  DB1.tab1 
     select col1,col2 from DB3.viewA;



when executing the macro 

exec  DB1.macro_ins


I am getting access issue in the table DB3.tabA

 Failed. 5315: An owner referenced by user does not have SELECT WITH GRANT OPTION access to DB3.tabA. But I can run the query individually without any permission issue.


Could someone help me out ?





dnoeth 4628 posts Joined 11/04
05 Jun 2015

Hi Jimmy,
you need to grant those rights including GRANT OPTION to the database DB1.


You must sign in to leave a comment.