Releasing from Source Control
ChrisGodfree
Posts: 11
Due to the restricted access we have to update our UAT and Production servers (by policy we have 'near to' db_owner rights) we cannot execute the SQL statements which add database-level extended properties:
/*
Start of RedGate SQL Source Control versioning database-level extended properties.
*/
DECLARE @RG_SC_VERSION BIGINT
SET @RG_SC_VERSION = 366
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
IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Scripts Location', NULL, NULL, NULL, NULL, NULL, NULL))
EXEC sp_dropextendedproperty N'SQLSourceControl Scripts Location', NULL, NULL, NULL, NULL, NULL, NULL
EXEC sp_addextendedproperty N'SQLSourceControl Scripts Location', N'<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<ISOCCompareLocation version="1" type="TfsLocation">
<ServerUrl>http://lonms07116:8080/tfs/application</ServerUrl>
<SourceControlFolder>$/VoRBSGTestProject/ChrisG/Database/Test4</SourceControlFolder>
</ISOCCompareLocation>', NULL, NULL, NULL, NULL, NULL, NULL
GO
IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Migration Scripts Location', NULL, NULL, NULL, NULL, NULL, NULL))
EXEC sp_dropextendedproperty N'SQLSourceControl Migration Scripts Location', NULL, NULL, NULL, NULL, NULL, NULL
GO
/*
End of RedGate SQL Source Control versioning database-level extended properties.
*/
Apart from manully editing the script, is there any way to remove this statement automatically?
Thanks, Chris
/*
Start of RedGate SQL Source Control versioning database-level extended properties.
*/
DECLARE @RG_SC_VERSION BIGINT
SET @RG_SC_VERSION = 366
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
IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Scripts Location', NULL, NULL, NULL, NULL, NULL, NULL))
EXEC sp_dropextendedproperty N'SQLSourceControl Scripts Location', NULL, NULL, NULL, NULL, NULL, NULL
EXEC sp_addextendedproperty N'SQLSourceControl Scripts Location', N'<?xml version="1.0" encoding="utf-16" standalone="yes"?>
<ISOCCompareLocation version="1" type="TfsLocation">
<ServerUrl>http://lonms07116:8080/tfs/application</ServerUrl>
<SourceControlFolder>$/VoRBSGTestProject/ChrisG/Database/Test4</SourceControlFolder>
</ISOCCompareLocation>', NULL, NULL, NULL, NULL, NULL, NULL
GO
IF EXISTS (SELECT 1 FROM fn_listextendedproperty(N'SQLSourceControl Migration Scripts Location', NULL, NULL, NULL, NULL, NULL, NULL))
EXEC sp_dropextendedproperty N'SQLSourceControl Migration Scripts Location', NULL, NULL, NULL, NULL, NULL, NULL
GO
/*
End of RedGate SQL Source Control versioning database-level extended properties.
*/
Apart from manully editing the script, is there any way to remove this statement automatically?
Thanks, Chris
Comments
Red Gate Technical Support Engineer
Red Gate Technical Support Engineer