Database Install/Upgrade/Opatch (MOSC)

MOSC Banner

Create store procedure for insert statements

edited Nov 20, 2015 10:03AM in Database Install/Upgrade/Opatch (MOSC) 5 commentsAnswered

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.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center