Source control transactions

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

Source control transactions

Postby Nicon » Wed May 25, 2011 2:56 pm

Hi.

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:
Code: Select all
-- Copyright © 2009 Red Gate Software Ltd.
SET XACT_ABORT ON ;
SET LOCK_TIMEOUT 100 ;
BEGIN TRAN ;



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


SELECT  sysTypes.user_type_id AS ObjectID ,
        sysSchemas.name AS SchemaName ,
        sysTypes.name 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
WHERE   ls.ObjectID IS NULL
        OR curr.ObjectID IS NULL
        OR ls.Name <> curr.Name ;


DROP TABLE #RG_LastSysTypes ;

SELECT  *
INTO    #RG_LastSysTypes
FROM    #RG_NewSysTypes ;


COMMIT ;


Is this normal behaviour?

Thanks
Nicon
 
Posts: 4
Joined: Wed May 25, 2011 2:48 pm
Location: Staines

Postby james.billings » Fri May 27, 2011 3:38 pm

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: http://www.red-gate.com/MessageBoard/viewtopic.php?t=12837
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SQL Source Control 2

Who is online

Users browsing this forum: No registered users and 0 guests