-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resource to upgrade content databases #1327
Comments
Hey guys, in addition, we should consider the size of the content databases when upgrading. We have to make sure, large content databases will not be upgraded on the same server. |
The issue with database size is that you cannot check the database size via SharePoint. The SPContentDatabase object has a size property, but that is the sum of both the data and transaction log files. So if that property says 50GB, it can be a 49GB data file with a 1 GB transaction log or a 25GB data file with a 25GB transaction log. So it isn't very useful to determine the database size. The only way you have is to connect to SQL directly, which means you need permissions in SQL to request these sizes (not sure what permissions you need to request database sizes). |
Shouldn't it be possible to get the database size directly from the SQL server? |
That is what I said in the last paragraph 😉
This requires permissions in SQL server to request these values, however not sure exactly what. I think we can use the sp_databases stored procedure to request the size (size column is in KB). More info can be found here: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-databases-transact-sql?view=sql-server-ver15 This article indicates: So we need to test if a default admin/setup account (which has dbcreator and securityadmin permissions) is able to execute this stored procedure. |
I don't know its really true, but in my experience the upgrade time depends on the amount of SPWeb Objects inside the database. At least it feels like it - so maybe the SPSite and SPWeb count could help. |
Description
@ThomasLie shared some code to upgrade content databases in parallel across all servers in the farm. Right now I am wondering what would be the best way to implement this functionality.
Requirements:
I was thinking about possible locations/resources to add the code:
Proposed properties
Special considerations or limitations
Would be great if we could add the resource to a specific set of servers in the farm and have them upgrade the farm. And we should check if there are any limitations, thresholds and safeguards in place to protect the farm against too many database upgrades at the same time.
Code
The text was updated successfully, but these errors were encountered: