Пример #1
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectTableAllocatedBytesCommandText;
     command.AddSimpleParameter("OWNER", _objectIdentifier.Owner.Trim('"'));
     command.AddSimpleParameter("TABLE_NAME", _objectIdentifier.Name.Trim('"'));
     command.AddSimpleParameter("PARTITION_NAME", _partitionName.Trim('"'));
 }
Пример #2
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText          = OracleDatabaseCommands.SelectViewSelectCommand;
     command.InitialLONGFetchSize = Int32.MaxValue;
     command.AddSimpleParameter("OWNER", _objectIdentifier.Owner.Trim('"'));
     command.AddSimpleParameter("VIEW_NAME", _objectIdentifier.Name.Trim('"'));
 }
Пример #3
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = String.Format(OracleDatabaseCommands.SelectIndexDescriptionCommandText);
     command.AddSimpleParameter("TABLE_OWNER", _objectIdentifier.Owner.Trim('"'));
     command.AddSimpleParameter("TABLE_NAME", _objectIdentifier.Name.Trim('"'));
     command.AddSimpleParameter("COLUMN_NAME", String.IsNullOrEmpty(_columnName) ? null : _columnName.Trim('"'));
 }
Пример #4
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectColumnStatisticsCommandText;
     command.AddSimpleParameter("OWNER", _objectIdentifier.Owner.Trim('"'));
     command.AddSimpleParameter("TABLE_NAME", _objectIdentifier.Name.Trim('"'));
     command.AddSimpleParameter("COLUMN_NAME", _columnName.Trim('"'));
 }
Пример #5
0
        public override void InitializeCommand(OracleCommand command)
        {
            command.CommandText = _commandText;

            command.AddSimpleParameter("OBJECT_TYPE", _objectType);
            command.AddSimpleParameter("NAME", _objectIdentifier.Name.Trim('"'));
            command.AddSimpleParameter("SCHEMA", _objectIdentifier.Owner.Trim('"'));
        }
Пример #6
0
            public override void InitializeCommand(OracleCommand command)
            {
                command.CommandText = BuildCommandText(OracleDatabaseCommands.SelectTableSubPartitionsDetailsCommandTextBase, _includeInMemorySettings);
                PartitionDataProvider.InitializeCommand(command, _subPartitionOwner);

                command.AddSimpleParameter("PARTITION_NAME", _partitionDataModel?.Name);
                command.AddSimpleParameter("SUBPARTITION_NAME", _subPartitionDataModel?.Name);
            }
Пример #7
0
        public override void InitializeCommand(OracleCommand command)
        {
            command.CommandText = OracleDatabaseCommands.SelectIndexColumnDescriptionCommandText;
            command.AddSimpleParameter("OWNER", _objectIdentifier.Owner.Trim('"'));
            command.AddSimpleParameter("TABLE_NAME", _objectIdentifier.Name.Trim('"'));
            command.AddSimpleParameter("COLUMN_NAME", String.IsNullOrEmpty(_columnName) ? null : _columnName.Trim('"'));

            _indexes = DataModel.IndexDetails.ToDictionary(i => OracleObjectIdentifier.Create(i.Owner, i.Name));
        }
Пример #8
0
        public override void InitializeCommand(OracleCommand command)
        {
            command.AddSimpleParameter("OWNER", _objectIdentifier.Owner.Trim('"'));
            command.AddSimpleParameter("TABLE_NAME", _objectIdentifier.Name.Trim('"'));

            if (String.IsNullOrEmpty(_columnName))
            {
                command.CommandText = String.Format(OracleDatabaseCommands.SelectTableCommentCommandText);
            }
            else
            {
                command.CommandText = String.Format(OracleDatabaseCommands.SelectColumnCommentCommandText);
                command.AddSimpleParameter("COLUMN_NAME", _columnName.Trim('"'));
            }
        }
