Hot answers tagged

11

First of all you should just rule out the use of SQL. You should not use SQL directly against SharePoint content databases. If you ever do modifications directly using SQL that SharePoint Farm becomes unsupported for ever. Even just doing reads makes your SharePoint Farm unsupported as long as they are occuring and may cause any kind of problems as ...


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


8

I'd go for the SQL database. For several reasons: Storing into SharePoint list adds a lot of overhead that you don't need. With 20K items per day you'll reach the supported max in 15000 days and list throtling limit in 6 hours But most important with that amount of data what you want to get out is aggregate to make sense of the data. And this is the area ...


5

I would, and have in the past, use a separate SQL database to store all of that data. This will require additional work for the presentation of the data, but using BCS, SSRS and/or PowerPivot, you can pretty easily pull that into SharePoint. I wouldn't put that much into a SP content database and expect good things ;)


5

SharePoint Search will return the url to the document in Path when it thinks a file is a document (isDocument == 1), but if the file isn't a recognized file type SharePoint will treat it as a list item and return the url of the display form in Path. You can add support for more file types by adding IFilters (see here for PDF: How to configure PDF iFilter ...


5

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


5

This is completely unsupported! Do not read or write data to SharePoint databases. You need to go through the SharePoint Object Model, namely using SPWeb.EnsureUser which will add the entry if it does not exist.


5

Where does SharePoint list stores data in SQL? In SharePoint Content DataBase at AllLists INNER JOIN AllUserData ON AllLists.tp_ID = AllUserData.tp_ListId where the data stored at AllUserData.tp_ColumnSet column as XML Can I access data directly and is it recommended? No, it's not recommended and not supported and I advise you to don't touch the ...


4

I'd highly discourage doing this kind of operation. Even though reads from the content database only makes your installation unsupported as long as they are occuring, you shouldn't do them. The problems you'll run into are: You are very likely to affect SharePoints operations in unsupported ways remember you can't even read without introducing locks You ...


4

Nico, I found a source that may help you immensely. The following link walks you through how to use a PowerShell script to import a list of users from Excel and create them for FBA. Importing and Exporting Data in Extranet Collaboration Manager (ExCM) 2010 You can also download the PowerShell source code from this link. It looks like the code creating ...


4

Depending on your specific requirements, the easiest way is probably to use BCS to create external content types that link to your MySQL data. Your SharePoint hosted app can then read/write that data more or less as if it was a standard SharePoint list. The benefit of this approach is that it is quite quick and easy to set up. The downside is that it may be ...


4

You can detach the content database from central admin and then reattach using the correct SQLCluster Name. You dont need to delete anything. Attach or detach content databases in SharePoint 2013


4

You must use cliconfg.exe on each SharePoint server to point the 'old' SQL Server name (and instance if applicable) to the new SQL Server name (and instance if applicable). So if you had an old SQL Server name of OLDSQL and a new one of NEWSQL, you would run cliconfg.exe on each SharePoint server, go to the Alias tab, add an alias named OLDSQL. Set it to TCP/...


3

Try with FileName field as follow: select Title, Path, Filename from scope() Hope it helps!! :) It it's not then I believe, u have to go through the steps Per Jakobsen has mentioned above.


3

well, state service just use SQL DB to store user session data so Guids are most probably refers to current User session. Lock on a SQL table can appeared after too many requests at the same time. Probably your State Service is a performance bottleneck for a bigger farm? Could you please enable SQL profiling on State DB and check its performance and locks? ...


3

The following whitepaper details all enterprise-only features and how they are used with SharePoint: http://technet.microsoft.com/en-us/library/cc990273.aspx It also includes a table that relates SQL Server editions with SharePoint functions. The most complete overview of SQL Server features can be found at http://www.microsoft.com/sqlserver/en/us/...


3

You'll likely want the SharePoint Products and Technologies Protocol Documentation. These contain descriptions about the database structure, including table schema, sprocs, and so forth... Along with a lot of other information. And as everyone else has noted, making changes is, for the most part, unsupported. Check out KB841057 for more information on ...


3

Updates or other operations that directly target the database are a taboo in SharePoint, so you need to search for another alternative. The batch update infrastructure comes to mind. Using batch update you can define a set of update commands that will be executed as a batch by the server. That way you will be able to process all your update as a block ...


3

A simple way would be to make either a SharePoint list that contains all of the fields you need or an external sql table then have a timer job cache the results daily (or more?). You could also (either in additional, or only) have the call on the page write the results to a table/list and query that table/list before making the expensive call. The second ...


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


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

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


3

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


3

Delete your web application. Create a new one. Take care that the authentication mode is identical with the initial web application in which your backed up site collection has been created. Do not directly assign your restored content database but let Sharepoint create a new (empty) content database. Next, from your Central Administration => Application ...


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

Do not remove the site collection from the database! Just remove it via the GUI (Site settings -> Delete site) or use the PowerShell cmdlet Remove-SPSite (outlined here). This will make sure it is deleted the right way


3

I would also like to add that you can also accomplish this with SQL Table Views. So if you create a custom view within your SQL DB, you can connect to it in BCS using SP Designer as if it was a regular table. My understanding is that if the View is update-able as defined here, you will also be able to add Update controls to it. To add a view as an ECT ...


3

You can use the script to give specific users the db_owner role. Don't forget to dd all users to users.txt. [System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.SqlServer.Smo’) | out-null $Users = get-content c:\users.txt Foreach ($User in $Users){ $InstanceName = "" $NewOwnerLoginName = $user; $smosvr = New-Object (‘Microsoft....


2

I suggest you writing your code in C# or VB.NET, There's no support for direct DB operations. You can use the OOTB Lists web service to update the list: Lists.UpdateListItems Method (Lists)(http://msdn.microsoft.com/en-us/library/lists.lists.updatelistitems.aspx) Or use the SharePoint object model like this: SPList list = web.Lists["ListName"]; //...


2

its not related to sharepoint, well kinda ;). In the error its telling you exactly the issue at hand! You dont have the execute permission ;) . So you need to goto your server where the sql database is stored. Then go through the stored procedures that are stord in the databse. You should be looking for: proc_GetProductVersions It looks like your in the ...


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