14

Given the amount of bloat and the fact there's not much in the 2nd stage recycle bin, it's more than likely Auditing has been turned on for the site collection. I believe trimming of the audit log is not enabled by default either, which could cause your content db to grow out of hand pretty quickly depending on level of activity within the site collection. ...


14

Felt my way around this, I found that context.Load(file) , context.ExecuteQuery(), was needed to actually load the file, and then I need to proceed into putting it in a stream which I later turned into a byte array which I was able to convert into base 64. public static void GetImage(ClientContext context, string uri) { try { var files = context.Web....


12

Follow these steps: Open Central Administration. Application Management. View all site collections. Select the site collection you need to get the database name. In the panel on the right you should see "Database Name", that's the name of the content database. -Hope it helps-


11

The only reason is that your contents are still residing in SP Content database. Just verify following URL once and check whether you skipped deleting items from this locations. SiteUrl/_layouts/15/AdminRecycleBin.aspx SiteUrl/_layouts/15/AdminRecycleBin.aspx?view=2 SiteUrl/_layouts/15/RecycleBin.aspx SiteUrl/_layouts/15/AdminRecycleBin.aspx?view=2 is the ...


9

Make sure that you have deleted the items in Site Collection Recycle Bin Note: Once the document is deleted it moved to 1st stage recycle bin. It stays there based on the web application recycle bin setting that (default is 30 days). after this period finished (30 days) it moved to 2nd stage recycle bin it also called Site Collection Recycle Bin. In 2nd ...


8

To find the table(s) which are taking up the most space run this query in SQL Server Management Studio (with your content database selected to query against). That should help you narrow it down to a particular table or tables and then from there you can determine what can be done to reduce the size. You might want to throw some "with nolock"s in there to ...


8

Just look at the code snippet below and try to imagine the scenario of what will happen: using(SPSite site = new SPSite("http://somesite")) { using (SPWeb web = site.OpenWeb(SameGuid)) { return web.Url; } } The above code can raise an exception because two web objects would be returned, there are infinite scenarios where GUID is used to ...


8

No that is not possible. That layer of the infrastructure is blocked from Global Administrators. Best you can do is something like: $sites = Get-SPOSite -Limit all foreach($site in $sites){ $site.StorageUsageCurrent }


7

Directly querying or modifying the database can place extra load on a server, or can expose information to users in a way that violates security policies or personal information management policies. If server-side code must query data, then the process for acquiring that data should be through the built-in SharePoint object model, and not by using ...


7

In SharePoint 2016 > Create A new web application. Then Create a new site collection. Go back to Application Management > Manage Content database. Click on Content Database name > Check Remove Content Database > OK. Or use Dismount-SPContentDatabase "<ContentdBName>" Open SQL Management Studio. Restore your database. then run the following Mount-...


6

use below PowerShell code: $url="http://sharepoint.contoso.com/site/subsite/" (Get-SPSite $url).ContentDatabase.name Result should appear as: WSS_Content_2


6

There is a couple of reasons for this: SharePoint is from companies point of view a Microsoft product, so if there is a security risk then it's seen as Microsofts fault. This is the reason for Microsoft to putting in a lot of security into SharePoint which by default isn't in ASP.Net like: not running full trust not allowing updates on GETs and unverified ...


6

Yes it's correct, you can't restore a content database to another web application on the same farm because the Content Database GUID is already existing. So to overcome this issue, you have to do the following: Create your new web application Create the root site collection. Backup and restore the site collections from source content database to new one ...


5

When a site collection's size is calculated, the size of the second stage recycle bin is not included. However, the size of 2nd stage recycle bin will contribute to the size of your content database. Perhaps your 2nd stage recycle bin is large? Consider emptying the recycle bin and/or adjusting its quota settings in Central Admin (web application settings > ...


5

This can mean any of the two things. A previously deleted site collection is still residing in the content database if your farm is a SP2010 SP1 and above. This can account to different size of the site collection that shows up in the central admin and a different size for content database keeping all deleted site collections. Your Content Database contains ...


5

Try to run the below cmdlet to upgrade all content database that still needs upgrade Get-SPContentDatabase | ?{$_.NeedsUpgrade -eq $true} | Upgrade-SPContentDatabase For more details check Database running in compatibility range and upgrade recommended Note: If your farm has been on a patch level lower than July 2015 CU and would like to go to a CU equal ...


4

You may have deleted (but not removed) SPSites in your content DB, which shows in SSMS, but not in Central Administration. To check if you do, run: >Get-SPDeletedSite If there are deleted sites, you'll see these sites listed like this: WebApplicationId : 009c1289-392b-43a6-8222-146117074738 DatabaseId : 88efc46f-5a2b-4171-81cb-7577da65bac3 ...


4

AFAIK, using the existing services; it is not possible to access the content database informations from Client Object model or services. As a work around you can create your own WCF service and deploy it in SharePoint, which can provide your required data. How to Customize WCF Services in SharePoint 2010 SharePoint 2010: Create Custom WCF Service


4

The content database gets created when a web application is created. However, there can be more than one content databases in a web application as can be more than one site collection. Each site collection can have a maximum of one database but more than one site collection can share a same content database. This has been the case in MOSS, SP 2010 and is ...


4

Another way via PowerShell $site = Get-SPSite "your site url" write-host $site.WebApplication.ContentDatabases Result look like: SPContentDatabase Name=DEV2_WSS_Content_80


4

Only Powershell is not working after detaching the DBs from Original SQL or other stuff also broked? You can modify manually the rights associated to your account in SQL Server, but I prefer using the Add-SPShellAdmin This link is external to TechNet Wiki. It will open in a new window. cmdlet, which will do the work for you. Launch this cmdlet by using (...


4

Yes you can, but be sure to try this in your test environment first. Follow the steps in the article SharePoint with more than one SQL instance: possible or not possible On the SQL server Backup the content database. Restore the database on the second instance Add the same permissions for the content database that you had on the source ...


4

As this is part of the SharePoint list schema, it is compressed in the tp_Fields column. Unfortunately there is no public documentation as to how to decompress this value into something you can use. And as Thriggle points out, you should be using the SharePoint OM. If you're dead-set on making SELECT queries, always use WITH (NoLock).


4

It happens from time to time, in the server OM, there's a check against the context (Web or not) so some operations are forbidden even if the identity running the code has the correct permissions. You don' want to consider a timer job, but in your case I would think again: with a timer job you'd have no problem at all. That job could be a work item job, ...


4

2 things I can think off hand: Tell users to start purging content that is no longer necessary. Use Move-SPSite to move some site collections to a new content database. Based on your comment and making some assumptions, it isn't going to be that easy. You'll need to fracture off some of your subsites and make them their own site collections and then you ...


4

Transparent Data Encryption is fully supported. Another option is BitLocker on data volumes.


4

That's the right approach to take, but you'll need to do a couple of other things as well: When you've restored the DB to the new SQL server, run EXEC sp_chagedbowner 'domain\user' to change the owner of the content database to the farm admin (also known as the database access account) for the new farm. Ensure that the authentication mechanism of the web ...


4

Addition to Eric's answer (I know the question is related to CSOM) . But manually if you want to check storage usage then you can check it from site setting, admin center as well as from SharePoint designer. SharePoint designer. Admin Center: Site Setting:


4

There is no specific risk for maximum file size. Instead, the risk would lie with the content database size. As long as you can accommodate large content databases and meet any defined RPO/RTO, you should be all set. As I'm sure you're aware, even with a max file size defined (say 50MB), if you have enough of them, you can still have a very large database.


4

I would do a testing before increasing the file size in the farm, because uploading the large file will take more time and some time you can have browser time out. I will have a 10 users at the same time to upload the large file ( whatever size you want to set as max limit). evaluate your SharePoint and SQL performance. also test a library which have many ...


Only top voted, non community-wiki answers of a minimum length are eligible