Cannot open database requested by the login. The login failed I have a SharePoint environment, but my problem is related to DB as I couldn't solve it in SharePoint ways.

I have a database that suddenly stopped working. It's appearing in SQL management studio, but without the + sign. If I right click on it to see the tasks, they're disabled. 

I have full control over the server as am the one who installed SQL and Windows. Any idea how to solve this.
sp_readerrorlog

As pointed out already by @Shanky read the error log (ERRORLOG) by setting off the sp_readerrorlog command:

sp_readerrorlog 0,1,'&lt;your_DB&gt;'


You could also use the official xp_readerrorlog procedure with the same parameters:

xp_readerrorlog 0,1,'&lt;your_DB&gt;'


xp_readerrorlog is the underlying extended stored procedure for the sp_readerrorlog stored procedure which is explained here: SQL Internals : Useful Parameters for xp_readerrorlog

Read ERRORLOG directly

If you are unable to read the ERRORLOG with the stored procedures, then manually read the ERRORLOG files (ERRORLOG.*) to find any errors.

Querying Registry to find location

If you can't find the location of the ERRORLOG file, then retrieve the path from the registry:  

DECLARE @regout VARCHAR(255)  
exec xp_regread 'HKEY_LOCAL_MACHINE', 'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer\Parameters', 'SQLArg1', @regout OUTPUT  
SELECT @regout  


Don't forget to replace MSSQLSERVER with your instance name if you are using a different instance than the default instance (...\MSSQL11.MSSQLSERVER\...).

Query SQL Server directly

SQL Server itself stores some basic information about the status of the databases in sys.databases:

select name, state_desc from sys.databases


You should get an output similar to the following:

name    state_desc
master  ONLINE
tempdb  ONLINE
model   ONLINE
msdb    ONLINE
&lt;your_DB&gt;   ONLINE


Permissions

If your database &lt;your_DB&gt; is online, then you possibly don't have adequate permissions to read the database. Change your user's permissions.

Once you have found more information you will possibly be able to pinpoint the issue.