Yesterday, after restoring CRM DB backup on other maching and importing Organization using Deployment Manager of CRM 4.0, I received this error.
The SELECT permission was denied on the object 'BuildVersion', database 'MicrosoftCRM_MSCRM', schema 'dbo'
or the variation
The SELECT permission was denied on the object 'SystemUser', database 'MicrosoftCRM_MSCRM', schema 'dbo'
If you have tried changing the owner of new database with admin login making it as dbowner but did not help then following may help solving this problem
Right click the affected object (table/view etc) in my case it was 'BuildVersion' and 'SystemUser' in SQL Server Management Studio,
click on properties
click on "Permissions" on left tab
click on "View schema permission" link on right tab
click on "Add" button,
click on "Browse"
select "CRMReaderRole" of type Database role.
click ok,
click ok,
now you will be again in object properties.
Place check mark in "Grant" column against "Select" permission
click ok
Now check hope so it has been resolved.
================
To change the dbowner command is (If required)
use <CRMDatabaseThatYouNeedToChangeTheOwner>
exec sp_changedbowner 'DOMAIN\AdministratorMappedWithCrmAdmin'
go
===============