Comments
Sort by recent activity
Sounds like a job for the API - at deploy time you can dynamically generate a script by comparing a snapshot to the customer's db.
Aidan / comments
Sounds like a job for the API - at deploy time you can dynamically generate a script by comparing a snapshot to the customer's db.
Aidan
Hi Michelle,
Thank you for the quick and thorough response. [image]
Aidan / comments
Hi Michelle,
Thank you for the quick and thorough response.
Aidan
Hi Stiej,
Here's how we do it:
differencesParam is a Differences instance obtained from Database.CompareWith(null, options) Regex masterStoredProcedureRegex = new Regex("(\\[dbo\\]\\.\\[CopyToExport.*\\])|(\\[dbo\\]\\.\\[CopyToImport.*\\])", RegexOptions.Compiled);
foreach (Difference difference in differencesParam)
{
if (difference.DatabaseObjectType == ObjectType.StoredProcedure)
{
// filtering out export and import stored procedures
if (masterStoredProcedureRegex.IsMatch(difference.Name))
{
difference.Selected = false;
}
else
{
difference.Selected = true;
}
}
else
{
difference.Selected = true;
}
}
/ comments
Hi Stiej,
Here's how we do it:
differencesParam is a Differences instance obtained from Database.CompareWith(null, options)Regex masterStoredProcedureRegex = new Regex("(\\[dbo\\]\\...
Hi,
If you're using the API, there is a Selected property on each Difference in the Differences collection returned by Database.CompareWith. You can use a regex to exclude the temp tables.
Aidan / comments
Hi,
If you're using the API, there is a Selected property on each Difference in the Differences collection returned by Database.CompareWith. You can use a regex to exclude the temp tables.
Aidan
Hi all,
Just wanted to share the approach we worked out in case anyone else runs into a similar issue -- instead of registering the database from the DBPRo scripts folder, we are having the DBPro project deploy itself and then registering the live deployed database. That way the MS tool ensures that the ANSI_NULLS settings are enacted on the deployed procs, making the property visible to SQL Compare.
Aidan / comments
Hi all,
Just wanted to share the approach we worked out in case anyone else runs into a similar issue -- instead of registering the database from the DBPRo scripts folder, we are having the DBPro p...
Hi Harish,
I would use SMO (SQL Management Objects, replacement for DMO in SQL 2005) to do this.
Take a look at the Microsoft.SqlServer.Management.Smo namespace.
-Aidan / comments
Hi Harish,
I would use SMO (SQL Management Objects, replacement for DMO in SQL 2005) to do this.
Take a look at the Microsoft.SqlServer.Management.Smo namespace.
-Aidan