Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing Snapshots in PL/SQL?

Status
Not open for further replies.

JeffShelley

Programmer
Aug 29, 2001
3
US
Is it possible to refresh a snapshot from a stored proc?
 

yup, use dynamic sql.

For 8.x below use DBMS_SQL package.

v_delete := 'dbms_snapshot.refresh()';
v_cid := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE (v_cid,v_delete,DBMS_SQL.NATIVE);
dbms_sql.close_cursor(v_cid);

For 8i +, use execute immediate;

EXECUTE IMMEDIATE ('dbms_snapshot.refresh{}');

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top