Page History
When the source and the target database have a different filegroup structure, Idera SQL schema compare allows you to map the filegroups with each other. Filegroup mapping can be accessed from the main ribbon or the comparison grid context menu.
About filegroup mapping
Filegroup mapping provides a method to map the source and the target filegroups with each other, so that filegroup differences do not require database synchronization. Consider, for example, what happens when you compare the following databases:
...
FG_1
andFG_2
are considered equivalent, which means that no schema difference is triggered by the filegroup clause of the Employees table.- If other schema differences require the Employees table to be synchronized, it will be created on the "mapped" filegroup, not the original one.
Working with filegroup mappings
IDERA SQL Schema Compare provides a few mapping rules that you can choose:
...
Info |
---|
If one of the databases contains filestream filegroups, a second tab appears in the mapping form that allows you to map filestream filegroups in the same way you map the regular filegroups. |
Scripting filegroups
The mapping form provides an additional option that affects the scripting of the filegroup clause for various database objects. When unchecked, database objects that support the filegroup clause are created in the DEFAULT filegroup or, in some cases depending on the object, the filegroup option is ignored.
Info |
---|
Te filegroup script option does not affect the database partition schemes. |
Objects affected by filegroup mappings
Database objects affected by the filegroup mapping option include:
- Tables. Affects the filegroup, text filegroup, filestream filegroup and the filegroup option of the change data capture
- Primary Keys. Affects the filegroup and the filestream filegroup clause
- Unique Constraints. Affects the filegroup and the filestream filegroup clause
- Relational Indexes. Affects the filegroup and the filestream filegroup clause
- Spatial Indexes. Affects the filegroup clause
- Full-Text Indexes. Affects the filegroup clause
- Service Broker Queues. Affects the filegroup clause
- Partition Schemes
Best practices and restrictions
Mapping the filegroups, when not done properly, could produce unexpected results. These simple rules and restrictions can help you achieve the intended results:
...