Database is not mounting

sns 9,251 Reputation points
2023-03-01T06:46:43.28+00:00

I have taken database from prod and tried to restore it SQL lab

and then trying to mount it to SHarePoint web application. But coming up with below error

that database is there in the SQL server, you can see in the below screenshots

User's image

Please suggest

and second question, if i dont give sql server name it is givig error like another object is already exists in the farm. Please suggest. how to assign with unique id

Microsoft 365 and Office | SharePoint Server | For business
{count} votes

Answer accepted by question author
  1. Yanli Jiang - MSFT 31,671 Reputation points Microsoft External Staff
    2023-03-02T03:32:28.68+00:00

    Hi sns,

    There are many possible reasons for this error:

    1, The Windows Firewall is On. Turn it Off.

    2, The provided farm account must have sufficient permission on the SQL server instance,

    • Database Creator.
    • Security Admin.

    Open SQL Server Management Studio. Below “Security” > Logins and Right-click the account you are using, select Properties. From the left side, Click on “Server Roles”.

    • Check the below roles
      • dbcreator.
      • securityadmin.

    3, SQL Server Network Configuration TCP/IP is disabled.

    • Go to the SQL Server VM and spin up SQL Server 2016 Configuration Manager.
    • Select SQL Server Network Configuration and click Protocols for MSSQLSERVER. TCP/IP is disabled by default. Enable it.

    4, Write a firewall rule that will enable incoming connections to 1433 port which is where SQL Server listens to.

    • Go to Control Panel -> System and Security -> Windows Firewall. Select Advanced Settings option.
    • Click ‘Inbound Rules’ and select ‘New Rule’ option.
    • This will open up the inbound rule configuration wizard. Select the radio button ‘Port’ and click Next.
    • Select the TCP radio button and specify the port 1433 in specific local ports text box.
    • Specify the action that has to be taken as part of the rule, select ‘Allow the connection’ radio button.
    • In profiles page, select the check box ‘Domain’ and click Next.
    • Specify the name for the rule and click Finish.
    • Make sure that you restart the SQL Server service for the changes to take effect.

    For more information, please refer to:

    https://social.technet.microsoft.com/wiki/contents/articles/36615.sharepoint-troubleshooting-cannot-connect-to-database-master-at-sql-server.aspx

    For your second question, please give more information to make it more clearly.

    Thank you for your understanding!


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.