Create store procedure for insert statements
Team,
Would someone help me to create a simple stored procedure which does the following things in order.
1. Truncate the table
2. insert records into table like
insert into backup (HOST_NAME,INSTANCE_NAME,input_type,status,start_time)select a.HOST_NAME,a.INSTANCE_NAME,b.input_type,b.status,b.start_time from v$instance a,V$RMAN_BACKUP_JOB_DETAILS b where b.start_time > sysdate -1;
3. another insert statement to another DB like
insert into backup_report@DBLINK(HOST_NAME,INSTANCE_NAME,input_type,status,start_time)select * from backup
4. commit;
Regards,
Ram.