Change seen by source control on unchanged item

A SQL Server Management Studio add-in to source control your database in Subversion or Team Foundation Server.

Moderators: Chris Auckland, David Atkinson, sherr, PhilScrace, andy.campbell.smith

Change seen by source control on unchanged item

Postby mika » Fri May 16, 2014 10:13 am

I just upgraded to 3.6.5.123 and when I go to the commit changes tab there are 2 changes which weren't there before.

They are both for SQL functions where dbo was changed to DBO and there was an extra dot added:

ie:
Code: Select all
CREATE FUNCTION [dbo].[fn_GameDay_Get]
was changed to
Code: Select all
CREATE FUNCTION .[DBO].[fn_GameDay_Get]


(notice the extra dot before the second [DBO])

When I try to undo, it says it's successful, but the changes are then still there...
mika
 
Posts: 5
Joined: Fri May 16, 2014 10:04 am

Postby mika » Mon May 19, 2014 3:31 pm

Anybody?
mika
 
Posts: 5
Joined: Fri May 16, 2014 10:04 am

Postby Evan Moss » Mon May 19, 2014 7:39 pm

Hello,

Thanks for your post.

I just tried reproducing the issue with the same function name but wasn't able to get the same behavior.

We have a ticket open for you (19871) -- would you mind responding there with the full script in your repository?

Thanks,
Evan
Evan Moss
Product Support
(866) 627-8107
Evan Moss
 
Posts: 99
Joined: Wed Jun 12, 2013 9:56 pm

Postby mika » Tue May 20, 2014 11:54 am

I can't - the user mika is not a registered redgate user and my boss, denise, does not have access to that ticket. I've sent a reply to the ticket to add the proper user but when logged in, she still can't see it.
mika
 
Posts: 5
Joined: Fri May 16, 2014 10:04 am

Postby mika » Tue May 20, 2014 12:09 pm

Code: Select all
-- User Defined Function

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE FUNCTION [dbo].[fn_GameDay_Date_Get] (@GameDay int) 
RETURNS datetime  AS 

BEGIN
   DECLARE @date datetime

   SET @date = (SELECT TOP 1 GameDay_Date FROM Gaming_Day (NOLOCK) WHERE GameDay_ID = @GameDay)

   RETURN @date
END



GO
-- Permissions

GRANT EXECUTE ON  [dbo].[fn_GameDay_Date_Get] TO [Sxuser]
GO


Keeps gettings changed to

Code: Select all
-- User Defined Function

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE FUNCTION .[DBO].[fn_GameDay_Date_Get] (@GameDay int) 
RETURNS datetime  AS 

BEGIN
   DECLARE @date datetime

   SET @date = (SELECT TOP 1 GameDay_Date FROM Gaming_Day (NOLOCK) WHERE GameDay_ID = @GameDay)

   RETURN @date
END



GO
-- Permissions

GRANT EXECUTE ON  [DBO].[fn_GameDay_Date_Get] TO [Sxuser]
GO


This is copies from the commit changes compare window in sql source control. There was no actual change.
mika
 
Posts: 5
Joined: Fri May 16, 2014 10:04 am

Postby mika » Tue May 20, 2014 12:15 pm

Ah interesting. I tracked it down to the fact that that actual function has always had the full stop before the .[dbo]. So the thing that has actually changed is that with the latest release you are "seeing" it and "fixing" it automatically.

Worth noting: It seems that SQL has allowed it all these years (this funciton has been there forever as is)

Nothing to do for me though - I will fix it my side.

Thanks.
mika
 
Posts: 5
Joined: Fri May 16, 2014 10:04 am


Return to SQL Source Control 3

Who is online

Users browsing this forum: No registered users and 2 guests