0

I'm wondering if a specific content database in the farm can always be identified by only its name?

For example, if my farm consists of multiple SQL Server instances, must each content database in the farm have a unique name, or can the same content database name be used on different instances? E.g. is it possible to have a content database named "WSS_Content" on "SqlServer\Instance1", and another "WSS_Content" on "SqlServer\Instance2"?

  • It's an interesting question :) But I must ask, what is your use-case here? – Robert Lindgren Oct 16 '14 at 13:22
  • The Test-SPContentDatabase cmdlet seems to indicate that a name is only unique in a specific web application. – Robert Lindgren Oct 16 '14 at 13:24
  • @RobertLindgren: I have some code where I want to retrieve a SPContentDatabase object by knowing only content database name and am wondering if this is safe - e.g. you can do this using PowerShell's Get-SPContentDatabase cdb_name. Also, I don't believe you are correct regarding web app uniqueness: SharePoint won't allow you to create a content database named equally to another content database in another web application - but I've only tested this for a case where only one SQL Server instance exists. – w128 Oct 16 '14 at 13:27
  • Well, I was expecting this to be a rather easy question with a well-known answer, but obviously not so... – w128 Oct 16 '14 at 14:12
1

As per my experience same name for two content Database with different instance is not an issue.

SharePoint always check against the Database GUID. If you create Wss_Content01 on sql instance 1(having unique GUID) and then create another DB WSS_Content01 on SQL Instance 2(again Unique GUID).

You can attach both DBs to same web application or different web application. see the screen shot below i created two DBs with same name but different SQL instance. enter image description here

Now possible Conflict:

  • You trying to create a database(wss_Content01) on instance 1 but a DB with the name already exist on SQL server then it will throw the errors.
  • You have Wss_Content01 on Instance 1 but now you take the backup of the DB from Instance 1 and restore it on Instance two with same name, Now if you try to mount it, it will throw the error because of the Same GUID of the DB and site collections in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.