Importand DB Upgrade to be done !!: Difference between revisions
Jump to navigation
Jump to search
(New page: <pre> Dear Friends and Colleagues, the publication procedure for bricks that is running on most DBs is wrong, because it does not propagate ZEROX, ZEROY, ZEROZ. Please implement the attac...) |
m (1 revision imported) |
(No difference)
|
Latest revision as of 09:49, 18 March 2015
Dear Friends and Colleagues, the publication procedure for bricks that is running on most DBs is wrong, because it does not propagate ZEROX, ZEROY, ZEROZ. Please implement the attached version as soon as possible. Best regards Cristiano create or replace procedure PP_PUBLISH_BRICK(x_id number, dbx varchar2, jid number) AS logid number; s_start timestamp; r_chk number; r_token varchar2(64); s_rows integer; BEGIN logid := NULL; PP_LOG(logid, dbx, jid, 'Entering PP_PUBLISH_BRICK with x_id = ' || TO_CHAR(x_id) || ' DBLINK = ' || dbx); select count(*) into r_chk from pt_objects where type = 'BRICK' and objid = x_id; if r_chk = 0 then pp_register_object('BRICK', x_id); end if; select token into r_token from pt_objects where type = 'BRICK' and objid = x_id; execute immediate 'call operapub.pp_begin_writing_object@' || dbx || '(''BRICK'', ' || x_id || ', ''' || r_token || ''')'; PP_LOG(logid, dbx, jid, 'Inserting into TB_EVENTBRICKS with x_id = ' || TO_CHAR(x_id) || ' DBLINK = ' || dbx); s_start := systimestamp; EXECUTE IMMEDIATE 'INSERT INTO PV_EVENTBRICKS@' || dbx || ' (ID, MINX, MAXX, MINY, MAXY, MINZ, MAXZ, ID_BRICK, ID_SET, ZEROX, ZEROY, ZEROZ) (SELECT ID, MINX, MAXX, MINY, MAXY, MINZ, MAXZ, ID_BRICK, ID_SET, ZEROX, ZEROY, ZEROZ FROM TB_EVENTBRICKS WHERE ID = ' || x_id || ')'; s_rows := SQL%ROWCOUNT; pp_add_jobstats(jid, 'Bricks', s_start, systimestamp, s_rows); PP_LOG(logid, dbx, jid, 'Inserting into TB_PLATES with x_id = ' || TO_CHAR(x_id) || ' DBLINK = ' || dbx); s_start := systimestamp; EXECUTE IMMEDIATE 'INSERT INTO PV_PLATES@' || dbx || ' (ID_EVENTBRICK, ID, Z) (SELECT ID_EVENTBRICK, ID, Z FROM TB_PLATES WHERE ID_EVENTBRICK = ' || x_id || ')'; s_rows := SQL%ROWCOUNT; pp_add_jobstats(jid, 'Plates', s_start, systimestamp, s_rows); PP_LOG(logid, dbx, jid, 'Inserting into TB_TEMPLATEMARKSETS with x_id = ' || TO_CHAR(x_id) || ' DBLINK = ' || dbx); s_start := systimestamp; EXECUTE IMMEDIATE 'INSERT INTO PV_TEMPLATEMARKSETS@' || dbx || ' (ID, ID_EVENTBRICK, ID_MARK, POSX, POSY, MARKROW, MARKCOL, SHAPE, SIDE) (SELECT ID, ID_EVENTBRICK, ID_MARK, POSX, POSY, MARKROW, MARKCOL, SHAPE, SIDE FROM TB_TEMPLATEMARKSETS WHERE ID_EVENTBRICK = ' || x_id || ')'; s_rows := SQL%ROWCOUNT; pp_add_jobstats(jid, 'TemplateMarks', s_start, systimestamp, s_rows); PP_LOG(logid, dbx, jid, 'Committing changes in PC_PUBLISH_BRICK with x_id = ' || TO_CHAR(x_id) || ' DBLINK = ' || dbx); COMMIT; execute immediate 'call operapub.pp_finish_writing_object@' || dbx || '(''BRICK'', ' || x_id || ')'; PP_LOG(logid, dbx, jid, 'Completed PP_PUBLISH_BRICK with x_id = ' || TO_CHAR(x_id) || ' DBLINK = ' || dbx); END;