Posted Fri, 28 Aug 2015 14:18:14 GMT by Kim Loesch

R

unning our SQL bif and using the Local system acoount as the profile they are running jobs with.  this was working fine until they went to SQL 2012, then it started failing with these errors:

MS SQL EXEC Error ---
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteReader(String sqlCommand, SqlCommand& command)
   at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataReader(String query, SqlCommand& command)
   at Microsoft.SqlServer.Management.Smo.DataProvider.SetConnectionAndQuery(ExecuteSql execSql, String query)
   at Microsoft.SqlServer.Management.Smo.ExecuteSql.GetDataProvider(StringCollection query, Object con, StatementBuilder sb, RetriveMode rm)
   at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillData(ResultType resultType, StringCollection sql, Object connectionInfo, StatementBuilder sb)
   at Microsoft.SqlServer.Management.Smo.SqlObjectBase.FillDataWithUseFailure(SqlEnumResult sqlresult, ResultType resultType)
   at Microsoft.SqlServer.Management.Smo.SqlObjectBase.BuildResult(EnumResult result)
   at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData()
   at Microsoft.SqlServer.Management.Sdk.Sfc.Environment.GetData(Request req, Object ci)
   at Microsoft.SqlServer.Management.Sdk.Sfc.Enumerator.GetData(Object connectionInfo, Request request)
   at Microsoft.SqlServer.Management.Smo.ExecutionManager.GetEnumeratorDataReader(Request req)
   at Microsoft.SqlServer.Management.Smo.SqlSmoObject.InitChildLevel(Urn levelFilter, ScriptingOptions so, Boolean forScripting)
   at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.InitializeChildCollection(Boolean refresh)
   at Microsoft.SqlServer.Management.Smo.SmoCollectionBase.GetEnumerator()
   at Microsoft.SqlServer.Management.Smo.Agent.JobCollection.GetObjectByName(String name)
   at Microsoft.SqlServer.Management.Smo.Agent.JobCollection.get_Item(String name)
   at SkybotMsSqlJobExec.Smo.MsSqlJobExecSmoImpl.RunJob(JobCommand jc)
   at SkybotMsSqlJobExec.Smo.MsSqlJobExecSmoImpl.ExecuteJobCommand(JobCommand jobCommand)
An exception occurred while executing a Transact-SQL statement or batch.
The SELECT permission was denied on the object 'sysjobs_view', database 'msdb', schema 'dbo'.
Command to execute job Backup Daily Simple Databases unsuccessful.

 

the issue is, in SQL 2012, MicroSoft changed the System login (local system) to NOT have sysadmin rights.  Needs to add these rights back in, or run under a different user.

 

You must be signed in to post in this forum.