Deploying to server - error when creating stored procedures


Author
Message
Jiri Brazda
Jiri Brazda
StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)
Group: StrataFrame Users
Posts: 78, Visits: 356
Hi,

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.

Is there any possibility to include something like "If exists then drop..."? Or is there any workaround?

Thanks

George

Replies
Jiri Brazda
Jiri Brazda
StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)
Group: StrataFrame Users
Posts: 78, Visits: 356
Thank You for info. I'm going to wait for the new version :-)
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Jiri Brazda
Jiri Brazda
StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)StrataFrame User (224 reputation)
Group: StrataFrame Users
Posts: 78, Visits: 356
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:

• 22.3.2008 10:19:04 -> Deploying meta-data for database 'RCEL_Protocols'
• 22.3.2008 10:19:05 -> Ensuring Filegroups exist on database 'RCEL_Protocols'
• 22.3.2008 10:19:05 -> Filegroup verification complete.
• 22.3.2008 10:19:05 -> Ensuring Tables exist on database 'RCEL_Protocols'
• 22.3.2008 10:19:05 -> Table verification complete.
• 22.3.2008 10:19:05 -> Dropping unneeded filegroups for 'RCEL_Protocols'
• 22.3.2008 10:19:05 -> Unneeded filegroups dropped on database 'RCEL_Protocols'
• 22.3.2008 10:19:05 -> Ensuring Indexes exist on database 'RCEL_Protocols'
• 22.3.2008 10:19:05 -> Index verification complete.
• 22.3.2008 10:19:05 -> Ensuring Foreign Keys exist on database 'RCEL_Protocols'
• 22.3.2008 10:19:06 -> Foreign Key verification complete.
• 22.3.2008 10:19:06 -> Ensuring Assemblies exist on database 'RCEL_Protocols'
• 22.3.2008 10:19:06 -> Assembly verification complete.
• 22.3.2008 10:19:06 -> Ensuring Views, Stored Procedures, and UDFs exist on database 'RCEL_Protocols'
X 22.3.2008 10:19:06 -> An error occurred while deploying the meta-data to the server.
X 22.3.2008 10:19:06 -> ArgumentException       
X 22.3.2008 10:19:06 ->   Column 'Type' does not belong to table .       
X 22.3.2008 10:19:06 ->        
X 22.3.2008 10:19:06 -> Source     : System.Data       
X 22.3.2008 10:19:06 ->        
X 22.3.2008 10:19:06 -> Stack Trace:        
X 22.3.2008 10:19:06 ->    at System.Data.DataRow.GetDataColumn(String columnName)       
X 22.3.2008 10:19:06 ->    at System.Data.DataRow.get_Item(String columnName)       
X 22.3.2008 10:19:06 ->    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DropAllDeployedViewsSprocsAndUdfs(DatabaseInfo dbInfo)       
X 22.3.2008 10:19:06 ->    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.EnsureViewsSprocsUdfs(Database parent, DatabaseInfo dbInfo)       
X 22.3.2008 10:19:06 ->    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.EnsureDatabases()       
X 22.3.2008 10:19:06 ->    at MicroFour.StrataFrame.DBEngine.SQL.DatabaseMigrator.DeployMetaDataThread()       
X 22.3.2008 10:19:06 -> 

Then the execution doesn't stop but doesn't continue too.

I have then dropped the old database and tried new deployment - succesfully. Then again and again succesfully :-)

Thank You for this fix, it works!

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Yeah, you got if figured out.  Glad to help Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Jiri Brazda - 17 Years Ago
Keith Chisarik - 17 Years Ago
Jiri Brazda - 17 Years Ago
Trent L. Taylor - 17 Years Ago
Jiri Brazda - 17 Years Ago
                         Apparentlya new bug has been introduced with 1.6.5 when using funny...
Trent L. Taylor - 17 Years Ago
                             Thank You for info. I'm going to wait for the new version :-)
Jiri Brazda - 17 Years Ago
                                 Here is the fix: http://forum.strataframe.net/FindPost15092.aspx
Trent L. Taylor - 17 Years Ago
                                     Thank You for the fix. I have applied it and tried to run deployment...
Jiri Brazda - 17 Years Ago
                                         Yeah, you got if figured out. Glad to help :)
Trent L. Taylor - 17 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search