0% found this document useful (0 votes)
46 views

PLSQL Lecture-8

The document discusses creating a snapshot of a database table to replicate it on a remote location. A snapshot is created similar to a view but changes to the base table are not reflected in the snapshot. Snapshots are useful when the base table data is not changing.

Uploaded by

cavad565
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views

PLSQL Lecture-8

The document discusses creating a snapshot of a database table to replicate it on a remote location. A snapshot is created similar to a view but changes to the base table are not reflected in the snapshot. Snapshots are useful when the base table data is not changing.

Uploaded by

cavad565
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Creating Snapshot

Snapshot

Snapshot replicating tables on remote locations.

E.g. In Rawalpindi on DBSVR create Snapshot for remote


account table in KARACHI.

Snapshot is created same as we create VIEW of a table, but the


difference is that any DML operation on BASE table will not
effect snapshot.

It is useful when we are not changing data in the base table.

Creating Snapshot

SQL> create snapshot emp_copy as select * from emp;


emp;
Snapshot created.
SQL> select * from tab;
TNAME
-----------------------------BONUS
DEPT
EMP
EMP_COPY
SALGRADE
SNAP$_EMP_COPY

TABTYPE CLUSTERID
------- --------TABLE
TABLE
TABLE
VIEW
TABLE
TABLE

SQL> delete from emp;


emp;
SQL> insert into emp(empno,
emp(empno, deptno)
deptno) values(1254,10);
1 row created.

SQL> select * from emp_copy;


emp_copy;

Q
&

A
[email protected]

You might also like