When retrieving data through a stored procedure in SQL Server, I get an error like
It is not possible to fulfill the role of the database, because the main "dbo" does not exist, this type of principal cannot be impersonated, or you do not have permission.
I get this error only for access to a specific stored procedure, and not for all SPs.
Give your database a valid owner. Try the following:
ALTER AUTHORIZATION ON DATABASE::[YourDatabaseName] TO [LoginUser];
or you can try installing it as
USE [dbname] GO sp_changedbowner 'someLogin'
ALTER AUTHORIZATION ON DATABASE::Example TO sa;