meta data for this page
  •  

Különbségek

A kiválasztott változat és az aktuális verzió közötti különbségek a következők.

Összehasonlító nézet linkje

Előző változat mindkét oldalonElőző változat
Következő változat
Előző változat
sql [2024/04/02 16:37] adminsql [2025/01/22 16:45] (aktuális) – [Egyéb] admin
Sor 20: Sor 20:
 <file>select distinct node_name,class_name from backups where node_name='NODE' <file>select distinct node_name,class_name from backups where node_name='NODE'
 select distinct node_name,class_name from archives where node_name='NODE'</file> select distinct node_name,class_name from archives where node_name='NODE'</file>
 +
 +Megőrzési időkkel:
 +
 +  SELECT DISTINCT b.NODE_NAME, b.CLASS_NAME, c.SET_NAME, c.VEREXISTS, c.VERDELETED, c.RETEXTRA, c.RETONLY FROM backups b \
 +  JOIN nodes n ON b.NODE_NAME = n.NODE_NAME \
 +  JOIN bu_copygroups c ON n.DOMAIN_NAME = c.DOMAIN_NAME AND b.CLASS_NAME = c.CLASS_NAME ORDER BY b.NODE_NAME;
 +
  
 === Hibás PRIVATE volume-ok listázása === === Hibás PRIVATE volume-ok listázása ===
Sor 52: Sor 59:
  
 === Drive és path ONLINE státuszok ellenőrzése === === Drive és path ONLINE státuszok ellenőrzése ===
-<file>select substr(dr.LIBRARY_NAME,1,15) as LIBRARY, substr(dr.DRIVE_NAME,1,15) as DRIVE_NAME, substr(dr.ONLINE,1,3) as "DRIVE ONLINE?", substr(pa.SOURCE_NAME || ' - ' || pa.ONLINE,1,20) as "PATH ONLINE?", pa.device from drives as dr, paths as pa where pa.DESTINATION_NAME=dr.DRIVE_NAME order by library</file>+<file>select substr(dr.LIBRARY_NAME,1,15) as LIBRARY, substr(dr.DRIVE_NAME,1,15) as DRIVE_NAME, substr(dr.drive_serial,1,12) as SERIAL, substr(dr.ONLINE,1,3) as "DRIVE ONLINE?", substr(pa.SOURCE_NAME || ' - ' || pa.ONLINE,1,20) as "PATH ONLINE?", substr(pa.device,1,15) as DEVICE, substr(element,1,4) as ELEMENT from drives as dr, paths as pa where pa.DESTINATION_NAME=dr.DRIVE_NAME order by library</file> 
 + 
 +=== DRIVE és PATH-ok ONLINE/OFFLINE állítása === 
 + 
 +   DEFINE SCRIPT  UPDATE_DRIVES_ONLINE_TO "select 'update drive ' || library_name || ' ' || drive_name || ' online=' || upper('$1') from drives" 
 +   DEFINE SCRIPT  UPDATE_PATHS_ONLINE_TO "select 'update path ' || source_name || ' ' || destination_name || ' srct=serv destt=dr library=' || library_name || ' online=' || upper('$1') from paths where destination_type='DRIVE'"
  
 === Írási/olvasási hibás szalagok listázása === === Írási/olvasási hibás szalagok listázása ===
Sor 82: Sor 94:
 === Melyik node-ok írnak közvetlenül szalagra? === === Melyik node-ok írnak közvetlenül szalagra? ===
  
-  select substr(message,instr(message,' ',1,6)+1,instr(message,' ',1,7)-instr(message,' ',1,6)-1) as NODE, count(*) as TAPE_MOUNTS from actlog where msgno=0406 and session in (select session from actlog where msgno=0511 and substr(message,instr(message,' ',1,6)+1,1)!='/') and current_timestamp < date_time + 7 days group by substr(message,instr(message,' ',1,6)+1,instr(message,' ',1,7)-instr(message,' ',1,6)-1)+  select substr(message,instr(message,' ',1,6)+1,instr(message,' ',1,7)-instr(message,' ',1,6)-1) as NODE, count(*) as TAPE_MOUNTS from actlog where msgno in (0406,0839) and session in (select session from actlog where msgno=0511 and substr(message,instr(message,' ',1,6)+1,1)!='/') and current_timestamp < date_time + 7 days group by substr(message,instr(message,' ',1,6)+1,instr(message,' ',1,7)-instr(message,' ',1,6)-1) 
 +   
 +  select substr(date_time,1,19) as date_time, node from (select session,message,msgno,date_time,substr(substr(message,instr(message,' ',1,6)+1,instr(message,' ',1,7)-instr(message,' ',1,6)-1),1,30) as NODE from actlog where msgno in (0406,0839)) where session in (select session from actlog where msgno=0511 and current_timestamp < date_time + 30 days and substr(message,instr(message,' ',1,6)+1,1)!='/') order by date_time
  
 === Drive használat adatgyűjtő === === Drive használat adatgyűjtő ===
Sor 174: Sor 188:
  
   select * from TAB1 where ',' || 'ABC,BCD' || ',' like '%,' || Y || ',%'    select * from TAB1 where ',' || 'ABC,BCD' || ',' like '%,' || Y || ',%' 
 +  select REGEXP_SUBSTR(MESSAGE, '^[^.]+') as LEFT from messages
  
 ===Node-ok melyeknél az utolsó mentés és a replikáció közt eltelt idő több, mint 30 óra === ===Node-ok melyeknél az utolsó mentés és a replikáció közt eltelt idő több, mint 30 óra ===