SQLPUBWIZ store procedure error using view is created before trigger on view

Topics: Database Publishing Wizard
May 18, 2009 at 9:03 PM

I used SQLPUBWIZ with the -schemaonly option which created the script without any errors. Now when I try to run the script it returns an error of:

Msg 4405, Level 16, State 1, Server MYSERVER, Procedure usp_CreateSomething, Line 25
View or function 'dbo.SomeView' is not updatable because the modification affects multiple base tables.

This is because the store procedure is using a view which has a trigger on it. The view is created before the store procedure (which is correct) but the trigger on the view is created much later than the store procedure. I had to cut and paste the store procedure and put it after the creation of the view trigger to get the script to function properly.

 

Is there another work around or fix for this as I am trying to automate the process of the script?

 

Thanks for any help in advance.

Feb 22, 2010 at 7:01 PM

I am also facing same issue .. Please let me know if any one has answer for this issue...

views script is generating first and table script is creating later  hence it is not executing on the taget environment..

 

Nov 2, 2010 at 12:33 PM

I too have the same problem. I tried to create Database script by using command line SQLPubWiz.exe . Scripting process is successful, but script for Views is generated first and then for Tables, which is wrong as tables needs to be created first and then views coz views refers to those tables.  

any help please..