Restore-SPSite : Login failed for user '' Reason:Server is in script upgrade mode. Only administrator can connect at this time.

adil 1,206 Reputation points
2020-09-24T21:23:52.46+00:00

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.

and where to see Restore-SPSite logs actually what happened at restore process.

SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,843 questions
0 comments No comments
{count} votes

Accepted answer
  1. Elsie Lu_MSFT 9,771 Reputation points
    2020-09-25T06:17:06.033+00:00

    Hi @adil ,

    This may be a problem with the database. If you want to view the SQL Server error logs, the default path is C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log. If you are not very familiar, please contact the database administrator to confirm whether the database is in a upgrade. And the Windows event viewer is also a way to see if there are other error messages. Here are some information about it:
    https://www.howtogeek.com/123646/htg-explains-what-the-windows-event-viewer-is-and-how-you-can-use-it/
    By default, all SharePoint errors are logged in a folder called Logs which is located in the path C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS.

    Here are some similar threads for your reference:
    https://blog.sqlauthority.com/2019/05/20/sql-server-fix-error-login-failed-for-user-reason-server-is-in-script-upgrade-mode-only-administrator-can-connect-at-this-time-microsoft-sql-server-error-18401/
    https://www.wikitechy.com/fix-error/fix-error-server-is-in-script-upgrade-mode-only-administrator-can-connect-at-this-time

    Best regards,
    Elsie Lu


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Sharath Kumar Aluri 3,071 Reputation points
    2020-09-24T21:35:25.48+00:00

    Reach out to admin and tell them to add yourself in the Shell admin place.

    Get-SPDatabase | Add-SPShellAdmin "GlobalSP\Sharatha"

    Thanks & Regards,

    1 person found this answer helpful.
    0 comments No comments