﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum / StrataFrame Database Deployment Toolkit / Issues  / Deploying to server - error when creating stored procedures / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>forum@strataframe.net</webMaster><lastBuildDate>Mon, 08 Sep 2008 06:29:42 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>Yeah, you got if figured out.  Glad to help :)</description><pubDate>Mon, 24 Mar 2008 09:35:42 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>Thank You for the fix. I have applied it and tried to run deployment again. However - new error has occurred when applying on the existing database:&lt;/P&gt;&lt;P&gt;• 22.3.2008 10:19:04 -&amp;gt; Deploying meta-data for database 'RCEL_Protocols'&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Ensuring Filegroups exist on database 'RCEL_Protocols'&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Filegroup verification complete.&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Ensuring Tables exist on database 'RCEL_Protocols'&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Table verification complete.&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Dropping unneeded filegroups for 'RCEL_Protocols'&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Unneeded filegroups dropped on database 'RCEL_Protocols'&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Ensuring Indexes exist on database 'RCEL_Protocols'&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Index verification complete.&lt;BR&gt;• 22.3.2008 10:19:05 -&amp;gt; Ensuring Foreign Keys exist on database 'RCEL_Protocols'&lt;BR&gt;• 22.3.2008 10:19:06 -&amp;gt; Foreign Key verification complete.&lt;BR&gt;• 22.3.2008 10:19:06 -&amp;gt; Ensuring Assemblies exist on database 'RCEL_Protocols'&lt;BR&gt;• 22.3.2008 10:19:06 -&amp;gt; Assembly verification complete.&lt;BR&gt;• 22.3.2008 10:19:06 -&amp;gt; Ensuring Views, Stored Procedures, and UDFs exist on database 'RCEL_Protocols'&lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt; An error occurred while deploying the meta-data to the server.&lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt; ArgumentException        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;   Column 'Type' does not belong to table .        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;         &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt; Source     : System.Data        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;         &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt; Stack Trace:         &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;    at System.Data.DataRow.GetDataColumn(String columnName)        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;    at System.Data.DataRow.get_Item(String columnName)        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DropAllDeployedViewsSprocsAndUdfs(DatabaseInfo dbInfo)        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.EnsureViewsSprocsUdfs(Database parent, DatabaseInfo dbInfo)        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.EnsureDatabases()        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DeployMetaDataThread()        &lt;BR&gt;X 22.3.2008 10:19:06 -&amp;gt;  &lt;/P&gt;&lt;P&gt;Then the execution doesn't stop but doesn't continue too.&lt;/P&gt;&lt;P&gt;I have then dropped the old database and tried new deployment - succesfully. Then again and again succesfully :-)&lt;/P&gt;&lt;P&gt;Thank You for this fix, it works!</description><pubDate>Sat, 22 Mar 2008 04:27:07 GMT</pubDate><dc:creator>Jiri Brazda</dc:creator></item><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>Here is the fix: &lt;A href="http://forum.strataframe.net/FindPost15092.aspx"&gt;http://forum.strataframe.net/FindPost15092.aspx&lt;/A&gt; </description><pubDate>Fri, 21 Mar 2008 13:11:39 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>Thank You for info. I'm going to wait for the new version :-)</description><pubDate>Fri, 21 Mar 2008 10:47:34 GMT</pubDate><dc:creator>Jiri Brazda</dc:creator></item><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>Apparently a new bug has been introduced with 1.6.5 when using funny schema names.  We made a change to prevent all views, sprocs, and UDFs from being deleted and only remove the ones deployed by the DDT.  The problem is that the extended properties are not repsecting the schema name.  We have reproduced the problem and will post a fix once we get to the bottom of the issue.</description><pubDate>Fri, 21 Mar 2008 10:00:52 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>First, as Keith mentioned, you can check your Object Name History.  However, I do not think that is your issue here.  It sounds to me like you have one schema name deployed on the server (i.e. dbo) and are trying to deploy a different schema (M01).  This can cause an issue. &lt;/P&gt;&lt;P&gt;&lt;FONT color=#ff1111&gt;- I have created whole database design by DDT - I haven't set anything on SQL server side. Actually my database contains table in 4 different schemas (correspoding to logic application modules)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;In the 1.6.5 build we changed the logic of the DDT so that IT people can add their own sprocs, views, and UDFs to a database and they will be left alone byt eh DDT.  Previously we deleted them all.  We now set an extended property on the object so that we can tell which were deployed by the DDT.  The other problem you could be fighting here is that the sproc ProductType_Delete was manually added on the database and then added into the DDT...which this could potentially cause the error.  &lt;/P&gt;&lt;P&gt;&lt;FONT color=#ff1111&gt;- No, I haven't created any SP manually - all stored procedures has been created by DDT when checking "Create ... Stored procedure" in table properties&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Finally, the last thing to check, is if you have a table name called ProductType and are allowing the DDT to created the DELETE sproc for you and you also have a sproc of this name...this would create a conflict and could present this error.&lt;/P&gt;&lt;P&gt;&lt;FONT color=#ff1111&gt;- As I have mentioned before, I have created tables and everything else was created automatically. I do not know what and where to set.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;One thing to always try and do when you run into things like this is to deploy to a fresh database name (one that doesn't exist) or server so that you can troubleshoot the problem more easily.&lt;/P&gt;&lt;P&gt;&lt;FONT color=#ff1111&gt;- Well, I have deleted the database from SQL server. Then used DDT to deploy the project to database - everything succesfull, no error. The I tried to deploy the same project again - everything successfull (tables, indexes, primary keys etc.) - except stored procedures. The behavior is the same that I have described before.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;If you can't get any of this to work, post your package file here and we will take a look at it and tell you where your issue is. &lt;/P&gt;&lt;P&gt;&lt;FONT color=#ff1111&gt;- I have attached my project and resulting log.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#111177&gt;Thank You for Your assistence&lt;/FONT&gt;</description><pubDate>Fri, 21 Mar 2008 03:12:29 GMT</pubDate><dc:creator>Jiri Brazda</dc:creator></item><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>[quote]Is there any possibility to include something like "If exists then drop..."? Or is there any workaround?[/quote]&lt;/P&gt;&lt;P&gt;This logic already exists :)  You are fighting something else.&lt;/P&gt;&lt;P&gt;First, as Keith mentioned, you can check your Object Name History.  However, I do not think that is your issue here.  It sounds to me like you have one schema name deployed on the server (i.e. dbo) and are trying to deploy a different schema (M01).  This can cause an issue.&lt;/P&gt;&lt;P&gt;In the 1.6.5 build we changed the logic of the DDT so that IT people can add their own sprocs, views, and UDFs to a database and they will be left alone byt eh DDT.  Previously we deleted them all.  We now set an extended property on the object so that we can tell which were deployed by the DDT.  The other problem you could be fighting here is that the sproc ProductType_Delete was manually added on the database and then added into the DDT...which this could potentially cause the error.  Finally, the last thing to check, is if you have a table name called ProductType and are allowing the DDT to created the DELETE sproc for you and you also have a sproc of this name...this would create a conflict and could present this error.&lt;/P&gt;&lt;P&gt;One thing to always try and do when you run into things like this is to deploy to a fresh database name (one that doesn't exist) or server so that you can troubleshoot the problem more easily.&lt;/P&gt;&lt;P&gt;If you can't get any of this to work, post your package file here and we will take a look at it and tell you where your issue is.</description><pubDate>Thu, 20 Mar 2008 09:30:38 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>I have cleared history, then tried deploy ones more but the result is the same - for each stored procedure I receive result similar to this on:&lt;/P&gt;&lt;P&gt;X 20.3.2008 14:55:21 -&amp;gt; An error occurred while creating the stored procedure [M01].[ProductType_Delete].&lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt; SqlException        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;   There is already an object named 'ProductType_Delete' in the database.        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;         &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt; Source     : .Net SqlClient Data Provider        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;         &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt; Stack Trace:         &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;    at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;    at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;    at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;    at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;    at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DeploySprocsOfPriority(Database parent, DatabaseInfo dbInfo, Int32 priority)        &lt;BR&gt;X 20.3.2008 14:55:21 -&amp;gt;        </description><pubDate>Thu, 20 Mar 2008 08:59:12 GMT</pubDate><dc:creator>Jiri Brazda</dc:creator></item><item><title>RE: Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>Please try to delete your "Object Name History" in the DDT, that sounds like the problem or at least where to start.</description><pubDate>Thu, 20 Mar 2008 08:37:44 GMT</pubDate><dc:creator>Keith Chisarik</dc:creator></item><item><title>Deploying to server - error when creating stored procedures</title><link>http://forum.strataframe.net/Topic15056-13-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I'm using trial version of Database Deployment Toolkit. I'm using automatical creation of stored procedures. When deploying to SQL server for first time, everything is running correctly. When deploying the same database to server again, I receive an error stating that "An error occurred while creating the stored procedure XY" and that "There is already an object named XY" - for all stored procedures. When I delete these procedures from SQL server, it runs correctly. &lt;/P&gt;&lt;P&gt;Is there any possibility to include something like "If exists then drop..."? Or is there any workaround?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;George</description><pubDate>Thu, 20 Mar 2008 08:29:28 GMT</pubDate><dc:creator>Jiri Brazda</dc:creator></item></channel></rss>