/// <summary>
 /// Scans databases for differences.
 /// </summary>
 public DatabaseComparison CompareDatabases(DatabasePair databases)
 {
     try {
         DatabaseDeployer ds = new DatabaseDeployer();
         return ds.CompareDatabases(databases);
     }
     catch (DeployCancelException ex) {
         // Deployment has been cancelled
         EventManager.OnNotificationMessage("*** Verification stopped! " + ex.Message);
     }
     return null;
 }
Exemple #2
0
        /// <summary>
        /// Scans for differences in the specified databases.
        /// </summary>
        /// <param name="databases">The source and destination databases to compare.</param>
        internal DatabaseComparison CompareDatabases(DatabasePair databases)
        {
            // Start web service session
            InitializeServices(databases);

            DatabaseComparison comparison = new DatabaseComparison(databases);

            // Retrieve source tables and notify client
            DataTable sourceTables = _sourceDbService.GetTables().Tables[0];
            foreach(DataRow row in sourceTables.Rows) {
                EventManager.OnSourceTableFound((string)row["TABLE_NAME"]);
            }

            // Retrieve destination tables and perform comparison
            DataTable destinationTables = _destinationDbService.GetTables().Tables[0];
            CompareAllTables(sourceTables, destinationTables, comparison);

            ShutdownServices();

            return comparison;
        }
 /// <summary>
 /// Removes a pair from the collection.
 /// </summary>
 public void Remove(DatabasePair pair)
 {
     _list.Remove(pair);
 }
 /// <summary>
 /// Add a pair to the collection.
 /// </summary>
 public void Add(DatabasePair pair)
 {
     _list.Add(pair);
 }
 internal DatabaseComparison(DatabasePair databases)
 {
     _databases = databases;
 }
 public DatabaseDeploymentStructure(DatabasePair databases)
 {
     _databases = databases;
 }
 /// <summary>
 /// Scans a database for objects to deploy.
 /// </summary>
 public DatabaseDeploymentStructure ScanDatabase(DeploymentProject project, DatabasePair databases)
 {
     DatabaseDeployer ds = new DatabaseDeployer();
     return ds.ScanDatabase(project, databases);
 }
Exemple #8
0
 /// <summary>
 /// Initializes source and destination web services and starts the sessions.
 /// </summary>
 private void InitializeServices(DatabasePair databases)
 {
     // Setup web service connections
     _sourceDbService = InitializeService(databases.Source);
     _destinationDbService = InitializeService(databases.Destination);
 }
Exemple #9
0
        /// <summary>
        /// Scans a database for objects to deploy.
        /// </summary>
        internal DatabaseDeploymentStructure ScanDatabase(DeploymentProject project, DatabasePair databases)
        {
            InitializeServices(databases);

            DatabaseDeploymentStructure structure = new DatabaseDeploymentStructure(databases);

            ScanProcedures(project.ActiveDeployConfig.DatabaseSettings.ExcludeProcedures, structure);
            ScanViews(structure);

            ShutdownServices();

            return structure;
        }