-- for tables
GRANT ALL ON TABLE Filename TO @DB_USER@;
GRANT ALL ON TABLE Path TO @DB_USER@;
GRANT ALL ON TABLE File TO @DB_USER@;
GRANT ALL ON TABLE RestoreObject TO @DB_USER@;
GRANT ALL ON TABLE Job TO @DB_USER@;
GRANT ALL ON TABLE JobHisto TO @DB_USER@;
GRANT ALL ON TABLE Location TO @DB_USER@;
GRANT ALL ON TABLE Fileset TO @DB_USER@;
GRANT ALL ON TABLE JobMedia TO @DB_USER@;
GRANT ALL ON TABLE Media TO @DB_USER@;
GRANT ALL ON TABLE MediaType TO @DB_USER@;
GRANT ALL ON TABLE Storage TO @DB_USER@;
GRANT ALL ON TABLE Device TO @DB_USER@;
GRANT ALL ON TABLE Pool TO @DB_USER@;
GRANT ALL ON TABLE Client TO @DB_USER@;
GRANT ALL ON TABLE Log TO @DB_USER@;
GRANT ALL ON TABLE LocationLog TO @DB_USER@;
GRANT ALL ON TABLE Counters TO @DB_USER@;
GRANT ALL ON TABLE BaseFiles TO @DB_USER@;
GRANT ALL ON TABLE UnsavedFiles TO @DB_USER@;
GRANT ALL ON TABLE PathHierarchy TO @DB_USER@;
GRANT ALL ON TABLE PathVisibility TO @DB_USER@;
GRANT ALL ON TABLE Version TO @DB_USER@;
GRANT ALL ON TABLE Status TO @DB_USER@;
GRANT ALL ON TABLE NDMPLevelMap TO @DB_USER@;
GRANT ALL ON TABLE NDMPJobEnvironment TO @DB_USER@;
GRANT ALL ON TABLE DeviceStats TO @DB_USER@;
GRANT ALL ON TABLE JobStats TO @DB_USER@;
GRANT ALL ON TABLE TapeAlerts TO @DB_USER@;

-- for sequences ON those tables
GRANT NEXT ON SEQUENCE Filename_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Path_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE File_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE RestoreObject_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Job_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE JobHisto_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Location_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Fileset_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Jobmedia_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Media_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE MediaType_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Storage_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Device_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Pool_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Client_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE Log_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE LocationLog_Seq TO @DB_USER@;
GRANT NEXT ON SEQUENCE BaseFiles_Seq TO @DB_USER@;
\g
