Domanda

Sto cercando di utilizzare i dati da un elenco SharePoint in SSRS (Reporting Services) .
Il rapporto non è troppo grande - solo poche decine di righe, ma per ogni riga ho bisogno di aggiungere i dati da un secondo elenco, che (attualmente) contiene 7000 righe. Su SharePoint 2007 che ho fatto con successo le cose simili, ma non riesco a farlo funzionare su SharePoint 2010.
Ho provato:

Continuo a colpire lo stesso muro - non riesco a ottenere tutti i dati perché l'elenco è troppo grande! Ottengo un errore simile a:

L'operazione tentata è proibita perché supera la soglia della visualizzazione elenco imposto dall'amministratore.

Questa è scoraggiante. Ho letto un bel po 'su questo argomento e non riesco a vedere un buon modo intorno ad esso oltre ad aumentare la soglia sulla intera applicazione.

C'è un modo semplice intorno a questo nuovo limite? Esiste un modo più duro?
Sto cercando una "best practice" ... Non sembra posso continuare ad usare uno di questi metodi in modo affidabile. L'unica soluzione "buona" mi viene in mente in modo da utilizzare SSIS per copiare tutte le righe in un database, ma che sembra un eccessivo ...

È stato utile?

Soluzione

In Amministrazione centrale è possibile disattivare la soglia lista completamente, o impostare un limite superiore. È anche possibile impostare una finestra di tempo in cui il limite è disattivato e si esegue il servizio di rapporto allora. Vai alla pagina di gestione di applicazioni web in Amministrazione centrale e selezionare l'opzione di risorse di banda dal pulsante Impostazioni Generali del nastro.

Se si esegue una query CAML un elenco con un filtro in modo tale che restituisce meno elementi rispetto alla soglia che dovrebbe funzionare anche.

Altri suggerimenti

Per evitare la soglia ListView, è necessario colonne di indice nella libreria e query quella colonna. Fino a quando il numero di righe restituite nella query è inferiore alla soglia ListView, non sarà possibile ottenere l'eccezione.

Per fare un esempio, mi ha colpito questo problema quando si cerca di recuperare tutte le cartelle in una raccolta di SharePoint. Il numero di cartelle è stato ben al di sotto di 5000 (la soglia predefinita ListView), ma con oltre 20.000 elementi nella libreria, mi è stato innescando l'eccezione.

La soluzione era quella di indice di tipo di contenuto (accessibile tramite impostazioni della libreria SharePoint) e utilizzare la seguente query:

<Where><BeginsWith><FieldRef Name='ContentTypeId' /><Value Type='ContentTypeId'>0x0120</Value></BeginsWith></Where>

Devi solo capire come garantire la query restituirà inferiore alla soglia ListView.

È possibile utilizzare la ContentIterator classe per bypassare il soglia della visualizzazione elenco, ma si avrebbe bisogno di ricorrere a codice personalizzato per recuperare i dati.

Documentazione: "Fornisce metodi per scorrere articoli di elenco, elenchi, siti per regolare la quantità di dati trasferiti (vale a dire, per evitare di gettare uno SPQueryThrottledException)"

SSRS 2008 R2 has a SharePoint data source option that was added. The SharePoint data source will perform a series of 2000 max item queries until the entire query has been completed. This allows you to overcome the list view threshold and not majorly affect performance. PowerPivot performs this even better. It will query the lists 1000 rows at a time and cache the results in an excel tied workbook. PowerPivot also allows for creating lookup columns and relationships. SSRS can then query a PowerPivot data source inside SharePoint like it is an analytics cube.

While the choice for this questioner is to raise the limit, it's there for a good reason: to avoid creating poorly performing sites. As your site grows in content, or it becomes a template for other sites, you'll find that every user hitting the pages that require "relaxing' this restriction will cause your site to slow down. The more users, the faster that performance hit will occur.

I blogged about this and a set of solutions at http://squarepoint.blogspot.com/2013/05/creating-performant-sharepoint-apps.html. There might be some suggestions in there that could help you avoid the problem and keep SharePoint operating without the performance penalty.

You could, also, disable the EnableThrottling property for the specific list with too many items as Michael Morrison wrote here:

$web = Get-SPWeb http://url/to/web/with/list
$list = $web.Lists[“BIG_LIST_NAME”]
$list.EnableThrottling = $false

Good luck!

If you have it available, perhaps consider combining the search API and a web service? Search can index and return a much larger number of fields. Its a roundabout way of getting at the data but it is supportable.

you could define a "service account" and give that account site collection administrator rights. Use that account to query the data. I believe they can query 20.000 items (or was it 5000?!) at once.

If that doesn't work:

  • put an indexer on a list column (uid?)
  • Use powershell to increase the listviewtreshold

Keep in mind that the 5000 items boundary has a purpose. query of 2200 items may decrease performance, a query of 5000+ may even lock the table in the database!

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top