public function delete($conn_asm, $conn_db, $id) { global $error; $tablespace = $id; $dg = DEFAULT_DG; $drive = new Drive(); // Delete Consumer Group Mapping $result = self::update_consumer_group($conn_db, $id, 'NULL'); if ($result === ERROR) { $error->set_msg("Failed to delete Consumer Group mapping"); } // Delete User $result = self::exist_user($conn_db, $id); if ($result == TRUE) { $sql = "drop user $id cascade"; $state_id = oci_parse($conn_db, $sql); $result = oci_execute($state_id); if ($result == FALSE) { $error->set_msg("Failed to delete User"); } } // Delete Tablespace $result = $drive->delete_tablespace($conn_db, $tablespace); if ($result == FALSE) { $error->set_msg("Failed to delete Tablespace."); return(ERROR); } return(TRUE); }
public function delete($conn_asm, $conn_db, $id) { $tablespace = $id; $dg = $id; $drive = new Drive(); $result = $drive->delete_tablespace($conn_db, $tablespace); if ($result == FALSE) { $this->err_msg = array_merge($this->err_msg, $drive->err_msg); array_push($this->err_msg, "表領域を削除出来ませんでした。"); } $result = $drive->delete_dg($conn_asm, $dg); if ($result == FALSE) { $this->err_msg = array_merge($this->err_msg, $drive->err_msg); array_push($this->err_msg, "ディスクグループを削除出来ませんでした。"); } $result = self::update_consumer_group($conn_db, $id, 'NULL'); if ($result == FALSE) { array_push($this->err_msg, "コンシューマーグループマッピングを削除出来ませんでした。"); } $state_id = oci_parse($conn_db, "drop user $id cascade"); $result = oci_execute($state_id); if ($result == FALSE) { array_push($this->err_msg, "ユーザーを削除出来ませんでした。"); } return($result); }