Esempio n. 1
0
        /// <summary>
        /// Returns a list of installations that are appropriate to update data from, given the installation. Installation Support Utility use only.
        /// </summary>
        public IEnumerable <RsisInstallation> GetDataUpdateSources(RecognizedInstallation installation)
        {
            var availableInstallations = GetSystemByInstallationId(installation.Id).InstalledInstallations.ToList();

            // Development installations can only update data from intermediate installations.
            if (installation.ExistingInstallationLogic.RuntimeConfiguration.InstallationType == InstallationType.Development)
            {
                availableInstallations = availableInstallations.Where(inst => inst.InstallationTypeElements is IntermediateInstallationElements).ToList();
            }

            // Live installations can only update data from themselves or other live installations.
            if (installation.ExistingInstallationLogic.RuntimeConfiguration.InstallationType == InstallationType.Live)
            {
                availableInstallations = availableInstallations.Where(inst => inst.InstallationTypeElements is LiveInstallationElements).ToList();
            }
            return(availableInstallations);
        }
 /// <summary>
 /// Recompile procedures in secondary Oracle databases in case there are inter-database dependencies that prevented the procedures from being valid when the
 /// database was created.
 /// </summary>
 private static void recompileProceduresInSecondaryOracleDatabases(RecognizedInstallation installation)
 {
     foreach (var secondaryDatabase in installation.RecognizedInstallationLogic.SecondaryDatabasesIncludedInDataPackages)
     {
         if (secondaryDatabase is DatabaseAbstraction.Databases.Oracle)
         {
             secondaryDatabase.ExecuteDbMethod(
                 cn => {
                 foreach (var procedure in secondaryDatabase.GetProcedures())
                 {
                     var command         = cn.DatabaseInfo.CreateCommand();
                     command.CommandText = "ALTER PROCEDURE " + procedure + " COMPILE";
                     cn.ExecuteNonQueryCommand(command);
                 }
             });
         }
     }
 }