none
Can't create site collection on specific database

    Question

  • The environment is as follows:

    4 Primary Servers (app, web, cache, search)

    4 Failover Servers (app, web, cache, search)

    AO Availability cluster backend

    I have 54 content databases plus logging, user profile, etc.

    So I went to add two new content databases, and I did so through the powershell successfully. Wildlife and Motorpool.

    When I go to add the site collection to the content databases, it says they aren't found:

    However, as you can see from the following, it does exist in the directory:

    It also shows up in the Central Admin. Has anyone else ever seen issues like this?

    jeudi 12 juillet 2018 15:22

Réponses

  • That didn't do anything to the current unavailable database. However, I did find the solution.

    When creating the database, it was going to the default in SharePoint, which was the listener for the Availability Cluster. When we moved it over to create the database on the active node, by machine name, everything went smoothly. I'm not sure if this is by design, as it should have passed the request from the listener IP to the active node to accomplish the same task, but it doesn't. Hope this helps someone else. What a pain.

    • Marqué comme réponse Matt-SP jeudi 12 juillet 2018 18:52
    jeudi 12 juillet 2018 18:51

Toutes les réponses

  • Use $var = Get-SPContentDatabase <db_name> and pass $var into the -ContentDatabase parameter. Does that also fail? Collect ULS logs if so.

    Trevor Seward

    Office Servers and Services MVP



    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    jeudi 12 juillet 2018 15:34
    Modérateur
  • It does fail. We have also deleted the database from SQL, as well as the removed it from the Availability Group, then verified it was gone. After running the command to create the database again, it looks like it's going to work then comes back saying there is already a database with that name. It creates the database, but it still is unavailable to create site a site collection to.
    jeudi 12 juillet 2018 16:01
  • Run:

    Get-SPDatabase | FT Name, ID

    Collect ID of your orphan DBs. 

    $db= Get-SPDatabase -Identity "ID of DB"

    $db.delete()

    To verify run also 

    Dismount-SPContentdatabase -Identity "Id of DB"

    Hope this helps. 

    jeudi 12 juillet 2018 17:26
  • That didn't do anything to the current unavailable database. However, I did find the solution.

    When creating the database, it was going to the default in SharePoint, which was the listener for the Availability Cluster. When we moved it over to create the database on the active node, by machine name, everything went smoothly. I'm not sure if this is by design, as it should have passed the request from the listener IP to the active node to accomplish the same task, but it doesn't. Hope this helps someone else. What a pain.

    • Marqué comme réponse Matt-SP jeudi 12 juillet 2018 18:52
    jeudi 12 juillet 2018 18:51
  • You should only be using the AOAG Listener when creating databases otherwise SharePoint won't be able to connect to the DB if you failover to the secondary. It's certainly not intended/not by design.

    Trevor Seward

    Office Servers and Services MVP



    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    jeudi 12 juillet 2018 18:53
    Modérateur
  • While that makes sense, what was happening was, was the SQL would create the database on the active, then try to create it on the passive. It would error out as it already had a database with the same name, leaving it in an unready state. After creating the database on the active, then adding the site collection, we the added the database to the AOAG and let it replicate.
    jeudi 12 juillet 2018 18:58
  • Also, we are using a modified cluster, recommended for records center, not the classic cluster.
    jeudi 12 juillet 2018 19:04
  • When you point at the listener, yes it will create it on the active. But unless you've got something else in place that isn't an OOTB AOAG, it will not add it to the passive until you run the Add Database wizard or use T-SQL to do so.

    I'm not sure what you mean by 'modified cluster', though.


    Trevor Seward

    Office Servers and Services MVP



    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    jeudi 12 juillet 2018 19:11
    Modérateur
  • Hi Matt-SP, 

    Thanks for sharing. 

    Best Regards, 

    Lisa Chen 


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    vendredi 13 juillet 2018 06:08
    Modérateur