Restore-SPSite : Login failed for user '' Reason:Server is in script upgrade mode. Only administrator can connect at this time
-
16-02-2021 - |
Question
Hi i taken backup of site collection in staging sharepoint farm and in Prodution SharePoint farm i created new web application with new content database and trying to restore the site collection but i get below error.
Restore-SPSite : Login failed for user '' Reason:Server is in script upgrade mode. Only administrator can connect at this time.
in ULS Logs i found below exception
System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'KSACB\sp_farm_internet'. Reason: Server is in script upgrade mode. Only administrator can connect
at this time.
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource
1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource
1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.Office.Server.Data.SqlSession.OpenConnection() ClientConnectionId:e18403bb-081f-4fa7-90d0-c21506311052 Error Number:18401,State:1,Class:14
Solution
This is a common issue when an upgrade is performed for SQL Server. You can open SQL Server Management Studio to confirm if you see the same error while connecting.
The most recommended solution would be wait for a few minutes and keep monitoring, then try to connect again.
Please see the related articles below:
SQL SERVER – Login Failed For User – Reason Server is in Script Upgrade Mode.