Error 18456 trying to connect
This typically means that the database specified in the connection string, in the SSMS dialog's options tab, or the user's default database is offline or otherwise not accessible (it could be restoring, single_user mode, offline, autoclose, etc).

What database are you trying to connect to? Check its status in sys.databases:

SELECT state_desc, user_access_desc, is_auto_close_on, is_in_standby
  FROM sys.databases 
  WHERE name = N'database_name';


If you are not specifying a database, then check the default database for the login:

SELECT default_database_name 
  FROM sys.server_principals
  WHERE name = N'login_name';