Support Center

Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Ignoring Database Tables / Objects

Chris Roberts Jul 25, 2013 05:45AM AEST

Hello,

Is it possible to tell Ready Roll to ignore certain tables when it's comparing databases?

For example, we are using a content management system which creates some tables that has its own deployment / upgrade mechanism in it. We are adding our own custom tables to the same database (for which we're using Ready Roll) but we want to leave the CMS to manage its own updates.

Thanks,
- Chris

Up 0 rated Down
Daniel Nolan Nov 27, 2015 03:21PM AEDT ReadyRoll Agent

Hi Chris,

You can indeed exclude/ignore specific objects when using the DBSync tool to compare the database. It does require a certain amount of editing of the database project file, as unfortunately a GUI is not yet available.

You specify each rule as an Object Type/Object Name Pattern (regex) pair at the top of your .sqlproj file.

<PropertyGroup> <ExcludeObjectsFromImport>
Schema=\[cya\];
Table=\[cya\]\.\[(.?)\];
Schema=\[job\];
Table=\[job\]\.\[(.?)\];
Schema=\[reporting\];
Table=\[reporting\]\.\[(.*?)\];</ExcludeObjectsFromImport> </PropertyGroup>

In this example, the cya, job and reporting schemas will be excluded, as well as the tables contained within these schemas.

After editing your project file, please ensure that you close and re-open your Visual Studio solution so that the change takes effect within the DBSync tool.
Here’s the full list of object types that you can add exclude rules for:

<PropertyGroup> <ExcludeObjectsFromImport> Assembly=\[myschemaname\]; Credential=\[mycredential\]; DatabaseDdlTrigger=\[ddltriggername\]; Default=\[dbautil\]\.\[(.?)\]; PartitionFunction=\[mypartitionfunction\]; PartitionScheme=\[mypartitionfunction\]; Role=\[myrole\]; Rule=\[dbautil\]\.\[(.?)\]; Schema=\[dbautil\]; Sequence=\[dbautil\]\.\[(.?)\]; StoredProcedure=\[dbautil\]\.\[(.?)\]; Synonym=\[dbautil\]\.\[(.?)\]; Table=\[dbautil\]\.\[(.?)\]; User=\[myusername\]; UserDefinedDataType=\[dbautil\]\.\[(.?)\]; UserDefinedFunction=\[dbautil\]\.\[(.?)\]; View=\[dbautil\]\.\[(.?)\]; XmlSchemaCollection=\[dbautil\]\.\[(.?)\]; Contract=\[myservicebrokercontract\]; EventNotification=\[myservicebrokereventnotification\]; MessageType=\[myservicebrokermessagetype\]; Queue=\[myservicebrokerqueue\]; RemoteServiceBinding=\[myservicebrokerremotebinding\]; Route=\[myservicebrokerroute\]; Service=\[myservicebrokerservice\]; </ExcludeObjectsFromImport> </PropertyGroup>

Best Regards,

Daniel

This question has received the maximum number of answers.

readyroll.support@red-gate.com
http://assets2.desk.com/
false
readyrollsql
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete