Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to create Insert scripts from the content of a table. To do that, I used the database tasks -> generate scripts.

The table is quite big and in the generated script, it adds PRINT command after each 100 number of rows and a GO statement. For example:

print 'Processed 9200 total records'

For some reasons I can't have GO and PRINT command in the script, repeated in the middle. Is there any way to avoid creating them in the generated script? It is really time consuming to go one by one and delete all PRINT xxxx statements.


share|improve this question
up vote 4 down vote accepted

I would not remove the GO statements that break up large batches. There are various reasons for breaking large inserts

  1. size (duration) of transactions
  2. memory requirements
  3. transaction log management
  4. mirror synchronicity
  5. error isolation (by batch)
  6. etc...

As for removing the status updates, that can be done easily. Press Ctrl-H or from the menu, Edit -> Find and Replace -> Quick Replace, fill it in as shown in the image below making sure to tick "Use" Regular Expressions, then click on "Replace All" to zap them all.

Remove PRINT updates

share|improve this answer

You can also remove the PRINT command from the generate scripts wizard by setting "Include Descriptive Headers" to false.

Generate SQL Server Scripts Wizard (Choose Script Options Page)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.