I have a new installation of SQL 2012 RTM Enterprise edition 64 bit. I get the following messages in a job log when the job runs to create a new database by doing a restore databases with a new name.
Job 'Create New Client' : Step 1, 'exec dbo.CreateClientDatabase' : Began Executing 2012-07-13 16:04:41
Msg 262, Sev 14, State 1, Line 63 : CREATE DATABASE permission denied in database 'master'. [SQLSTATE 42000]
Msg 3013, Sev 16, State 1, Line 63 : RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000]
The following is from the SQL Logs:
Message
Executed as user:CreateCDB. CREATE DATABASE permission denied in database 'master'. [SQLSTATE 42000] (Error 262) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013) Invalid object name 'SUZ_000004.dbo.CompanyInfo'. [SQLSTATE
42S02] (Error 208) The server principal "CreateCDB" is not able to access the database "msdb" under the current security context. [SQLSTATE 08004] (Error 916). The step failed.
I have tried to make the user a sysadmin on the server and it continues to fail. I have seen similar issue online where the Guest account was suspect. I do currently have the guest account diable and it does not appear to be causing this issue. A SQL Trace produced the following:
exec sp_executesql N'EXECUTE msdb.dbo.sp_sqlagent_log_jobhistory @job_id = @P1, @step_id = @P2, @sql_message_id = @P3, @sql_severity = @P4, @run_status = @P5, @run_date = @P6, @run_time = @P7, @run_duration = @P8, @operator_id_emailed = @P9, @operator_id_netsent = @P10, @operator_id_paged = @P11, @retries_attempted = @P12, @session_id = @P13, @message = @P14',N'@P1 uniqueidentifier,@P2 int,@P3 int,@P4 int,@P5 int,@P6 int,@P7 int,@P8 int,@P9 int,@P10 int,@P11 int,@P12 int,@P13 int,@P14 nvarchar(4000)','0FDC4A00-84AF-4913-B665-29970D6E5C6D',1,916,16,0,20120712,171411,0,0,0,0,0,4,N'Executed as user: BldCltDB. CREATE DATABASE permission denied in database ''master''. [SQLSTATE 42000] (Error 262) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013) Invalid object name ''SUZ_000004.dbo.CompanyInfo''. [SQLSTATE 42S02] (Error 208) The server principal "BldCltdb" is not able to access the database "msdb" under the current security context. [SQLSTATE 08004] (Error 916). The step failed.'
Any suggestions? This is remnant of SQL 2008 R2.
Thanks.
Rick