Oracle workspace manager [message #68650] |
Tue, 18 May 2004 11:27 |
James
Messages: 120 Registered: June 2000
|
Senior Member |
|
|
We have oracle 9.2.0.1.0.
I have to keep record history on Table T
I'd like to try to use oracle workspace manager.
What do I have to start from?
Thanks.
š
š
|
|
|
Re: Oracle workspace manager [message #68651 is a reply to message #68650] |
Wed, 19 May 2004 06:16 |
Frank Naude
Messages: 4581 Registered: April 1998
|
Senior Member |
|
|
Hi,
The Workspace Manager is documented in the "Oracle9i Application Developer's Guide - Workspace Manager".
Here is an quick example:
SQL> conn / as sysdba
Connected.
SQL> prompt Install the Workspace Manager
Install the Workspace Manager
SQL> -- @?/rdbms/admin/owminst.plb
SQL> conn scott/tiger
Connected.
SQL> prompt Cleanup...
Cleanup...
SQL> EXECUTE DBMS_WM.RemoveWorkspace('tab1_ws1');
PL/SQL procedure successfully completed.
SQL> EXECUTE DBMS_WM.DisableVersioning('tab1');
PL/SQL procedure successfully completed.
SQL> DROP TABLE tab1;
Table dropped.
SQL> prompt Create new table and enable versioning...
Create new table and enable versioning...
SQL> CREATE TABLE tab1 (col1 NUMBER PRIMARY KEY);
Table created.
SQL> EXECUTE DBMS_WM.EnableVersioning('tab1', 'VIEW_WO_OVERWRITE');
PL/SQL procedure successfully completed.
SQL> prompt Create a workspace and modify its data...
Create a workspace and modify its data...
SQL> EXECUTE DBMS_WM.CreateWorkspace('tab1_ws1');
PL/SQL procedure successfully completed.
SQL> EXECUTE DBMS_WM.GotoWorkspace('tab1_ws1');
PL/SQL procedure successfully completed.
SQL> insert into tab1 values (1);
1 row created.
SQL> commit;
Commit complete.
SQL> prompt Work on the LIVE workspace...
Work on the LIVE workspace...
SQL> EXECUTE DBMS_WM.GotoWorkspace('LIVE');
PL/SQL procedure successfully completed.
SQL> insert into tab1 values (2);
1 row created.
SQL> select * from tab1;
COL1
----------
2
SQL> prompt Switch to the TAB1_WS1 workspace and look at the data...
Switch to the TAB1_WS1 workspace and look at the data...
SQL> EXECUTE DBMS_WM.GotoWorkspace('tab1_ws1');
PL/SQL procedure successfully completed.
SQL> select * from tab1;
COL1
----------
1
Best regards.
Frank
|
|
|