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

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


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


2

SSRS can be scheduled to run a report on your Site Collections, output them to CSV or similar and then use SQL to read the output and build a data cube. That could be a manageable, no/low code solution to build snapshot information for historic reporting.


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

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


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


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

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.


1

It's not ideal, however the best way (in my experience) would be to use multiple aliases to help simplify this issue. One possible workaround could also be to update the SharePoint servers host files to point the db server names to the new IP address(es). The hosts file overwrites DNS entries, and is located in C:\windows\system32\drivers\etc\hosts. The ...


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

If you have an issue with the Secure store, it might be wise to re-create the application definition. Your scenario, if I got it right, should enable a pass-through SQL connection to all users by using a single SQL Account. In such situation you need to verify that the Secure Store application is properly configured: Create it for a Group in the "Target ...


1

You can use SSIS (SQL Server Integration Services) to Extract, Transform (if necessary), and Load (ETL) the SharePoint list data into SQL Server tables or tables. There is an SSIS adapter for reading/writing to SharePoint Lists that can be found on CodePlex. http://sqlsrvintegrationsrv.codeplex.com/releases/view/17652 You can schedule SSIS jobs with ...


1

Look into using Business Connectivity Services. This will allow you to connect to the SQL database, view items in SharePoint, as well as search for them, within the existing SP setup. If you want to keep it outside of BCS, you'll need to create the search experience custom, from the search box to the search results page.


1

There are a couple of things to check from your very informative images: Are you logged in as sp_admin while running the script? Can you open and view Central Administration? Do the sp_admin account have db_owner permissions on the SharePoint_AdminContent database? If not, add permission.



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