I have found the problem is due to orphaned SQL logins..
When you transfer the site database new SQL logins are created.. the login for the primary site server had no user mapping to the sccm database..
I have configured this using the old database as the example...
This can be considered a bug in the transfer of sql using sccm setup..