Tag Info

Hot answers tagged

13

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


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

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


3

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

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

After trying my comment (see if you can shrink the DB from SSMS), check this MS article: http://social.technet.microsoft.com/wiki/contents/articles/8217.sharepoint-2010-crawl-database-is-too-large.aspx If nothing else, rebuilding the crawl will eliminate any fragmentation of the current crawl you've got going. Of course, search won't work properly until ...


2

The right way to grant access is to use the SPWebApplication.GrantAccessToProcessIdentity method. It sets up the database permissions for you, but remember to run it again if you add content databases. You can do this with the following PowerShell: $webApp = Get-SPWebApplication TEAM_SITE_URL $webApp.GrantAccessToProcessIdentity("domain\username of MY SITE ...


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

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


2

Straight connections to SharePoint databases are not supported by Microsoft and should be avoid at all costs. On SharePoint 2010/2013 you can either use the Server-side Object Model API from a process running on one of your SharePoint servers or the Client Object Model API from your SQL Server towards the respective site collection - Deciding Which ...


2

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


2

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


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


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

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

It's important to know that accessing data from SharePoint directly through SQL Server is not supported - even if you don't actually change anything. The only supported ways are through the user interface, the API's or via PowerShell. Just don't do it. That said, if you really want to have a look... First you have to determine the content database your ...


1

A few points that I feel I should call out here: All SQL DBs have log files, regardless of the recovery model that has been configured. See Understanding Logging and Recovery in SQL Server I would strongly discourage setting up scheduled database data (.mdf) file shrinks. Shrinking the log files may be acceptable, but it's normally a symptom of an ...


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

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

Sounds like the Application Pool Identity doesn't have access to the Search database in SQL Server. Check the permissions and if necessary, grant it the correct rights. This TechNet forum thread has a little more information that you might find helpful. The article is about the profile database but you might find a little more information about your ...


1

Yes, documents are stored as blobs in the site collection content database (SQL Server). You can read about document management in the Microsoft blog, and on database management on technet.


1

The only way I can think of to export SharePoint data is to use the Export-SPWeb PowerShell command: http://technet.microsoft.com/en-us/library/ff607895.aspx Export-SPWeb http://sharepoint -Path c:\export -NoFileCompression Use the NoFileCompression parameter and it will generate a few XML files and a bunch of other files in the path you specify. Look ...


1

You have two questions here: 1) You can display the page via a Page Viewer Web Part. It renders as an <iframe> tag. See Page Viewer Web Part 2) You might want to look into External Content Types and Business Connectivity Services, but this will require custom code. So if that isn't an option for you, you're probably best off sticking with option 1.



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