Tag Info

Hot answers tagged

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


3

For SP 2010, you can use Web Analytics feature built in SharePoint: http://blogs.msdn.com/b/ecm/archive/2010/03/21/introducing-web-analytics-in-sharepoint-2010.aspx For SP 2013 things have changed a bit, so you have to use Usage reports: http://technet.microsoft.com/en-us/library/jj715890.aspx


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

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

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


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

Yes you can leverage the same database server across multiple installs. The only thing you should take care of is to use unique "Database" names so it will not conflict with each other. For example: Append "SP2010" to all databases that are created for SharePoint 2010. Also you should increase the server capacity to support both. Sharepoint 2010 and ...


1

Here is a guidance to rename the Usage and Health Data Collection service application: http://technet.microsoft.com/en-us/library/jj219726(v=office.15).aspx Stop your Service with: $usage = Get-SPUsageApplication $usage.ServiceInstances | % {Stop-SPServiceInstance $_.ID} In your SQL Management Tool Rename the database. I had problems doing this because ...


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

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

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



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