Red Gate forums :: View topic - Remove tempdb..sysobjects from Compare Script
Return to www.red-gate.com RSS Feed Available

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

Remove tempdb..sysobjects from Compare Script

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



Joined: 02 Jun 2006
Posts: 4

PostPosted: Mon Aug 26, 2013 10:39 pm    Post subject: Remove tempdb..sysobjects from Compare Script Reply with quote

Is there a way to have the engine not create this line in the output script?

GO
IF EXISTS (SELECT * FROM tempdb..sysobjects WHERE id=OBJECT_ID('tempdb..#tmpErrors')) DROP TABLE #tmpErrors
GO

We want to make our resulting scripts work on local servers and Azure and this is keeping it from working. As Azure doesn't like that line and that is why I assume you don't create it when you are going against an Azure DB
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Thu Aug 29, 2013 11:54 am    Post subject: Reply with quote

Hello,

You're right - SQL Compare would probably filter this out if you were comparing directly to Azure. I think you can avoid this line by using the "Do not use transactions in deployment scripts" option.

However, there are numerous exceptions in the SQL Compare code for Azure because in a lot of ways it doesn't work the same way as shrink-wrapped SQL Server. Comparing SQL to SQL and applying the script to Azure is not guaranteed to work.
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