How to delete/overwrite the Sharepoint list?

Jun 17, 2010 at 9:36 PM

I used the script to successfy connect to the database and created a sharepoint list. 

I Would like to know how to overwrite the sharepoint list everytime i run the package?

(Basically delete the list and overwirte the same list with different output of the sql.)

Anything I am missing something here....?

Thanks..

 

 

 

 

Jun 24, 2010 at 5:11 AM

There is a slow way and a faster way....

Slow way: Read in the list with the source, and point it at the destination with it marked to "Delete" the items.

However, I think it may fill your recycled items on the server and is not the most efficient.

 

Faster way: Read in the source list and read in your data you want to go into the list. There are other discussions where it talks about how to use SSIS to join the dataflows together so that you would be deleting only the rows which are no longer in your source, insert rows which are new, and update rows which are changed.  That is the most efficient way to do this.

Jun 24, 2010 at 3:44 PM


On Thu, Jun 24, 2010 at 6:46 AM, ramesh <rameshusa@gmail.com> wrote:
I will send the code once i am in office. I am going to write a blog on this too.

There are 3 ways:

1. Get the handle of the list using splist. go in a a loop and use delete the items one by one. If your list is too big, it will kill you. For an item it takes about a sec. Very slow.

2. Use can use processbatchdelete ( will send you a link later ), this is faster compared to 1, however still took about 4 min to delete 10000 items.

Both uses the same GUID.

3. I have written a SSIS package to populate the list using codeplex tool. Basically you write your sql connecting database and populate and use the database as source and the sharepoint list as destination. ( will send you a link for this too).

4. If you do not care about GUID ( In my project, I have to populate the list items from production every 4 hours ), use the script to build a .net project to delete the list and recreate the structure with the list template. This takes about 1 sec to delete the list of 19K items and takes less than a sec to create a list from list template. This will create only a list not data. So, run SSIS package after this to populate the data.

I have not seen the detailed discussion which the reply says. Will look into that. Sounds good.

Ramesh


ramesh




On Thu, Jun 24, 2010 at 12:11 AM, kevinidzi <notifications@codeplex.com> wrote:

From: kevinidzi

There is a slow way and a faster way....

Slow way: Read in the list with the source, and point it at the destination with it marked to "Delete" the items.

However, I think it may fill your recycled items on the server and is not the most efficient.

 

Faster way: Read in the source list and read in your data you want to go into the list. There are other discussions where it talks about how to use SSIS to join the dataflows together so that you would be deleting only the rows which are no longer in your source, insert rows which are new, and update rows which are changed.  That is the most efficient way to do this.

Read the full discussion online.

To add a post to this discussion, reply to this email (SQLSrvIntegrationSrv@discussions.codeplex.com)

To start a new discussion for this project, email SQLSrvIntegrationSrv@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com



Jun 24, 2010 at 3:49 PM


On Thu, Jun 24, 2010 at 10:48 AM, ramesh <rameshusa@gmail.com> wrote:
kevinidzi,
 
Can you send me any link for how to send only the delta items to update a sharepoint list using SSIS? You had mentioned only the newly added rows, modified rows and deleted rows will be sent to the list to update.
 
Ramesh


 
On Thu, Jun 24, 2010 at 10:44 AM, ramesh <rameshusa@gmail.com> wrote:


On Thu, Jun 24, 2010 at 6:46 AM, ramesh <rameshusa@gmail.com> wrote:
I will send the code once i am in office. I am going to write a blog on this too.

There are 3 ways:

1. Get the handle of the list using splist. go in a a loop and use delete the items one by one. If your list is too big, it will kill you. For an item it takes about a sec. Very slow.

2. Use can use processbatchdelete ( will send you a link later ), this is faster compared to 1, however still took about 4 min to delete 10000 items.

Both uses the same GUID.

3. I have written a SSIS package to populate the list using codeplex tool. Basically you write your sql connecting database and populate and use the database as source and the sharepoint list as destination. ( will send you a link for this too).

4. If you do not care about GUID ( In my project, I have to populate the list items from production every 4 hours ), use the script to build a .net project to delete the list and recreate the structure with the list template. This takes about 1 sec to delete the list of 19K items and takes less than a sec to create a list from list template. This will create only a list not data. So, run SSIS package after this to populate the data.

I have not seen the detailed discussion which the reply says. Will look into that. Sounds good.

Ramesh


ramesh




On Thu, Jun 24, 2010 at 12:11 AM, kevinidzi <notifications@codeplex.com> wrote:

From: kevinidzi

There is a slow way and a faster way....

Slow way: Read in the list with the source, and point it at the destination with it marked to "Delete" the items.

However, I think it may fill your recycled items on the server and is not the most efficient.

 

Faster way: Read in the source list and read in your data you want to go into the list. There are other discussions where it talks about how to use SSIS to join the dataflows together so that you would be deleting only the rows which are no longer in your source, insert rows which are new, and update rows which are changed.  That is the most efficient way to do this.

Read the full discussion online.

To add a post to this discussion, reply to this email (SQLSrvIntegrationSrv@discussions.codeplex.com)

To start a new discussion for this project, email SQLSrvIntegrationSrv@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com