Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > SQLImport comments View modes: 
User avatar
Member
Member
Blasty - 7/2/2010 3:01:58 PM
   
SQLImport comments
Ok, so I tried to use the SQLImport utility provided with kentico, and while I appreciate the effort to provide a tool of this nature, for me it is not usuable. I'd like to say what issues I had with it, in a hope you can improve your product in future releases.

The version I used came with the current Kentico 5.5 install.

Issues:

1. The import utility wrapped everything up into one huge transaction, depending on the amount of data being imported, this can be a Hard drive nightmare for a database. After importing about 11000 items, we had a rather large log file going and had to shut down our initial import of 48000 items.

2. Transaction handling. While transaction safety is a good thing, the SqlImport utility fails to stop an import when something fails. It doesn't appear to decide to unwind the transaction until the very end of the import. even if something failed at the beginning that would guarantee the transaction to not be committed. This can and has wasted an amazing amount of time.

3. Transaction failure. I got a notification of the reason for failure on a small 100 item import, but the large import popped a standard .Net exception pop-up. Could definately use some better error handling considering that your dealing with potentially bad data from a customers DB.

4. I'm taking a wild guess that a web programmer created this form application, considering some of the issues. Anyways, the import process doesn't use a seperate thread apparently, since the UI locks up completely and I don't get any progress bars or notifications of how the import is going. To figure out how it was going I had to get what I call "Ghetto Updates" by running nolock count statements against the custom.[doc] table the item was importing to.

5. At first I was going to stagger the import via the select statement I put in and only do 1000 items at a time. While this was working, It would of been really nice to save my document mappings when choosing the new import option. Everytime I used the utility I had to remap the same document to the same fields.

6. No merge functionality at all, I had a database that was filled with test data when developing the site, and the import utility was just going to insert the data on top of what was already there. Potentially an option to delete all existing documents would of been nice. Deleting 6000 test documents via the CMS desk consumed quite a bit of time.


I discovered the reason that the utility was failing on import and unwinding everything was because the field I chose for the document name had a blank space on some rows. Unfortunately even though something like document name was incorrect, the application continued to spend another 5 hours attempting to import data even though It was guaranteed to unwind it.

So, in summary, glad you made a utility like this for people, it just needs some clean-up. In the mean-time I created a console application that uses your treeengine to do node.Insert statements. Would love something similar to LINQ datacontext that lets you InsertAllOnSubmit...that way you could interact with the database in a more efficent manner.

I'll save my comments on the sql statements being generated for another thread.


User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/7/2010 3:52:49 AM
   
RE:SQLImport comments
Hi,

Thank you for your comments. I have forwarded them to our CTO, who is currently building new SQL import utility. He is developing it because, in general we are aware of the issues you described for bigger projects, whereas the current SQL import was not designed for this amount of data you have used with it.

Anyway, I hope that the new import utility will meet all your needs and that it will be available soon.

Also, using the API to handle the tree nodes is a good way to handle your need right now.

We are sorry for all the inconveniences you had with the import tool.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Blasty - 7/7/2010 8:00:42 AM
   
RE:SQLImport comments
Thanks, currently I'm working on trying to import another document that has 932,000 items in it. Using your API to handle this is unfortunately going to take me a few days to import. I'm currently working on a potential workaround to accelerate the import.

I see that each time I add a document with no attachments, it basically does an insert to the CMS_Document table, CMS_Tree table and the custom_[object] table.

It also fires off a few house keeping stored procedures as well. It would be really nice if the API had a multiple document insert feature. Where I could possibly stick 50 documents in an object and then fire a submitchange method or something.

As of right now I'm revewing all the inserts in Sql profiler and attempting to recreate the API in order to get this import down to hopefully something like 12 hours.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/8/2010 9:14:45 AM
   
RE:SQLImport comments
Hi,

I understand you, but this fits just for your particular case.
During the insert of a document, there are many things that have to be ensured to keep the system consistent - unique name, parent node, culture, etc. However, there are possible some improvements by turning off some of these checks, but there is risk that something could be inconsistent in the database.

Moreover, here you can find more information about Content management internals.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Blasty - 7/8/2010 9:41:38 AM
   
RE:SQLImport comments
yeah your right, those items are critical to each insert. In my case the parent node for my documents stays the same, the culture stays the same, the order doesn't matter, and I don't need it in the event log.

So I was able to remove these calls and actually accelerate my import to 100 documents every 0.7 seconds by building a console app and utilizing a few stored procedures to do the inserts.

But someone with a bit more culturally diversive system, or complicated parent/child node structure wouldn't able to cut stuff down like I did.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 7/20/2010 8:20:56 AM
   
RE:SQLImport comments
Hi,

As I mentioned earlier, I have forwarded your notes to our developers because new version of Import tool was made, I hope they were able to implement/fix some of the things you mentioned. The description of the new SQL import tool is available in this CTO's blog post.