0

I need to enable change tracking on every table in a database. There is a question here that shows the process

Enable change tracking on all tables in database

The problem, however, is that it puts GO at the end of the statement not on its own line. I thought the char(13) and char (10) should do it. But no luck. It creates it like this

PRINT 'Enable CHANGE_TRACKING on [dbo].[ReviewHistory]';ALTER TABLE [dbo].[ReviewHistory] ENABLE CHANGE_TRACKING  GO

Instead it SHOULD be like this

PRINT 'Enable CHANGE_TRACKING on [dbo].[ReviewHistory]';ALTER TABLE [dbo].[ReviewHistory] ENABLE CHANGE_TRACKING
GO
GMB
  • 216,147
  • 25
  • 84
  • 135
joey
  • 3
  • 5
  • Welcome to Stack Overflow joey ! OK, seems like you have the solution already, then what is your actual question ? – GMB Dec 05 '18 at 02:01

1 Answers1

0

It turns out that retain CR/LF was not enabled in SSMS options. Once I checked that and restarted SSMS the LF was working

joey
  • 3
  • 5