Eric
Eric

Reputation: 3231

Generating Scripts without Filegroups

I'm trying to do use the Tasks->Generate Scripts to create a backup of the metadata on a SQL server and then run it to create an empty copy of the database on my development machine. The problem is that the source SQL Server has Filegroups and I don't on my local machine, so when I run the query I get errors regarding the non existent filegroups. Is there a way in the advance options or something to have SQL Server remove the filegroup information? I can manually search and replace stuff like ON [FG1] with an empty string, but this is tedious and error prone.

Upvotes: 0

Views: 1093

Answers (1)

Dan Guzman
Dan Guzman

Reputation: 46231

SSMS Object Explorer scripting options are configurable from the menu bar under Tools-->Options-->SQL Server Object Explorer-->Scripting. Change the "Script file groups" under the "Table and view options" to False.

Upvotes: 1

Related Questions