SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The server principal "domain\sqlman" is not able to access the database "test_DBA" under the current...


The server principal "domain\sqlman" is not able to access the database "test_DBA" under the current security context

Author
Message
Bhuvnesh
Bhuvnesh
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23974 Visits: 4079
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;-)
JuncTheMayl
JuncTheMayl
SSCrazy
SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)SSCrazy (2.1K reputation)

Group: General Forum Members
Points: 2112 Visits: 490
is domain\sqlman a user of that database? does it have a user account under the security tab in that database?
Wilfred van Dijk
Wilfred van Dijk
Hall of Fame
Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)

Group: General Forum Members
Points: 3988 Visits: 1363
lazy solution: change job owner to SA

Wilfred
The best things in life are the simple things
Ken_R_Vickers
Ken_R_Vickers
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 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.
GabyYYZ
GabyYYZ
SSCrazy
SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)SSCrazy (2.9K reputation)

Group: General Forum Members
Points: 2945 Visits: 2336
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

TryException
TryException
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 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.
billdunf
billdunf
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 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
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)SSC Guru (110K reputation)

Group: General Forum Members
Points: 110664 Visits: 18623
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

billdunf
billdunf
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 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.
adia109
adia109
SSC Rookie
SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)SSC Rookie (39 reputation)

Group: General Forum Members
Points: 39 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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search