Пример #9
0
            public override void InitializeCommand(OracleCommand command)
            {
                command.CommandText = OracleDatabaseCommands.SelectSessionsStatisticsCommandText;
                command.AddSimpleParameter("SID", DataModel.SessionId);

                DataModel.StatisticsRecords.Clear();
            }
Пример #10
0
        public override void InitializeCommand(OracleCommand command)
        {
            command.AddSimpleParameter("OWNER", _objectIdentifier.Owner.Trim('"'));
            command.AddSimpleParameter("TABLE_NAME", _objectIdentifier.Name.Trim('"'));

            if (String.IsNullOrEmpty(_columnName))
            {
                command.CommandText = OracleDatabaseCommands.SelectTableConstraintDescriptionCommandText;
            }
            else
            {
                command.CommandText = OracleDatabaseCommands.SelectColumnConstraintDescriptionCommandText;
                command.AddSimpleParameter("COLUMN_NAME", _columnName.Trim('"'));
            }

            command.InitialLONGFetchSize = 32767;
        }
Пример #11
0
        public async Task Start(CancellationToken cancellationToken)
        {
            _debuggedSessionCommand.CommandText = OracleDatabaseCommands.StartDebuggee;
            _debuggedSessionCommand.AddSimpleParameter("DEBUG_SESSION_ID", null, TerminalValues.Varchar2, 12);
            var debuggedSessionIdParameter = _debuggedSessionCommand.Parameters[0];

            await _debuggedSessionCommand.ExecuteNonQueryAsynchronous(cancellationToken);

            _debuggerSessionId = ((OracleString)debuggedSessionIdParameter.Value).Value;

            TraceLog.WriteLine($"Target debug session initialized. Debug session ID = {_debuggerSessionId}");

            await Attach(cancellationToken);

            TraceLog.WriteLine("Debugger attached. ");

            var attachTask = Synchronize(cancellationToken).ContinueWith(AfterSynchronized, cancellationToken, TaskContinuationOptions.OnlyOnRanToCompletion);

            _debuggedAction = DebuggedCommand.ExecuteNonQueryAsynchronous(cancellationToken);
            TraceLog.WriteLine("Debugged action started. ");

            await attachTask;
        }
Пример #12
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectCompilationErrorsCommandText;
     command.AddSimpleParameter("OWNER", _owner);
     command.AddSimpleParameter("NAME", _objectName);
 }
Пример #13
0
 private static void InitializeCommand(OracleCommand command, OracleObjectIdentifier partitionOwner)
 {
     command.AddSimpleParameter("TABLE_OWNER", partitionOwner.Owner.Trim('"'));
     command.AddSimpleParameter("TABLE_NAME", partitionOwner.Name.Trim('"'));
     command.InitialLONGFetchSize = HighValueMaxLength + 1;
 }
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectCursorExecutionStatisticsCommandText;
     command.AddSimpleParameter("SQL_ID", _sqlId);
     command.AddSimpleParameter("CHILD_NUMBER", _childNumber);
 }
Пример #15
0
        public async Task <bool> IsRunning(CancellationToken cancellationToken)
        {
            _debuggerSessionCommand.CommandText = "BEGIN IF dbms_debug.target_program_running THEN :isRunning := 1; ELSE :isRunning := 0; END IF; END;";
            _debuggerSessionCommand.Parameters.Clear();
            _debuggerSessionCommand.AddSimpleParameter("ISRUNNING", null, TerminalValues.Number);
            await _debuggerSessionCommand.ExecuteNonQueryAsynchronous(cancellationToken);

            var isRunning = ((OracleDecimal)_debuggerSessionCommand.Parameters[0].Value).Value;

            return(Convert.ToBoolean(isRunning));
        }
Пример #16
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = String.Format(OracleDatabaseCommands.SelectExecutionPlanTextCommandTextBase, _resolveAdaptivePlan ? "ADAPTIVE" : null);
     command.AddSimpleParameter("SQL_ID", _sqlId);
     command.AddSimpleParameter("CHILD_NUMBER", _childNumber);
 }
