I am not sure if this is a SP problem or not. So I am posting here because the problem occurs to the SP server.
Well, I have three servers: a Domain server, an SQL server and a server dedicated to SharePoint 2013 (all servers are 2012 R2). After installing Active Directory I added SQL server to the domain. But for some reasons I had to demote the Active Directory server and promote it again and change the domain name. Then I removed SQL Server from the old domain (which did not exist in my network anymore) and added it to the newly created domain. then added SP server to the domain and installed SP 2013.
I created the farm manually using SP powershell with no problem, then ran Configuration wizard. But SharePoint Central Administration Portal could not be browsed (server error in '/' application). Digging into my event log I realized the following error occurs frequently: "Unknown SQL Exception 18452 occurred. Additional error information from SQL Server is included below. Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."
I checked SQL Server event log as well and found following error which occurs frequently as well: "SSPI handshake failed with error code 0x8009030c, state 14 while establishing a connection with integrated security; the connection has been closed. Reason: AcceptSecurityContext failed. The Windows error code indicates the cause of failure. The logon attempt failed [CLIENT: ]"
Is it related to demoting and promoting AD server? I tried different solutions non of which worked. any help would be deeply appreciated.