Hello I am trying to grant access for a stored procedure to be able to create a database. I am currently getting an error when running a backup restore script from the application: "CREATE DATABASE permission denied in database 'master'"
I tried to grant access to the restore SP to create database
GRANT CREATE DATABASE ON dbo.my_stored_procedure TO [IIS APPPOOL\myAppName];
However this command gives me the following error
Incorrect syntax near 'CREATE DATABASE..'.
Here is the basics of the Sproc:
RESTORE DATABASE @new_db_name
FROM DISK = @file_path
WITH RECOVERY,
MOVE 'CurrentDB' TO @new_db_file,
MOVE 'CurrentDB_log' TO @new_db_log