I was having trouble with the Database Publising Wizard scripting Create Views before it scripted the Create Tables these views relied on causing the publishing to fail. I read here that was fixed in ver 1.1 so I went to MS and installed it. The MS page said it was version 1.1, but Add/Remove programs on my system says I now have ver 1.3 installed. This one seems even worse. The objects are scripted in an order that is unusable.
I believe if the scripting is to run properly the order must be: Drop all, Create Roles, Schema, Tables, UD Functions, Views and finally Stored Procecdures.
I attemped to do the upload in that order. I was able to get the Roles, Schema and Tables to publish directly from the wizard. That was good. Then I chose to script the UDFs to my machine. It scripted these, but also included a number of drop statements for objects it was not going to recreate, so I had to hand edit and remove those. I ran the script through may host's web interface. I then did the same with the views, hand editing out the erroneous drop statements. When I asked the Wizard to script the stored procedures, it scripted nearly the entire database as reported earlier by Nalaka. The created file was nearly as large as a worthless script file of the entire DB! It took me nearly an hour to carefully remove the script statements I didn't need.
What had once been an approximately 20 minute task mostly spent waiting for the Wizard to interact with the server had now taken more than four hours. I was finally able to get my database running again, but many users may not have the many years of DB experience I have which allowed me to restore my database after the Wizard had dropped it, and could not recreate it.
This is a very improtant tool. It is referenced on many websites that discuss using Visual Studio to create and publish web content. If Microsoft plans on continuing to compete succesfully with all of the many new development environments that are out there this tool needs to work properly.
Can we please have a tool that scripts the objects in an order that will allow the script to run? And also, when scripting individual objects and/or object types is requested, can it please not drop object it does not plan on restoring. This is pointless and destructive.
I use this tool often to publish new sites I create for my clients. Please let me know when a repaired version is available. I couldn't find a discussion of this on an official Microsoft website, so I am posting this here in hopes the issue will be addressed. If someone knows where to download earlier versions that may be helpful too. Also what is the file name. I can find no indication of where it is installed on my machine. It would sure be helpful if Add/Remove Programs could cough-up a path for its listed items.
Respectfully,
Craig Williamson