我正在尝试使用 SAS 加载表、创建索引、收集统计信息、授予对 teradata 表的选择权限以完成工作。SAS 是我必须选择的唯一软件。
以下脚本成功删除表、加载表、创建索引但不收集统计信息或授予选择。有没有另一种方法可以做到这一点,还是我做错了?
libname ias teradata server=<server> USER=&tduser. schema=<dbname> password=&tdpass.;
proc datasets library=ias;
delete <tablename>;
run;
data ias.<tablename> (bulkload=yes sleep=10 tenacity=4 dbcommit=80000);
set WORK.<data set name>;
run;
proc sql;
connect to teradata as td (user=&tduser. password=&tdpass. tdpid="<server>" schema="<dbname>");
execute(create index <indexname> (<columnname>) on <dbname>.<tablename>) by td;
execute(commit) by td;
execute(collect statistics on <dbname>.<tablename> index (<columnname>);
execute(commit) by td;
execute(grant select on <dbname>.<tablename> to <list of users>) by td;
execute(commit) by td;
disconnect from td;
run;