I want to run the following code as a regularly scheduled job using SQLServerAgent:
exec sp_attach_db @dbname = 'district',
The job fails to execute.
What I have determined is that certain jobs. They include dropping databases, creating new tables inside the database "district" and filling the database by querying other tables. However, creating a database does not work. However, if I start
a new query using MS Management Studio, and place the code inside the query window, it executes cleanly. I assume it's a permissions issue, I just don't know where to start.
View Complete Post