create table xxp
(llave number(8) primary key,
 descripcion varchar2(60) not null,
 valor number(14,2) not null,
 estado char(1) not null
);


create snapshot log on xxp;

drop snapshot xxpsn;
create snapshot xxpsn
    tablespace datos
    storage (initial 100K next 100K pctincrease 50)
    refresh fast on demand
    next sysdate+1
    with primary key
    for update 
    as select * from xxp@visioni;

drop snapshot xxpsn1;
create snapshot xxpsn1
    tablespace datos
    storage (initial 100K next 100K pctincrease 50)
    refresh fast 
    start with sysdate
    next sysdate+1
    as select * from xxp@visioni;



begin
   for j in 0..19
   loop
      for i in 1..1000
      loop
         insert into xxp values(j*1000+i, 'Registo numero '||to_char(i), i*100, 'A');
      end loop;
   commit;
   end loop;
end;

-- dbms_snapshot.refresh(lista con comas, lista de modos opcional);
-- dbms_snapshot.refresh('xxpsn, xxqsn', 'FF' ); F=FAST C=COMPLETE
begin
   dbms_snapshot.refresh('xxpsn');
end;
/

begin
   dbms_snapshot.refresh('xxpsn1');
end;
/


begin
   dbms_snapshot.purge_log('xxp', 1);
end;
/


begin
   dbms_snapshot.refresh('GEN_CLIE_AGENTE, GEN_CLIENTE');
end;
/

-- OTROS
DROP TABLE XX1;
CREATE TABLE XX1(X NUMBER);

CREATE OR REPLACE PROCEDURE X(X1 NUMBER) IS
BEGIN
   INSERT INTO XX1 values (X1);
END;
