Microsoft Sql Server Error 916

  1. Microsoft Sql Server Error 916 Download
  2. Login Failed For User Microsoft Sql Server Error 916
  3. Microsoft Sql Server Error 916 In Windows 7
  4. Sql Server Error 916
-->

APPLIES TO: SQL Server Azure SQL Database Azure SQL Data Warehouse Parallel Data Warehouse

Hello Sanket, With the reader role he only could read / select job data. Try it out by adding the user step by step also to both other roles: SQL Server Agent Fixed DB Roles.

  1. SQL Server Error 916 – Causes The main problem is due to bugs present in SQL Server Management Studio that prevents the user to connect to the database and refuses to display the database list. There may be several other reasons behind the getting SQL Server Error 916.
  2. Msg 916, Level 14, State 1, Line 1 The server principal '. fission' is not able to access the database '.' under the current security context. Microsoft SQL Server Management Studio 12.0.4100.1. Getting CU1 sent to me now.
  3. Fix Error Number 916 in Microsoft SQL Server. There are two methods to fix the error. The first method is via SQL Server Management Studio and the next one with the help of T-SQL. Let’s take a tour at step by step solution of this error. Fix error 916 via SSMS. Firstly, connect the SQL Server instance having valid credential using SSMS.

Details

Product NameSQL Server
Event ID916
Event SourceMSSQLSERVER
ComponentSQLEngine
Symbolic NameNOTUSER
Message TextThe server principal '%.*ls' is not able to access the database '%.*ls' under the current security context.

Explanation

The login does not have sufficient permissions to connect to the named database. Logins that can connect to this instance of SQL Server but that do not have specific permissions in a database receive the permissions of the guest user. This is a security measure to prevent users in one database from connecting to other databases where they do not have privileges. This error message can occur when the guest user does not have CONNECT permission to the named database and the trustworthy property is not set. This error message can occur when the guest user does not have CONNECT permission to the named database.

When CONNECT permission to the msdb database is denied or revoked, SQL Server Management Studio can receive this error when Object Explorer tries to show the Policy Based Management status of each database. Object Explorer uses the permissions of the current login to query the msdb database for this information, which causes the error. The following error message also occurs:

Failed to retrieve data for this request. (Microsoft.SqlServer.Management.Sdk.Sfc)

User Action

Microsoft Sql Server Error 916

Warning

Before circumventing this security measure be sure to have a clear understanding of users are authenticated in various databases. The following methods may allow users that have permissions in one database to connect to other databases which could expose data to a malicious user. When contained databases are enabled, the following steps can allow database owners in one database to grant access to other database on the instance of SQL Server.

You can connect to the database in one of the following ways:

  • Grant the specific login access to the named database. The following example grants the login Adventure-WorksLarry access to the msdb database.

    USE msdb ;

    GO

    GRANT CONNECT TO [Adventure-WorksLarry] ;

  • Grant the CONNECT permission to the database named in the error message for the guest user. The following example grants the CONNECT permission to the msdb database for the user guest.

    USE msdb ;

    GO

    GRANT CONNECT TO guest ;

  • Enable the TRUSTWORTHY property on the database that has authenticated the user.

    ALTER DATABASE AdventureWorks SET TRUSTWORTHY ON;

Active2 years, 8 months ago

I'm using Microsoft SQL Server 2012 Management Studio Express. I have detached one of my databases (it was in my office server) and .mdf and .ldf files are saved to MSSQL folder (on my local server). While I was detaching the database it was saying that with my connections (hopefully the server) cannot detach the database. Then I selected the drop connections option in the detach mode.

Now when I try to attach the database it doesn't allow me to attach. When I click the add button doesn't give me the option to browse my folder. Below error message is showing.

Failed to retrieve data for this request.(Microsoft.SqlServer.Management.Sdk.Sfc)

Additional information:

An exception occurred while executing a Transact-SQL statement or batch.(Microsoft SQL server. connectionInfo).

The server principal 'my username' is not able to access the database 'model' under the current security context.(Microsoft SQL server, Error:916).

What should I do? Please help me.

marc_s
606k137 gold badges1160 silver badges1292 bronze badges
UdithUdith

Microsoft Sql Server Error 916 Download

2 Answers

To resolve the issue... follow the given steps.(1) Start sqlserver and login(2) Press 'F7' or click on 'View->Object Explorer Details' to open Object Explorer Details window.(3) You will see there column header.. like 'Name', 'Policy Health State', 'Recovery Model', 'Collation' etc.(4) Right click on the header and unselect the 'Collation'.(5) Now refresh the database folder. You will get all database list.

MohammedAshrafaliMohammedAshrafali

Login Failed For User Microsoft Sql Server Error 916

1411 gold badge3 silver badges17 bronze badges

It's not a problem with the actual attach statement, but rather with setting up the wizard UI (which is a shame IMO). Use T-SQL to attach the database instead:

You'd be better off to use T-SQL all the time instead of SSMS wizards. Or use wizard to script out the action and execute in a query window.

Also, check what's the problem with the permissions on model. Use this query to see if there's any DENY:

deandean

Microsoft Sql Server Error 916 In Windows 7

8,6892 gold badges16 silver badges21 bronze badges

Sql Server Error 916

Not the answer you're looking for? Browse other questions tagged sqlsql-serversql-server-2008 or ask your own question.