Well, this is database permission related error. I am adding my solution in this question because, it is very important to understand the role of DBA. So, there are my suggestions:
- Go to Server Manager
- Select Tools and then Computer Management
- Check the Local Users and Groups
- Check the admin name with description ‘Built-in account for administering the computer/domain’
Now, login with that username and you can grant access to the user. To do so:
Go to Security, right click on Logins and select New Login
In login window, you can type the user name or search it. Select the user from the list and click OK and OK again.
On the same login window, click on the Server Roles, and grant the access to the selected user like: sysadmin, serveradmin, decreator etc; click OK.
If you want to grant access to an individual database then, go to User Mapping and provide the access as per your requirement.
Check the Status of the database:
Permission: Grant
Login: Enabled
Click OK