Error 18456 error severity 14 state 5 SQL Server 2012 SCCM2012 SP1
When you say you did a database rebuild command, do you mean you rebuilt the system databases for sql server &amp; changed the default collation?  Doing this means you've effectively created a new database server.  I found these instructions for moving the SCCM db from one server to another.  Looks like they're using a db backup/restore &amp; you've attached the db, but everything else should be the same.  There is a step in the ConfigMgr setup that will fix up the database permissions for you, have you tried that?