1

What is the standard way of only allowing a single login during an Oracle 9i database export to prevent others from modifying the database during or after the export?

Steven
  • 175
  • 2
  • 10

2 Answers2

2

You can use restricted mode to keep everyone off who does not have RESTRICTED_SESSION privileges:

ALTER SYSTEM ENABLE RESTRICTED SESSION;

This does not prevent other users with this privilege from logging on.

DCookie
  • 2,098
  • 1
  • 17
  • 18
  • Will this disconnect current sessions of those who do not have RESTRICTED_SESSION, or will it only prevent logon? – Steven Feb 03 '10 at 20:17
  • I believe it only prevents new logons. Typically, you would shutdown the instance, and bring it back up in restricted mode. You can even specify to startup the instance in restricted mode: STARTUP RESTRICT; – DCookie Feb 03 '10 at 22:51
  • 1
    If one were only worried about making sure the export was consistent to a single point in time, the CONSISTENT=Y option can be set. – Adam Musch Sep 02 '10 at 15:09
0

Why would one need to? An export in CONSISTENT mode would take an export as of the SCN when the export kicked off; functionally equivalent to:

SET TRANSACTION READ ONLY;
SELECT FROM TABLE1;
SELECT FROM TABLE2;
.
.
.
Adam Musch
  • 131
  • 2
  • 1
    I am performing the final export (and subsequent import) onto a new server to replace the current one. I need to be sure no information was put into the old database after I started the export. – Steven Mar 12 '10 at 20:30