The SiteMap that the menu is based on is cached by the runtime. When you add a page from the UI we clear the cache but there is no way to do that from sql.
I would compare the data from content created in the UI to see what you are doing wrong, probably some missing or incorrect guid or relationship fields.