Пример #1
0
        /// <summary>
        /// 初始化dbtune管理工作流程
        /// </summary>
        private void InitDbtuneDbtuneManageWorkFlow()
        {
            if (this._workFlow == EnumWorkFlow.TablePartition.ToString())
            {
                InitDbConnect();

                this.txbDbPort.Text = "5151";

                CommonUtil.WriteBlog(this.txbBlog, "---  SDE服务当前未连接");

                this.cmbDbtuneKeyWord.SelectedIndex = -1;
                this.txbDbtuneParamValue.Text       = string.Empty;

                this.cmbDbtuneKeyWord.Properties.Items.Clear();
            }
            this.lciConnTips_2.Visibility = LayoutVisibility.Always;
            this.cmbDbtuneKeyWord.Enabled = false;

            this._dbtuneConfigHelper      = null;
            this._dbtuneConfigParam       = null;
            this._featureClass            = null;
            this.btnImportFeature.Text    = string.Empty;
            this.lciConnTips_1.Visibility = LayoutVisibility.Never;

            this._tbPtitionHelper = null;
            this._partitionParam  = null;

            this.cmbTablespace.SelectedIndex  = -1;
            this.cmbOriginTable.SelectedIndex = -1;
            this.cmbTablespace.Properties.Items.Clear();
            this.cmbOriginTable.Properties.Items.Clear();

            this._workFlow = EnumWorkFlow.DbtuneManage.ToString();
        }
Пример #2
0
 /// <summary>
 /// 检查Dbtune配置流程涉及参数
 /// </summary>
 /// <returns></returns>
 internal static bool CheckDbtuneConfigParam(MemoEdit txbBlog, DbtuneConfigParam dbtuneConfigParam)
 {
     if (dbtuneConfigParam.DBHelper == null)
     {
         WriteBlog(txbBlog, "---  数据库连接异常, 请查看错误日志");
         return(false);
     }
     else if (dbtuneConfigParam.FeatureClass == null)
     {
         WriteBlog(txbBlog, "---  未指定要素类");
         return(false);
     }
     else if (RegexCheck.IsEmpty(dbtuneConfigParam.BasicField))
     {
         WriteBlog(txbBlog, "---  未指定分区列");
         return(false);
     }
     else if (dbtuneConfigParam.PartitionWay == EnumPartitionWay.Unknow)
     {
         WriteBlog(txbBlog, "---  未指定分区方式");
         return(false);
     }
     else if (!RegexCheck.IsFull(dbtuneConfigParam.TablespaceSet))
     {
         WriteBlog(txbBlog, "---  存在没有指定表空间的分区");
         return(false);
     }
     else if (DbtuneXMLOperate.CheckKeyWordExist(dbtuneConfigParam.DbtuneKeyWord))
     {
         WriteBlog(txbBlog, "---  关键字为 " + dbtuneConfigParam.DbtuneKeyWord + "的配置项已经存在,请更改关键字");
         return(false);
     }
     else
     {
         if (dbtuneConfigParam.PartitionWay == EnumPartitionWay.Range)
         {
             if (dbtuneConfigParam.PartitionCount == -1)
             {
                 WriteBlog(txbBlog, "---  未指定范围分区数");
                 return(false);
             }
             else
             {
                 return(true);
             }
         }
         else
         {
             return(true);
         }
     }
 }
Пример #3
0
        /// <summary>
        /// 执行dbtune配置工作
        /// </summary>
        /// <param name="txbBlog"></param>
        /// <param name="dbtuneConfigParam"></param>
        /// <param name="dbtuneConfigHelper"></param>
        internal static void ExcuteDbtuneConfig(MemoEdit txbBlog, DbtuneConfigParam dbtuneConfigParam, DbtuneConfigHelper.DbtuneConfigHelper dbtuneConfigHelper)
        {
            dbtuneConfigHelper = new DbtuneConfigHelper.DbtuneConfigHelper(dbtuneConfigParam, Environment.CurrentDirectory);

            if (dbtuneConfigHelper.AlterParamValueEX())
            {
                WriteBlog(txbBlog, "---  执行成功");
            }
            else
            {
                WriteBlog(txbBlog, "---  执行失败,请检查参数");
            }
        }
Пример #4
0
        /// <summary>
        /// 初始化dbtune配置工作流程
        /// </summary>
        private void InitDbtuneConfigWorkFlow()
        {
            if (this._workFlow == EnumWorkFlow.TablePartition.ToString())
            {
                InitDbConnect();

                this.txbDbPort.Text = "5151";

                CommonUtil.WriteBlog(this.txbBlog, "---  SDE服务当前未连接");

                this.btnImportFeature.Text           = string.Empty;
                this.cmbColumnIdentity.SelectedIndex = -1;
                this.cmbPartitionWay.SelectedIndex   = -1;
                this.txbTips.Text             = string.Empty;
                this.btnAssignTablespace.Text = string.Empty;
                this.txbTargetName.Text       = string.Empty;

                this.cmbColumnIdentity.Properties.Items.Clear();
            }


            this.lciConnTips_1.Visibility = LayoutVisibility.Always;
            this._dbtuneConfigParam       = new DbtuneConfigParam();
            this._dbtuneConfigParam.Clear();
            this._featureClass     = null;
            this._partitionCount   = -1;
            this._columnInfoSet    = new Dictionary <string, string>();
            this._boundary         = new Dictionary <string, double>();
            this._partitionInfoSet = new List <PartitionInfo>();
            this._partitionRefer   = new List <string>();

            this.btnImportFeature.Enabled = false;

            this._tbPtitionHelper = null;
            this._partitionParam  = null;

            this.cmbTablespace.SelectedIndex  = -1;
            this.cmbOriginTable.SelectedIndex = -1;
            this.cmbTablespace.Properties.Items.Clear();
            this.cmbOriginTable.Properties.Items.Clear();

            this._dbtuneManageHelper            = null;
            this.cmbDbtuneKeyWord.SelectedIndex = -1;
            this.txbDbtuneParamValue.Text       = string.Empty;
            this.cmbDbtuneKeyWord.Properties.Items.Clear();
            this.lciConnTips_2.Visibility = LayoutVisibility.Never;

            this._workFlow = EnumWorkFlow.DbtuneConfigure.ToString();
        }