LinuxDoku / migratordotnet

Automatically exported from code.google.com/p/migratordotnet
0 stars 0 forks source link

CREATE PROCEDURE Migration Fails Via Migration Script #133

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add multiple migrations, one of which is to create a stored procedure 
via a Database.ExecuteNonQuery call.
2. Ensure that the stored procedure migrations is not the first to be 
executed.
3. Run the migrations and generate an output script.  When that script is 
run, because the 'CREATE PROCEDURE..' is preceded by another statement 
which is not completed by a 'GO' statement,  the following error is raised:
"'CREATE/ALTER PROCEDURE' must be the first statement in a query batch."

What is the expected output? What do you see instead?
Expected output is for the migrations script to execute successfully, 
instead the above error is raised.

What version of the product are you using? On what operating system? With 
what .NET implementation/version?
Migratordotnet Version 0.8. .Net 3.5

What database and version are you seeing this issue on?
SqlServer 2005

Please provide any additional information below.

Original issue reported on code.google.com by gmanc...@googlemail.com on 20 Nov 2009 at 11:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I too ran into this problem. Needed to execute a script that creates tables and 
stored procedures via a call to Database.ExecuteNonQuery. The script in 
question is the ELMAH SqlServer script available at 
http://elmah.googlecode.com/svn/trunk/src/Elmah/SQLServer.sql.

Using migratordotnet-0.8.0, .NET 4.0, SqlServer 2008

Original comment by fberr...@gmail.com on 11 Mar 2011 at 6:48