locked
Create contentDB with Predefined GUID RRS feed

  • Question

  • I am in the requirement to create the SharePoint content DB for a predefined GUID. Please let me know if it is possible through Powershell.

    Thanks,

    Wednesday, April 23, 2014 6:57 AM

Answers

  • I'm guessing you already know that going directly to the Databases is a bad idea in general. In your case it might still be a bad idea but it's in Dev for testing purposes so we'll move on.

    If you're already storing the DB names and GUIDs centrally then there's no need to make them uniform. Just update them as the environment changes. You'd only need uniform names if you didn't want to have/maintain that central DB directory.

    I'm not sure why you even want/need to use the GUID, if you're accessing programatically you can just get the GUID using a name (easily specified).

    • Marked as answer by Lindali Friday, May 2, 2014 7:37 AM
    Wednesday, April 23, 2014 8:37 AM

All replies

  • Hi,

    This is not possible through PowerShell. To maybe help you with your needs, please clarify why you would need to create a content database with a predefined GUID. Maybe we can find a workaround for you that works as well.


    Nico Martens - MCTS, MCITP
    SharePoint Infrastructure Consultant / Trainer

    Wednesday, April 23, 2014 7:46 AM
  • Thanks Nico.

    We have separate SP farm for each developers in the development environment. We are using centralized  custom SQL server DB, where we need to store the content DB name and GUID in a table.

    To test some functionality, we all developers should have a contentDB with same GUID. So that we will access the GUID from custom SQL DB and test the functionality.

    Arul

    Wednesday, April 23, 2014 8:26 AM
  • I'm guessing you already know that going directly to the Databases is a bad idea in general. In your case it might still be a bad idea but it's in Dev for testing purposes so we'll move on.

    If you're already storing the DB names and GUIDs centrally then there's no need to make them uniform. Just update them as the environment changes. You'd only need uniform names if you didn't want to have/maintain that central DB directory.

    I'm not sure why you even want/need to use the GUID, if you're accessing programatically you can just get the GUID using a name (easily specified).

    • Marked as answer by Lindali Friday, May 2, 2014 7:37 AM
    Wednesday, April 23, 2014 8:37 AM