Skip to content
Snippets Groups Projects
Commit af53389a authored by Steven Murray's avatar Steven Murray
Browse files

CASTOR-5101 The tapegateway PL/SQL procedure tg_setFileMigrated() does not...

CASTOR-5101 The tapegateway PL/SQL procedure tg_setFileMigrated() does not handle deleted migration jobs

Fixed.
parent 8045bc09
Branches
Tags
No related merge requests found
......@@ -271,6 +271,7 @@ AS
MIGRATION_FAILED CONSTANT VARCHAR2(2048) := 'failFileMigration: migration to tape failed for this file, giving up';
MIGRATION_FAILED_NOT_FOUND CONSTANT VARCHAR2(2048) := 'failFileMigration: file not found when failing migration';
BULK_MIGRATION_COMPLETED CONSTANT VARCHAR2(2048) := 'setBulkFilesMigrationResult: bulk migration completed';
MIGRATION_JOB_DOES_NOT_EXIST CONSTANT VARCHAR2(2048) := 'tg_setFileMigrated: migration job does not exist';
REPACK_SUBMITTED CONSTANT VARCHAR2(2048) := 'New Repack request submitted';
REPACK_ABORTING CONSTANT VARCHAR2(2048) := 'Aborting Repack request';
......
......@@ -1640,6 +1640,7 @@ CREATE OR REPLACE PROCEDURE tg_setFileMigrated(inMountTrId IN NUMBER, inFileId I
varParams VARCHAR2(4000);
varMigStartTime NUMBER;
varSrId INTEGER;
varNbJobsDeleted INTEGER := 0;
BEGIN
varNsHost := getConfigOption('stager', 'nsHost', '');
-- Lock the CastorFile
......@@ -1647,12 +1648,36 @@ BEGIN
WHERE CF.fileid = inFileId
AND CF.nsHost = varNsHost
FOR UPDATE;
-- delete the corresponding migration job, create the new migrated segment
-- try to delete the corresponding migration job
DELETE FROM MigrationJob
WHERE castorFile = varCfId
AND mountTransactionId = inMountTrId
RETURNING destCopyNb, VID, originalVID, creationTime
INTO varCopyNb, varVID, varOrigVID, varMigStartTime;
varNbJobsDeleted := sql%rowcount;
-- If there was no migration job to delete
IF 0 = varNbJobsDeleted THEN
-- check if another migration should be performed
SELECT /*+ INDEX_RS_ASC(MigrationJob I_MigrationJob_CFVID) */
count(*) INTO varMigJobCount
FROM MigrationJob
WHERE castorFile = varCfId;
IF varMigJobCount = 0 THEN
-- no more migrations, delete all migrated segments
DELETE FROM MigratedSegment
WHERE castorFile = varCfId;
END IF;
-- log an explanation and return
-- this is not an error, a migration job can be deleted before it is completed
varParams := 'mountTransactionId='|| to_char(inMountTrId) || ' ' || inLogContext;
logToDLF(inReqid, dlf.LVL_SYSTEM, dlf.MIGRATION_JOB_DOES_NOT_EXIST, inFileId, varNsHost, 'tapegatewayd', varParams);
RETURN;
END IF;
-- check if another migration should be performed
SELECT /*+ INDEX_RS_ASC(MigrationJob I_MigrationJob_CFVID) */
count(*) INTO varMigJobCount
......
/******************************************************************************
* stager_2.1.15-8_to_2.1.15-9.sql
*
* This file is part of the Castor project.
* See http://castor.web.cern.ch/castor
*
* Copyright (C) 2003 CERN
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* This script upgrades a CASTOR v2.1.15-9 STAGER database to v2.1.15-10
*
* @author Castor Dev team, castor-dev@cern.ch
*****************************************************************************/
/* Stop on errors */
WHENEVER SQLERROR EXIT FAILURE
BEGIN
-- If we have encountered an error rollback any previously non committed
-- operations. This prevents the UPDATE of the UpgradeLog from committing
-- inconsistent data to the database.
ROLLBACK;
UPDATE UpgradeLog
SET failureCount = failureCount + 1
WHERE schemaVersion = '2_1_15_0'
AND release = '2_1_15_11'
AND state != 'COMPLETE';
COMMIT;
END;
/
/* Verify that the script is running against the correct schema and version */
DECLARE
unused VARCHAR(100);
BEGIN
SELECT release INTO unused FROM CastorVersion
WHERE schemaName = 'STAGER'
AND release LIKE '2_1_15_10%';
EXCEPTION WHEN NO_DATA_FOUND THEN
-- Error, we cannot apply this script
raise_application_error(-20000, 'PL/SQL release mismatch. Please run previous upgrade scripts for the STAGER before this one.');
END;
/
INSERT INTO UpgradeLog (schemaVersion, release, type)
VALUES ('2_1_15_0', '2_1_15_11', 'TRANSPARENT');
COMMIT;
/* Job management */
BEGIN
FOR a IN (SELECT * FROM user_scheduler_jobs)
LOOP
-- Stop any running jobs
IF a.state = 'RUNNING' THEN
dbms_scheduler.stop_job(a.job_name, force=>TRUE);
END IF;
-- Schedule the start date of the job to 15 minutes from now. This
-- basically pauses the job for 15 minutes so that the upgrade can
-- go through as quickly as possible.
dbms_scheduler.set_attribute(a.job_name, 'START_DATE', SYSDATE + 15/1440);
END LOOP;
END;
/
/**
* Package containing the definition of all DLF levels and messages logged from the SQL-to-DLF API
*/
CREATE OR REPLACE PACKAGE dlf
AS
/* message levels */
LVL_EMERGENCY CONSTANT PLS_INTEGER := 0; /* LOG_EMERG System is unusable */
LVL_ALERT CONSTANT PLS_INTEGER := 1; /* LOG_ALERT Action must be taken immediately */
LVL_CRIT CONSTANT PLS_INTEGER := 2; /* LOG_CRIT Critical conditions */
LVL_ERROR CONSTANT PLS_INTEGER := 3; /* LOG_ERR Error conditions */
LVL_WARNING CONSTANT PLS_INTEGER := 4; /* LOG_WARNING Warning conditions */
LVL_NOTICE CONSTANT PLS_INTEGER := 5; /* LOG_NOTICE Normal but significant condition */
LVL_USER_ERROR CONSTANT PLS_INTEGER := 5; /* LOG_NOTICE Normal but significant condition */
LVL_AUTH CONSTANT PLS_INTEGER := 5; /* LOG_NOTICE Normal but significant condition */
LVL_SECURITY CONSTANT PLS_INTEGER := 5; /* LOG_NOTICE Normal but significant condition */
LVL_SYSTEM CONSTANT PLS_INTEGER := 6; /* LOG_INFO Informational */
LVL_DEBUG CONSTANT PLS_INTEGER := 7; /* LOG_DEBUG Debug-level messages */
/* messages */
FILE_DROPPED_BY_CLEANING CONSTANT VARCHAR2(2048) := 'deleteOutOfDateStageOutDCs: File was dropped by internal cleaning';
PUTDONE_ENFORCED_BY_CLEANING CONSTANT VARCHAR2(2048) := 'deleteOutOfDateStageOutDCs: PutDone enforced by internal cleaning';
DELETING_REQUESTS CONSTANT VARCHAR2(2048) := 'deleteTerminatedRequests: Cleaning up completed requests';
D2D_DROPPED_BY_CLEANING CONSTANT VARCHAR2(2048) := 'deleteStaleDisk2DiskCopyJobs: D2D job removed by internal cleaning';
DBJOB_UNEXPECTED_EXCEPTION CONSTANT VARCHAR2(2048) := 'Unexpected exception caught in DB job';
MIGMOUNT_NO_FILE CONSTANT VARCHAR2(2048) := 'startMigrationMounts: failed migration mount creation due to lack of files';
MIGMOUNT_AGE_NO_FILE CONSTANT VARCHAR2(2048) := 'startMigrationMounts: failed migration mount creation base on age due to lack of files';
MIGMOUNT_NEW_MOUNT CONSTANT VARCHAR2(2048) := 'startMigrationMounts: created new migration mount';
MIGMOUNT_NEW_MOUNT_AGE CONSTANT VARCHAR2(2048) := 'startMigrationMounts: created new migration mount based on age';
MIGMOUNT_NOACTION CONSTANT VARCHAR2(2048) := 'startMigrationMounts: no need for new migration mount';
RECMOUNT_NEW_MOUNT CONSTANT VARCHAR2(2048) := 'startRecallMounts: created new recall mount';
RECMOUNT_FAILED_NEW_MOUNT CONSTANT VARCHAR2(2048) := 'startRecallMounts: not creating mount that would have been empty (possible issue with destination diskpools)';
RECMOUNT_NOACTION_NODRIVE CONSTANT VARCHAR2(2048) := 'startRecallMounts: not allowed to start new recall mount. Maximum nb of drives has been reached';
RECMOUNT_NOACTION_NOCAND CONSTANT VARCHAR2(2048) := 'startRecallMounts: no candidate found for a mount';
RECALL_FOUND_ONGOING_RECALL CONSTANT VARCHAR2(2048) := 'createRecallCandidate: found already running recall';
RECALL_UNKNOWN_NS_ERROR CONSTANT VARCHAR2(2048) := 'createRecallCandidate: error when retrieving segments from namespace';
RECALL_NO_SEG_FOUND CONSTANT VARCHAR2(2048) := 'createRecallCandidate: no valid segment to recall found';
RECALL_NO_SEG_FOUND_AT_ALL CONSTANT VARCHAR2(2048) := 'createRecallCandidate: no segment found for this file. File is probably lost';
RECALL_INVALID_SEGMENT CONSTANT VARCHAR2(2048) := 'createRecallCandidate: found unusable segment';
RECALL_UNUSABLE_TAPE CONSTANT VARCHAR2(2048) := 'createRecallCandidate: found segment on unusable tape';
RECALL_CREATING_RECALLJOB CONSTANT VARCHAR2(2048) := 'createRecallCandidate: created new RecallJob';
RECALL_MISSING_COPIES CONSTANT VARCHAR2(2048) := 'createRecallCandidate: detected missing copies on tape';
RECALL_MISSING_COPIES_NOOP CONSTANT VARCHAR2(2048) := 'createRecallCandidate: detected missing copies on tape, but migrations ongoing';
RECALL_MJ_FOR_MISSING_COPY CONSTANT VARCHAR2(2048) := 'createRecallCandidate: create new MigrationJob to migrate missing copy';
RECALL_COPY_STILL_MISSING CONSTANT VARCHAR2(2048) := 'createRecallCandidate: could not find enough valid copy numbers to create missing copy';
RECALL_MISSING_COPY_NO_ROUTE CONSTANT VARCHAR2(2048) := 'createRecallCandidate: no route to tape defined for missing copy';
RECALL_MISSING_COPY_ERROR CONSTANT VARCHAR2(2048) := 'createRecallCandidate: unexpected error when creating missing copy';
RECALL_CANCEL_BY_VID CONSTANT VARCHAR2(2048) := 'Canceling tape recall for given VID';
RECALL_CANCEL_RECALLJOB_VID CONSTANT VARCHAR2(2048) := 'Canceling RecallJobs for given VID';
RECALL_FAILING CONSTANT VARCHAR2(2048) := 'Failing Recall(s)';
RECALL_FS_NOT_FOUND CONSTANT VARCHAR2(2048) := 'bestFileSystemForRecall could not find a suitable destination for this recall';
RECALL_LOOPING_ON_LOCK CONSTANT VARCHAR2(2048) := 'Giving up with recall as we are looping on locked file(s)';
RECALL_NOT_FOUND CONSTANT VARCHAR2(2048) := 'Unable to identify recall, giving up';
RECALL_INVALID_PATH CONSTANT VARCHAR2(2048) := 'setFileRecalled: unable to parse input path, giving up';
RECALL_COMPLETED_DB CONSTANT VARCHAR2(2048) := 'setFileRecalled: db updates after full recall completed';
RECALL_FILE_OVERWRITTEN CONSTANT VARCHAR2(2048) := 'setFileRecalled: file was overwritten during recall, restarting from scratch or skipping repack';
RECALL_FILE_DROPPED CONSTANT VARCHAR2(2048) := 'checkRecallInNS: file was dropped from namespace during recall, giving up';
RECALL_BAD_CHECKSUM CONSTANT VARCHAR2(2048) := 'checkRecallInNS: bad checksum detected, will retry if allowed';
RECALL_SEG_INCONSISTENT CONSTANT VARCHAR2(2048) := 'checkRecallInNS: inconsistency detected at segment level, will retry if allowed';
RECALL_CREATED_CHECKSUM CONSTANT VARCHAR2(2048) := 'checkRecallInNS: created missing checksum in the namespace';
RECALL_FAILED CONSTANT VARCHAR2(2048) := 'setBulkFileRecallResult: recall process failed, will retry if allowed';
RECALL_PERMANENTLY_FAILED CONSTANT VARCHAR2(2048) := 'setFileRecalled: recall process failed permanently';
BULK_RECALL_COMPLETED CONSTANT VARCHAR2(2048) := 'setBulkFileRecallResult: bulk recall completed';
MIGRATION_CANCEL_BY_VID CONSTANT VARCHAR2(2048) := 'Canceling tape migration for given VID';
MIGRATION_COMPLETED CONSTANT VARCHAR2(2048) := 'setFileMigrated: db updates after full migration completed';
MIGRATION_NOT_FOUND CONSTANT VARCHAR2(2048) := 'Unable to identify migration, giving up';
MIGRATION_RETRY CONSTANT VARCHAR2(2048) := 'setBulkFilesMigrationResult: migration failed, will retry if allowed';
MIGRATION_FILE_DROPPED CONSTANT VARCHAR2(2048) := 'failFileMigration: file was dropped or modified during migration, giving up';
MIGRATION_SUPERFLUOUS_COPY CONSTANT VARCHAR2(2048) := 'failFileMigration: file already had enough copies on tape, ignoring new segment';
MIGRATION_FAILED CONSTANT VARCHAR2(2048) := 'failFileMigration: migration to tape failed for this file, giving up';
MIGRATION_FAILED_NOT_FOUND CONSTANT VARCHAR2(2048) := 'failFileMigration: file not found when failing migration';
BULK_MIGRATION_COMPLETED CONSTANT VARCHAR2(2048) := 'setBulkFilesMigrationResult: bulk migration completed';
MIGRATION_JOB_DOES_NOT_EXIST CONSTANT VARCHAR2(2048) := 'tg_setFileMigrated: migration job does not exist';
REPACK_SUBMITTED CONSTANT VARCHAR2(2048) := 'New Repack request submitted';
REPACK_ABORTING CONSTANT VARCHAR2(2048) := 'Aborting Repack request';
REPACK_ABORTED CONSTANT VARCHAR2(2048) := 'Repack request aborted';
REPACK_ABORTED_FAILED CONSTANT VARCHAR2(2048) := 'Aborting Repack request failed, dropping it';
REPACK_STARTED CONSTANT VARCHAR2(2048) := 'repackManager: Repack process started';
REPACK_JOB_STATS CONSTANT VARCHAR2(2048) := 'repackManager: Repack processes statistics';
REPACK_UNEXPECTED_EXCEPTION CONSTANT VARCHAR2(2048) := 'handleRepackRequest: unexpected exception caught';
REPACK_COMPLETED CONSTANT VARCHAR2(2048) := 'Repack completed successfully';
REPACK_FAILED CONSTANT VARCHAR2(2048) := 'Repack ended with failures';
DRAINING_REFILL CONSTANT VARCHAR2(2048) := 'drainRunner: Creating new replication jobs';
DELETEDISKCOPY_RECALL CONSTANT VARCHAR2(2048) := 'deleteDiskCopy: diskCopy was lost, about to recall from tape';
DELETEDISKCOPY_REPLICATION CONSTANT VARCHAR2(2048) := 'deleteDiskCopy: diskCopy was lost, about to replicate from another pool';
DELETEDISKCOPY_LOST CONSTANT VARCHAR2(2048) := 'deleteDiskCopy: file was LOST and is being dropped from the system';
DELETEDISKCOPY_GC CONSTANT VARCHAR2(2048) := 'deleteDiskCopy: diskCopy is being garbage collected';
DELETEDISKCOPY_NOOP CONSTANT VARCHAR2(2048) := 'deleteDiskCopy: diskCopy could not be garbage collected';
STAGER_GET CONSTANT VARCHAR2(2048) := 'Get Request';
STAGER_PUT CONSTANT VARCHAR2(2048) := 'Put Request';
STAGER_PREPARETOGET CONSTANT VARCHAR2(2048) := 'PrepareToGet Request';
STAGER_PREPARETOPUT CONSTANT VARCHAR2(2048) := 'PrepareToPut Request';
STAGER_D2D_TRIGGERED CONSTANT VARCHAR2(2048) := 'Triggering DiskCopy replication';
STAGER_WAITSUBREQ CONSTANT VARCHAR2(2048) := 'Request moved to Wait';
STAGER_UNABLETOPERFORM CONSTANT VARCHAR2(2048) := 'Unable to perform request, notifying user';
STAGER_RECREATION_IMPOSSIBLE CONSTANT VARCHAR2(2048) := 'Impossible to recreate CastorFile';
STAGER_CASTORFILE_RECREATION CONSTANT VARCHAR2(2048) := 'Recreating CastorFile';
STAGER_GET_REPLICATION CONSTANT VARCHAR2(2048) := 'Triggering internal DiskCopy replication';
STAGER_GET_REPLICATION_FAIL CONSTANT VARCHAR2(2048) := 'Triggering internal DiskCopy replication failed';
STAGER_DISKCOPY_FOUND CONSTANT VARCHAR2(2048) := 'Available DiskCopy found';
STAGER_DELETED_WRITTENTO CONSTANT VARCHAR2(2048) := 'File was deleted while it was written to. Giving up with migration';
STAGER_PUTSTART CONSTANT VARCHAR2(2048) := 'putStart completed successfully';
STAGER_PUTENDED CONSTANT VARCHAR2(2048) := 'putEnded completed successfully';
STAGER_GETSTART CONSTANT VARCHAR2(2048) := 'getStart completed successfully';
STAGER_GETENDED CONSTANT VARCHAR2(2048) := 'getEnded completed successfully';
NS_PROCESSING_COMPLETE CONSTANT VARCHAR2(2048) := 'Processing complete';
NS_CLOSEX_ERROR CONSTANT VARCHAR2(2048) := 'Error closing file';
REPORT_HEART_BEAT_RESUMED CONSTANT VARCHAR2(2048) := 'Heartbeat resumed for diskserver, status changed to PRODUCTION';
D2D_CREATING_JOB CONSTANT VARCHAR2(2048) := 'Created new Disk2DiskCopyJob';
D2D_CANCELED_AT_START CONSTANT VARCHAR2(2048) := 'disk2DiskCopyStart : Replication request canceled while queuing in scheduler or transfer already started';
D2D_MULTIPLE_COPIES_ON_DS CONSTANT VARCHAR2(2048) := 'disk2DiskCopyStart : Multiple copies of this file already found on this diskserver';
D2D_SOURCE_GONE CONSTANT VARCHAR2(2048) := 'disk2DiskCopyStart : Source has disappeared while queuing in scheduler, retrying';
D2D_SRC_DISABLED CONSTANT VARCHAR2(2048) := 'disk2DiskCopyStart : Source diskserver/filesystem was DISABLED meanwhile';
D2D_DEST_NOT_PRODUCTION CONSTANT VARCHAR2(2048) := 'disk2DiskCopyStart : Destination diskserver/filesystem not in PRODUCTION any longer';
D2D_START_OK CONSTANT VARCHAR2(2048) := 'disk2DiskCopyStart completed successfully';
D2D_D2DDONE_CANCEL CONSTANT VARCHAR2(2048) := 'disk2DiskCopyEnded : Invalidating new copy as job was canceled';
D2D_D2DDONE_OK CONSTANT VARCHAR2(2048) := 'disk2DiskCopyEnded : Replication successful';
D2D_D2DDONE_RETRIED CONSTANT VARCHAR2(2048) := 'disk2DiskCopyEnded : Retrying disk to disk copy';
D2D_D2DDONE_NORETRY CONSTANT VARCHAR2(2048) := 'disk2DiskCopyEnded : no retry, giving up';
D2D_D2DFAILED CONSTANT VARCHAR2(2048) := 'disk2DiskCopyEnded : replication failed';
REBALANCING_START CONSTANT VARCHAR2(2048) := 'rebalancing : starting';
REBALANCING_STOP CONSTANT VARCHAR2(2048) := 'rebalancing : stopping';
END dlf;
/
/* Commit a successful file migration */
CREATE OR REPLACE PROCEDURE tg_setFileMigrated(inMountTrId IN NUMBER, inFileId IN NUMBER,
inReqId IN VARCHAR2, inLogContext IN VARCHAR2) AS
varNsHost VARCHAR2(2048);
varCfId NUMBER;
varCopyNb INTEGER;
varVID VARCHAR2(10);
varOrigVID VARCHAR2(10);
varMigJobCount INTEGER;
varParams VARCHAR2(4000);
varMigStartTime NUMBER;
varSrId INTEGER;
varNbJobsDeleted INTEGER := 0;
BEGIN
varNsHost := getConfigOption('stager', 'nsHost', '');
-- Lock the CastorFile
SELECT CF.id INTO varCfId FROM CastorFile CF
WHERE CF.fileid = inFileId
AND CF.nsHost = varNsHost
FOR UPDATE;
-- try to delete the corresponding migration job
DELETE FROM MigrationJob
WHERE castorFile = varCfId
AND mountTransactionId = inMountTrId
RETURNING destCopyNb, VID, originalVID, creationTime
INTO varCopyNb, varVID, varOrigVID, varMigStartTime;
varNbJobsDeleted := sql%rowcount;
-- If there was no migration job to delete
IF 0 = varNbJobsDeleted THEN
-- check if another migration should be performed
SELECT /*+ INDEX_RS_ASC(MigrationJob I_MigrationJob_CFVID) */
count(*) INTO varMigJobCount
FROM MigrationJob
WHERE castorFile = varCfId;
IF varMigJobCount = 0 THEN
-- no more migrations, delete all migrated segments
DELETE FROM MigratedSegment
WHERE castorFile = varCfId;
END IF;
-- log an explanation and return
-- this is not an error, a migration job can be deleted before it is completed
varParams := 'mountTransactionId='|| to_char(inMountTrId) || ' ' || inLogContext;
logToDLF(inReqid, dlf.LVL_SYSTEM, dlf.MIGRATION_JOB_DOES_NOT_EXIST, inFileId, varNsHost, 'tapegatewayd', varParams);
RETURN;
END IF;
-- check if another migration should be performed
SELECT /*+ INDEX_RS_ASC(MigrationJob I_MigrationJob_CFVID) */
count(*) INTO varMigJobCount
FROM MigrationJob
WHERE castorFile = varCfId;
IF varMigJobCount = 0 THEN
-- no more migrations, delete all migrated segments
DELETE FROM MigratedSegment
WHERE castorFile = varCfId;
-- And mark CastorFile as ONTAPE
UPDATE CastorFile
SET tapeStatus= dconst.CASTORFILE_ONTAPE
WHERE id = varCfId;
ELSE
-- another migration ongoing, keep track of the one just completed
INSERT INTO MigratedSegment (castorFile, copyNb, vid)
VALUES (varCfId, varCopyNb, varVID);
END IF;
-- Do we have to deal with a repack ?
IF varOrigVID IS NOT NULL THEN
-- Yes we do, then archive the repack subrequest associated
-- Note that there may be several if we are dealing with old bad tapes
-- that have 2 copies of the same file on them. Thus we take one at random
SELECT /*+ INDEX_RS_ASC(SR I_Subrequest_CastorFile) */ SR.id INTO varSrId
FROM SubRequest SR, StageRepackRequest Req
WHERE SR.castorfile = varCfId
AND SR.status = dconst.SUBREQUEST_REPACK
AND SR.request = Req.id
AND Req.RepackVID = varOrigVID
AND ROWNUM < 2;
archiveSubReq(varSrId, dconst.SUBREQUEST_FINISHED);
END IF;
-- Log 'db updates after full migration completed'
varParams := 'TPVID='|| varVID ||' mountTransactionId='|| to_char(inMountTrId) ||
' migrationTime=' || to_char(trunc(getTime() - varMigStartTime, 0)) || ' '|| inLogContext;
logToDLF(inReqid, dlf.LVL_SYSTEM, dlf.MIGRATION_COMPLETED, inFileId, varNsHost, 'tapegatewayd', varParams);
EXCEPTION WHEN NO_DATA_FOUND THEN
-- Log 'file not found, giving up'
varParams := 'mountTransactionId='|| to_char(inMountTrId) ||' '|| inLogContext;
logToDLF(inReqid, dlf.LVL_ERROR, dlf.MIGRATION_NOT_FOUND, inFileId, varNsHost, 'tapegatewayd', varParams);
END;
/
/* Recompile all invalid procedures, triggers and functions */
/************************************************************/
BEGIN
recompileAll();
END;
/
/* Flag the schema upgrade as COMPLETE */
/***************************************/
UPDATE UpgradeLog SET endDate = systimestamp, state = 'COMPLETE'
WHERE release = '2_1_15_10';
COMMIT;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment