My Development team contacted me and said they are not able to access database “The server principal “XYZ\USER” is not able to access the database “YourDBName” under the current security context”
when I looked into server server I found –
- Login was there and access was granted.
- When I looked into database I found user was disable ( Red down arrow mark )
Here are two solutions –
- Most of the people recommended to recreate use by deleting and reading into database.
But main reason why it’s disabled because user is not having connect permission to database.
- if you grant connect permission it will resolve your issue.
grant connect to [xyz\user]
Scenario – In my SSRS report i have calculate Age field of Tickets like in 1 Day 2 Hours 20 min format and we are getting values in minute .
I have created filed called Age(Minutes) in my SP or query
IN SQL –
datediff(minute,date_created, getdate()) as ‘Age (Minute)’
IN SSRS write expression
= ( Fields!Age__Minute_.Value ) \ 1400 & ” days ” & ((( Fields!Age__Minute_.Value ) MOD 1400) \ 60 ) & ” Hours ” & ((( Fields!Age__Minute_.Value ) MOD 1400) MOD 60 ) & ” Minutes “