operations:db_ncedc:new_year
Table of Contents
What to do before a new year
Waveforms:
Create tablespaces on all master databases and add a new waveform partition for the new year with sub-partitions for all the networks.
This is a summary on how to add a new partition to the Waveform table. The table is partitioned by years and by networks. First of all, a new tablespace needs to be created for each network. Once this is done, a new partition has to be added to the Waveform table.
seismo39% ssh ncdb2 -l oracle oracle's password: Last login: Thu Dec 19 2002 16:32:43 -0800 from seismo39.geo.ber Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001 ncdb2% sqlplus /nolog SQL*Plus: Release 9.2.0.1.0 - Production on Mon Sep 16 10:09:47 2002 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> CONNECT / AS SYSDBA Connected. SQL> CREATE TABLESPACE WF_BK_2003 2 DATAFILE '/data/ora001/oradata/ncedc/WF_BK_2003_PD01.dbf' SIZE 64M 3 AUTOEXTEND ON NEXT 1M MAXSIZE 512M 4 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M 5 SEGMENT SPACE MANAGEMENT AUTO 6 BLOCKSIZE 8K; Tablespace created. SQL> CONNECT ncedcdba/**** Connected. SQL> ALTER TABLE waveform 2 ADD PARTITION WF_2003 VALUES LESS THAN (1072915222) 3 (SUBPARTITION WF_UL_2003 VALUES ('UL') TABLESPACE WF_UL_2003, 4 SUBPARTITION WF_BK_2003 VALUES ('BK') TABLESPACE WF_BK_2003, 5 SUBPARTITION WF_NN_2003 VALUES ('NN') TABLESPACE WF_NN_2003, 6 SUBPARTITION WF_BP_2003 VALUES ('BP') TABLESPACE WF_BP_2003, 7 SUBPARTITION WF_NC_2003 VALUES ('NC') TABLESPACE WF_NC_2003); SQL> QUIT Disconnected from Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production ncdb2% The boundary limit of the partition is found by using the following SQL statement: SQL> SELECT TRUETIME.STRING2TRUE ('2004/01/01 00:00:00') FROM DUAL; TRUETIME.STRING2TRUE('2004/01/0100:00:00') ------------------------------------------ 1072915222 SQL>
SeismiQuery:
Update the SeismiQuery cron job to reflect the new year (/home/httpd/sq-cgi-bin/calendars/Update_Calendars.csh).
[dcmgr@quake ~]$ cat /home/httpd/sq-cgi-bin/calendars/Update_Calendars.csh #!/bin/bash source ~/.bashrc source ~/.bash_env /home/httpd/sq-cgi-bin/calendars/Update_Calendars 2002 2003 >& /home/httpd/sq-cgi-bin/calendars/Update_Calendars.log [dcmgr@quake ~]$
operations/db_ncedc/new_year.txt · Last modified: 2020/05/27 15:36 by stephane