Пример #17
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectTableDetailsCommandText;
     command.AddSimpleParameter("OWNER", _objectIdentifier.Owner.Trim('"'));
     command.AddSimpleParameter("TABLE_NAME", _objectIdentifier.Name.Trim('"'));
 }
Пример #18
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectUserAdditionalData;
     command.AddSimpleParameter("USERNAME", DataModel.Schema.Name.Trim('"'));
 }
Пример #19
0
		private static void AddDebugParameters(OracleCommand command)
		{
			command.AddSimpleParameter(ParameterDebugActionStatus, null, TerminalValues.Number);
			command.AddSimpleParameter("BREAKPOINT", null, TerminalValues.Number);
			command.AddSimpleParameter("INTERPRETERDEPTH", null, TerminalValues.Number);
			command.AddSimpleParameter("LINE", null, TerminalValues.Number);
			command.AddSimpleParameter("OER", null, TerminalValues.Number);
			command.AddSimpleParameter("REASON", null, TerminalValues.Number);
			command.AddSimpleParameter("STACKDEPTH", null, TerminalValues.Number);
			command.AddSimpleParameter("TERMINATED", null, TerminalValues.Number);
			command.AddSimpleParameter("DBLINK", null, TerminalValues.Varchar2, 30);
			command.AddSimpleParameter("ENTRYPOINTNAME", null, TerminalValues.Varchar2, 512);
			command.AddSimpleParameter("OWNER", null, TerminalValues.Varchar2, 30);
			command.AddSimpleParameter("NAME", null, TerminalValues.Varchar2, 30);
			command.AddSimpleParameter("NAMESPACE", null, TerminalValues.Number);
			command.AddSimpleParameter("LIBUNITTYPE", null, TerminalValues.Number);
		}
Пример #20
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectTableInMemoryAllocatedBytesCommandText;
     command.AddSimpleParameter("OWNER", _objectIdentifier.Owner.Trim('"'));
     command.AddSimpleParameter("SEGMENT_NAME", _objectIdentifier.Name.Trim('"'));
 }
Пример #21
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectProfileDetails;
     command.AddSimpleParameter("PROFILE", DataModel.Name);
 }
Пример #22
0
 private static void AddDebugParameters(OracleCommand command)
 {
     command.AddSimpleParameter(ParameterDebugActionStatus, null, TerminalValues.Number);
     command.AddSimpleParameter("BREAKPOINT", null, TerminalValues.Number);
     command.AddSimpleParameter("INTERPRETERDEPTH", null, TerminalValues.Number);
     command.AddSimpleParameter("LINE", null, TerminalValues.Number);
     command.AddSimpleParameter("OER", null, TerminalValues.Number);
     command.AddSimpleParameter("REASON", null, TerminalValues.Number);
     command.AddSimpleParameter("STACKDEPTH", null, TerminalValues.Number);
     command.AddSimpleParameter("TERMINATED", null, TerminalValues.Number);
     command.AddSimpleParameter("DBLINK", null, TerminalValues.Varchar2, 30);
     command.AddSimpleParameter("ENTRYPOINTNAME", null, TerminalValues.Varchar2, 512);
     command.AddSimpleParameter("OWNER", null, TerminalValues.Varchar2, 30);
     command.AddSimpleParameter("NAME", null, TerminalValues.Varchar2, 30);
     command.AddSimpleParameter("NAMESPACE", null, TerminalValues.Number);
     command.AddSimpleParameter("LIBUNITTYPE", null, TerminalValues.Number);
 }
Пример #23
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = String.Format(OracleDatabaseCommands.SelectExplainPlanCommandText, DataModel.TargetTableName);
     command.AddSimpleParameter("STATEMENT_ID", DataModel.ExecutionPlanKey);
 }
Пример #24
0
 public override void InitializeCommand(OracleCommand command)
 {
     command.CommandText = OracleDatabaseCommands.SelectTablespaceDatafiles;
     command.AddSimpleParameter("TABLESPACE_NAME", DataModel.Name);
 }