Red Gate forums :: View topic - Source control transactions
Return to RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Source Control 2
SQL Source Control 2 forum

Source control transactions

Search in SQL Source Control 2 forum
Post new topic   Reply to topic
Jump to:  
Author Message

Joined: 25 May 2011
Posts: 4
Location: Staines

PostPosted: Wed May 25, 2011 2:56 pm    Post subject: Source control transactions Reply with quote


Let me start by saying that i am not 100% sure this problem is to do with SQL Source Control, but it is definitely one of the Red Gate tools.

I have notice, while running profiler against a database in Source Control, that "Red Gate Software - SQL Tools" is executing a process every couple of seconds against tempDB. This is what is being executed:

-- Copyright 2009 Red Gate Software Ltd.

IF OBJECT_ID(N'tempdb..#RG_NewSysTypes', N'U') IS NOT NULL
    DROP TABLE #RG_NewSysTypes ;

SELECT  sysTypes.user_type_id AS ObjectID , AS SchemaName , AS Name ,
        sysTypes.is_assembly_type AS ClrType ,
        convert(bit, case when sysTypes.system_type_id = 243 then 1 else 0 end) AS TableType
INTO    #RG_NewSysTypes
FROM    [GSABS_Staging].sys.types AS sysTypes
        LEFT JOIN [GSABS_Staging].sys.schemas AS sysSchemas ON sysSchemas.schema_id = sysTypes.schema_id
WHERE   sysTypes.is_user_defined = 1 ;

SELECT  ls.ObjectID AS prevObjectID ,
        curr.ObjectID AS ObjectID ,
        ls.Name AS prevName ,
        curr.Name AS Name ,
        ls.SchemaName AS prevSchemaName ,
        curr.SchemaName AS SchemaName ,
        ls.ClrType AS prevClrType ,
        curr.ClrType AS ClrType ,
        ls.TableType AS prevTableType ,
        curr.TableType AS TableType
FROM    #RG_LastSysTypes AS ls
        FULL OUTER JOIN #RG_NewSysTypes AS curr ON ls.ObjectID = curr.ObjectID
        OR curr.ObjectID IS NULL
        OR ls.Name <> curr.Name ;

DROP TABLE #RG_LastSysTypes ;

INTO    #RG_LastSysTypes
FROM    #RG_NewSysTypes ;


Is this normal behaviour?

Back to top
View user's profile Send private message

Joined: 16 Jun 2010
Posts: 1144
Location: My desk.

PostPosted: Fri May 27, 2011 3:38 pm    Post subject: Reply with quote

This may well be SQL Source Control, yes. It polls the database to check for changed objects so you get the little blue blobs.

If you're finding this is causing a performance hit, then it's possible to alter (or disable) this behaviour. Please refer to this post for details:
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group