Hi,
I am currently developing a macro that our team can use to write tables to our sandbox. Using this macro will allow the team to easily write to the sandbox, and will also allow us to monitor sandbox size, properly track who created the table, and the dates it was created so we can have a better sandbox management. It will also tile out the incoming file to batch the writing into 5 separate appends.
The macro, attached, writes to the sandbox database. However, when testing it out - it returns an error for a different database, that I do not have write permissions for. I dont understand why its returning this because I can utilize the write to DB for the specified sandbox table on its own, but when editing the macro I receive the "Create table permission denied" for a different database. The error logs, as seen below return edw_NAME. In my macro I DO NOT reference edw_NAME, I only reference edw_sandbox.sandboxprivate. I do have Write permissions to the edw_Sanbox. I have also attached the macro in question as well. Please help!
SandboxWriteTest (1) Tool #33: Executing PreSQL: "WITH "Tool75_35d2" AS (SELECT * FROM "##AYXdab1f4cf82fe24d99114260c2be445e8"), "Tool6True_5de3" AS (SELECT * FROM "Tool75_35d..." : Microsoft SQL Server Native Client 11.0: CREATE TABLE permission denied in database 'edw_NAME'.\42000 = 262
SandboxWriteTest (1) Tool #33: Error running PreSQL on "NoTable": Microsoft SQL Server Native Client 11.0: CREATE TABLE permission denied in database 'edw_NAME'.\42000 = 262
SandboxWriteTest (1) Tool #27: Error opening table: Microsoft SQL Server Native Client 11.0: Invalid object name 'edw_sandbox.sandboxprivate.sandboxtabletest'.\42S02 = 208
SandboxWriteTest (1) Tool #21: Error opening table: Microsoft SQL Server Native Client 11.0: Invalid object name 'edw_sandbox.sandboxprivate.sandboxtabletest'.\42S02 = 208
SandboxWriteTest (1) Tool #35: Error opening table: Microsoft SQL Server Native Client 11.0: Invalid object name 'edw_sandbox.sandboxprivate.sandboxtabletest'.\42S02 = 208
SandboxWriteTest (1) Tool #15: Error opening table: Microsoft SQL Server Native Client 11.0: Invalid object name 'edw_sandbox.sandboxprivate.sandboxtabletest'.\42S02 = 208