Tag Info

Hot answers tagged

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. ...


9

CAML queries are NOT vulnerable to SQL injection. I don't think you'll find any direct reference or proof. Consider that the conversion from CAML to SQL all happens between the data layer and the SharePoint API. You can't control how SharePoint generates the SQL for a given CAML statement and therefore you don't have to worry about SQL injection. That's ...


6

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 ...


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 > ...


4

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 ...


3

so couple of things to check. From the SQL reports look a like actual data presents in the table rather free space and moreover no AuditTabel issue. I would recommentwo things. run the below powershell and see if it update the storage. $URL = "https://<spsite>/<sitecollection>" $Site = Get-SPSite -identity $URL $Site.RecalculateStorageUsed() ...


3

There could be much empty space in your database file as SharePoint databases are not shrink automatically. When you delete anything in database the space of it still remains in database file and is used in the future. You can free most of this space manually by shrinking the database file by these commands. You should also check tables in SharePoint ...


3

Jasper, There are few things that counts for the site usage. - Check recycle bin (end user as well as site collection recycle bin). - Check document library version, this is the major culprit in using up the space, the size of document gets multiplied by the number of version. Try to limit version to last 10. - Check for database fragmentation, this ...


3

If you have the old db-server up and running, use the following command in PowerShell: Get-SPSite -ContentDatabase <SourceContentDb> | Move-SPSite -DestinationDatabase <DestinationContentDb> This command moves all site collections from the source content database to the destination content database. Reference: Move site collections ...


3

Strategies for accomplishing this query while working around the constraints: Shorten your query: Do you really need to update 5k records at the same time? Prefer to reduce updates to those actually being changed. If still too big for a successful update then you can break up the records and only update 1k at a time. Change your connection method from ...


2

Simple answer: Yes it is forbidden. From my point of view you have following options: Do a proper database migration from 2007 to 2010. Metadata will remain untouched. Do the webclient migration and you can create a PS script that will modify the Created and Modified By fields for you and it will be supported. Look up a third party migration tool that ...


2

You can update system properties (Created, Created By, Modified, Modified By) using code like that: using (SPSite site = new SPSite("Your site url")) { using (SPWeb web = site.OpenWeb()) { var list = web.Lists.TryGetList("Your list name"); var query = new SPQuery() ...


2

Writing queries directly on SharePoint databases is highly discouraged. You should consider the database as a black box which you can interact with through the provided APIs (either SSOM, CSOM, REST or web services). Here's how you can retrieve a view definition, using SSOM: SPView oView = oWebsite.GetViewFromUrl("Lists/List_Name/View_Name.aspx"); var ...


2

TEMPDB is a temporary database that contains all Temporary user objects such as: global or local temporary tables, table variables, cursors. It also includes internal objects created by the SQL Server Database Engine; For example, work tables to store intermediate results for spools or sorting. All the mechanism of row versions is being handled and managed ...


2

In SP2013 you also need to run New-SPEnterpriseSearchFileFormat see HOW TO: Implement a custom iFilter in SharePoint 2013


2

Directly accessing the SharePoint Database not recommended in production in any who. But you can do it in Staging or dev/test farm. For read operations: Reading from the SharePoint databases programmatically, or manually, can cause unexpected locking within Microsoft SQL Server which can adversely affect performance. Any read operations against the ...


2

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 ...


1

You need to rename one of the Databases. Is the Usage database the only one with a conflicting name? You can try: Removing the service application without deleting the database Using SQL Management Studio to rename the database to a new, non-conflicting name Provision the service application pointing to the renamed database Step by step: ...


1

Of course it will be, however, it's also not recommended to touch the database directly. Perhaps you could do this for the reading part only, but use the SP Api to write?


1

You will have to use SQL Aliases. Basically you backup and move all your databases to the different sql server, stop all sharepoint services, and through aliases you can point the backend to a different sql server: http://technet.microsoft.com/en-us/library/cc512725(v=office.15).aspx


1

What you are encountering is a code access security issue (CAS). Basically SharePoint only trusts certain assemblies to perform certain "risky" operations and your assembly is not on the list. The way the list of assemblies that are allowed to do certain things is managed is through a CAS policy file which is located in the config folder of sharepoint. You ...


1

You need to fist decide what data you want to store in your database, then you can work on making the forms supply the required info. In the example here I'm storing a users login name in the database as a text field , using a peoplepicker to get the info and I'm storing field called Entity as a text field, using a Select box to get the value. I could also ...


1

In short you could declare them as varchar as you asked. However, BCS will create your mapped fields (for your external list through the External Content Type) based on the column types (e.g. if your database column for "Name" is varchar(50) then your ECT field "Name" will be a single line of text). Also, you won't get any built-in validation support if you ...


1

just like to note this issue has been answered on technet forum that asks exactly your question! There is no real direct relation between the DB size and the content size, there is but not in a direct fashion. The size of the DB is usually the size when the content was at its peak. There is no automatic shrinking of the content DB's in SharePoint. ...


1

Performance for querying a SharePoint list will be much, much worse than a sql table. Well, there could be some use case where the list would provide a benefit. Perhaps the query is a very expensive query, and you're caching aggregated results in a list? Perhaps. But even that would be an odd use of a list, as you could cache results in another table just as ...


1

Since SharePoint Content database connection string is stored in Windows Registry, the following example demonstrates how to read Data Sourcefrom a SharePoint Content Db connection string: /// <summary> /// Get SharePoint Content Db DataSource (SharePoint 2010) /// </summary> /// <returns></returns> private ...


1

As the change in the allocation should not require a SQL restart I would guess that you have something else hogging the rest of the RAM. Look into the Proccesses tab and see if the culprit is visible there. As a best practice, nothing except SQL should be running there.


1

It seems you are putting a heavy load on the server and that cannot be handled by the SQL Server itself. I would suggest splitting it into chunks, executing one by one and also increase the timeout to something relatively better for the particular query. I think it is ok to increase timeout upto 90 seconds depending on the situation and then can rollback ...


1

We had the same problem with InfoPath. After analysis of servers,it turns out that the anonymous user authentication has been enabled on the web application server via IIS and not via SharePoint (unsupported configuration), causing side-effects on some queries which calls to forms. We disabled anonymous access.This deactivation causes the functioning of ...


1

Here's a crazy idea: keep the alias, and for your custom SQL DBs, use the IP of the SQL Server in your web config that those web parts use. That way you bypass the alias that is borking your custom DB pointers.



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