Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

The server principal "domain\sqlman" is not able to access the database "test_DBA" under the current security context Expand / Collapse
Author
Message
Posted Tuesday, August 12, 2008 7:00 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 1:11 AM
Points: 2,840, Visits: 3,976
while executing a job it gives error




Executed as user: domain\SQLMan. The server principal "domain\sqlman" is not able to access the database "test_DBA" under the current security context. [SQLSTATE 08004] (Error 916). The step failed.

Please suggest



-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done
Post #550938
Posted Tuesday, August 12, 2008 7:03 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, November 11, 2014 1:18 PM
Points: 944, Visits: 451
is domain\sqlman a user of that database? does it have a user account under the security tab in that database?
Post #550942
Posted Tuesday, August 12, 2008 7:23 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Tuesday, November 25, 2014 3:59 AM
Points: 938, Visits: 1,156
lazy solution: change job owner to SA

Wilfred
The best things in life are the simple things
Post #550969
Posted Tuesday, May 12, 2009 10:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 9, 2014 5:03 AM
Points: 1, Visits: 27
If you have SQL Server 2008 (100) Web Edition then in sp_add_jobstep do not supply @database_user_name or in the GUI supply a run as user as this will result in a spurious error indicating the user does not have permission!
You just have to run with SQL Agents permission set.
Post #715258
Posted Wednesday, May 13, 2009 7:50 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Yesterday @ 12:42 PM
Points: 644, Visits: 2,147
Ken_R_Vickers (5/12/2009)
If you have SQL Server 2008 (100) Web Edition then in sp_add_jobstep do not supply @database_user_name or in the GUI supply a run as user as this will result in a spurious error indicating the user does not have permission!
You just have to run with SQL Agents permission set.

A possible workaround if you don't want to have the owner be sa is to have the user be a member of msdb and grant the the SQLAgentOperatorRole in msdb. See if that works.

But to be honest, either use sa or a dedicated service account with enough permissions. It's better if the job runs under that context.


Gaby
________________________________________________________________
"In theory, theory and practice are the same. In practice, they are not."
- Albert Einstein
Post #715996
Posted Saturday, July 4, 2009 4:06 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 21, 2009 9:59 AM
Points: 1, Visits: 7
The solution is pretty simple:

http://www.kf7.co.uk/sql-server-principal-not-able-access-database.aspx

SQL Server Management Studio uses sql script to get a list of databases and related information. If you do not have enough rights to retrieve the related pieces of information then you may get this error.
Post #747269
Posted Tuesday, October 13, 2009 4:56 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, January 17, 2010 9:51 PM
Points: 2, Visits: 7
TryException (7/4/2009)
The solution is pretty simple:

http://www.kf7.co.uk/sql-server-principal-not-able-access-database.aspx
...


Isn't that solution only applicable to SQL Server 2008?
I can't see how to fix it in SQL Server 20065 Express
Post #802457
Posted Tuesday, October 13, 2009 5:22 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 9:21 AM
Points: 17,977, Visits: 15,981
Are the sql services running for that instance?


Is the domain account locked or expired - or did the password change recently?






Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Post #802460
Posted Tuesday, October 13, 2009 7:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, January 17, 2010 9:51 PM
Points: 2, Visits: 7
In my case the solution turned out to be permissions related.
I needed to grant CONNECT and CONNECT REPLICATED
and that was sufficient.
Post #802477
Posted Saturday, December 5, 2009 1:29 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, December 6, 2009 2:46 PM
Points: 1, Visits: 2
Ken_R_Vickers (5/12/2009)
If you have SQL Server 2008 (100) Web Edition then in sp_add_jobstep do not supply @database_user_name or in the GUI supply a run as user as this will result in a spurious error indicating the user does not have permission!
You just have to run with SQL Agents permission set.


It works! I have SQL 2008 Standard Edition. I don't supply that parameter, and the job run with this user NT AUTHORITY\SYSTEM
Post #829370
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse