How can we help you today? How can we help you today?
isme
Thanks, Brian. Are you referring to the output I posted? Sounds like you might be referring to a different set of spids. The exact numbers will vary from time to time. Brian Donahue wrote: SQL Test's process, according to the who query, is SPID 56. Cancelling SPID 54 is killing a generic SQL process, so there is no control over what will happen when you try to kill the SPID. It seems to cause an "Internal Binder Error" in the SSMS process. Not sure what you mean by "generic SQL process". In my example, spid 54 must be the SQL Test process. Everything else is idle ("AWAITING COMMAND") while the test is running. The program_name column contains nothing like "SQL Test". SQL Test apparently uses the SSMS default program_name ("Microsoft SQL Server Management Studio") instead of identifying itself clearly. The program_name of SPID 56 is SQL Prompt, not SQL Test. I don't think SQL Prompt is causing any issue here. I should have disabled it to make the output clearer. SSMS is generally quite robust, but it is not protected from crashes caused by add-ins. To clarify, it looks like SQL Test is crashing and taking SSMS with it. SQL Prompt is more robust. It doesn't crash SSMS if its spid is killed. It just stops working until you turn it off and on again. Could you make SQL Test behave the same way? / comments
Thanks, Brian. Are you referring to the output I posted? Sounds like you might be referring to a different set of spids. The exact numbers will vary from time to time. Brian Donahue wrote: SQL Tes...
0 votes
Can you add the exit code to the documentation for version 2 as well? That's the version we actually use on the TeamCity build agents. http://documentation.red-gate.com/displ ... mmand+line / comments
Can you add the exit code to the documentation for version 2 as well? That's the version we actually use on the TeamCity build agents.http://documentation.red-gate.com/displ ... mmand+line
0 votes
The documentation now says "70: Internal Software Error. Please contact Support." Yikes! Thanks, guys, I'll follow up the support ticket. / comments
The documentation now says "70: Internal Software Error. Please contact Support." Yikes! Thanks, guys, I'll follow up the support ticket.
0 votes
james.billings wrote: in my case, this didn't stop the extended properties from getting updated so I'm not sure that the cause of that is necessarily the same. What was the type of the last object in your sync script? I can reproduce your behavior if the last object is a table. CREATE TABLE x (y INT); DECLARE @RG_SC_VERSION BIGINT SET @RG_SC_VERSION = 123 IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL)) EXEC sp_dropextendedproperty N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL EXEC sp_addextendedproperty N'SQLSourceControl Database Revision', @RG_SC_VERSION, NULL, NULL, NULL, NULL, NULL, NULL GO The intention of this batch is to create table x and set the version property to 123. The batch separator is missing, but it behaves as you expect. It's not possible for the non-schema statements to be part of the table definition, so SQL Server creates the table then applies the extended property. You can see that it worked when you query the database metadata. /*------------------------ SELECT name, create_date FROM sys.objects WHERE name = N'x'; SELECT name, value FROM fn_listextendedproperty(N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL) ------------------------*/ name create_date ----------------------------------- ----------------------- x 2013-12-04 11:41:48.390 name value ----------------------------------- ------------------------ SQLSourceControl Database Revision 123 One table was created, and the extended property was updated. Perfect! But there's a problem when the last object is a stored procedure. CREATE PROCEDURE y AS BEGIN SELECT 1; END; DECLARE @RG_SC_VERSION BIGINT SET @RG_SC_VERSION = 456 IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL)) EXEC sp_dropextendedproperty N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL EXEC sp_addextendedproperty N'SQLSourceControl Database Revision', @RG_SC_VERSION, NULL, NULL, NULL, NULL, NULL, NULL GO This batch looks like it creates stored procedure y and sets the version property to 456. Instead it creates a stored procedure that contains the code to set the property. The missing batch separator makes an important difference. A stored procedure definition begins immediately after the AS and continues to the end of the batch. The BEGIN...END is just syntactic sugar; SQL Server ignores it. You can see something is wrong when you query the metadata. /*------------------------ SELECT name, create_date FROM sys.objects WHERE name = N'y'; SELECT name, value FROM fn_listextendedproperty(N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL) ------------------------*/ name create_date ----------------------------------- ------------------------ y 2013-12-04 12:08:45.607 name value ----------------------------------- ------------------------ SQLSourceControl Database Revision 123 One procedure was created, but the extended property was not updated. Uh-oh! You can see the code we meant to execute is inside the stored procedure when you print its definition. /*------------------------ DECLARE @definition NVARCHAR(MAX) = (SELECT [definition] FROM sys.sql_modules WHERE OBJECT_NAME([object_id]) = N'y'); PRINT @definition; ------------------------*/ CREATE PROCEDURE y AS BEGIN SELECT 1; END; DECLARE @RG_SC_VERSION BIGINT SET @RG_SC_VERSION = 456 IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL)) EXEC sp_dropextendedproperty N'SQLSourceControl Database Revision', NULL, NULL, NULL, NULL, NULL, NULL EXEC sp_addextendedproperty N'SQLSourceControl Database Revision', @RG_SC_VERSION, NULL, NULL, NULL, NULL, NULL, NULL If the last object is a table, then there is no problem with the sync script. If the last object is a procedure, then the object definition is mangled, and the version property is not updated. Is that enough information for you to reproduce the issue and avoid it in Migrations V2? Looking forward to the new version! / comments
james.billings wrote: in my case, this didn't stop the extended properties from getting updated so I'm not sure that the cause of that is necessarily the same. What was the type of the last ob...
0 votes
Thanks for the explanation, Brian. Manfred Castro filed bug SC-6447 where SQLCompare.exe ignores project filters. When the bug is fixed, it might be a good opportunity to update the documentation as well. / comments
Thanks for the explanation, Brian. Manfred Castro filed bug SC-6447 where SQLCompare.exe ignores project filters. When the bug is fixed, it might be a good opportunity to update the documentation a...
0 votes