Red Gate forums :: View topic - Releasing from Source Control
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Data Compare 10
SQL Data Compare 10 forum

Releasing from Source Control

Search in SQL Data Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message
ChrisGodfree



Joined: 10 May 2012
Posts: 7

PostPosted: Thu May 10, 2012 9:12 am    Post subject: Releasing from Source Control Reply with quote

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
Back to top
View user's profile Send private message
andy.campbell.smith



Joined: 20 Oct 2011
Posts: 173
Location: Red Gate Software

PostPosted: Thu May 10, 2012 11:12 am    Post subject: Reply with quote

You could check the 'Ignore extended properties' option in the project options, but that'll also cut out object-level extended properties. If it's just the database properties you want to remove from the script, I'm afraid that's probably going to require hand-editing.
_________________
Andy Campbell Smith

Red Gate Technical Support Engineer
Back to top
View user's profile Send private message
andy.campbell.smith



Joined: 20 Oct 2011
Posts: 173
Location: Red Gate Software

PostPosted: Thu May 10, 2012 11:46 am    Post subject: Reply with quote

Just a brief addendum - looking at your code, this actually looks like it was generated by SQL Compare, not SQL Data Compare. You might have some luck checking the 'Ignore migration scripts for databases' option in SQL Compare, if that's the case.
_________________
Andy Campbell Smith

Red Gate Technical Support Engineer
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