attach databases in powershell vs attach databases in STSADM
-
vendredi 22 juin 2012 07:28i am reading about attaching databases in sharepoint, it says:
you may have more than one content database per web application, use PowerShell and the Mount-SPContentDatabase command, instead of add existing database using STSADM
I have searched online, but i can't find any example on how to attach multiple databases in 1 command using powershell. any example?
Toutes les réponses
-
vendredi 22 juin 2012 09:53
Hi,
If you have multiple content databases that have the same name, you must use the content database GUID in this command instead of using the content database name. To retrieve the GUID of the content database, run the Get-SPContentDatabase cmdlet with no arguments. Take a look at this article Attach or detach content databases (SharePoint Server 2010)
Dmitry
Lightning
Tools Check out our SharePoint tools and web parts |
Lightning Tools Blog -
vendredi 22 juin 2012 10:43Hi Dmitry, I appreciate your reply but that is not my question, my questions is that I read that with attach DB you can upgrade more than 1 database in the same time, using mount-spcontentDB, if you use STSADM you can only attach one at a time, how do i use mount command to attach more than one database (with different names) at the same time. All i can see is that it can update one db at a time.
-
vendredi 22 juin 2012 11:11
Hi,
Mount-SPContentDatabase – Used to attach a database or multiple parallel databases to the farm. Essentially is nearly the same as the STSADM –o addcontentdatabase. It does actually have more options when you start looking at parameters on the surface in each command. This is where the power of powershell competes on a command level. If you’re doing parallel content database attach for example, this powershell method is recommended. You’d simply run each of these in different command/management windows. Please take a look at this article Upgrading to SharePoint 2010 with Powershell
Dmitry
Lightning
Tools Check out our SharePoint tools and web parts |
Lightning Tools Blog- Marqué comme réponse Miss lara Brian vendredi 22 juin 2012 14:06
-
vendredi 22 juin 2012 13:40aha, so there is no command for mounting all databases together, I have to open multiple windows together? wouldn't that work with stsadm?
-
vendredi 22 juin 2012 13:51No, you can't do it in one command. You should use PowerShell because extending STSADM.EXE has been deprecated and will not be supported in future releases of SharePoint.
Dmitry
Lightning
Tools Check out our SharePoint tools and web parts |
Lightning Tools Blog
- Modifié Dmitry KaloshinMicrosoft Community Contributor vendredi 22 juin 2012 13:51
-
vendredi 22 juin 2012 15:03
if you really need to attach all the databases in one command you can read the entries from a text file and batch it up so that it does it automatically the only issue is if there are any issues you need to wait until all of them finishes or break it and then fix it if you are sure it doesn't have any issues then i would suggest that approach
it can be done with both commands the adavantage with mount is if you want the users to directly upgrade thier look and feel to sharepoint 2010 then there is a parameter called UpdateUserExperience
it changes the user interface directly to 2010 it all depends on what you want to do

