Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle RMAN Recover database fails with error when done using SYSBACKUP user

Below is the error message I receive in rman

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 10/08/2021 20:48:37
RMAN-11003: failure during parse/execution of SQL statement: alter database recover datafile list clear
ORA-01031: insufficient privileges

I am logged in on a different machine.
I use rman target "user/passwd@service AS SYSBACKUP"
then run the below script
run {
2> set until scn <scn>;
3> restore database;
4> recover database;
5> }
datafiles are restore but during recover phase I get the insufficient privilege error.
If I connect to rman as target "sys/passwd@service", I am able to restore and recover the database.
The user with SYSBACKUP privilege is created as follows:
create user c##restore_guy identified by passwd container=all;
grant SYSBACKUP TO c##restore_guy;

Comments

morgalr
958296 wrote:
Hello everyone,

I've got a few problems using WatchService.class:

public void watch() throws IOException, InterruptedException{
WatchService watchService = FileSystems.getDefault().newWatchService();

Paths.get(desktopDirPath).register(watchService,
StandardWatchEventKinds.ENTRY_CREATE,
StandardWatchEventKinds.ENTRY_DELETE,
StandardWatchEventKinds.ENTRY_MODIFY);

while(true){
WatchKey key = watchService.take();

for(WatchEvent<?> event : key.pollEvents()){
WatchEvent.Kind<?> kind = event.kind();

switch(kind.name()){
case KIND_ENTRY_CREATE:
// ... do something
break;
// ... more cases ...
default:
break;
}
}
key.reset();
}
}

So, there is my code snippet. First things first:

1.) Is a new thread started automatically when calling watchService's call method? I've been wondering because the method throws an InterruptedException.
Without actually checking the implementation, my understanding is that you have a thread created for he WatchService.
2.) I've got problems dealing with the watch events. For example let's imagine we want to move or delete one or more files when created in a specified directory. It seems to work for one file or even a few more. But it fails to handle new files which are created rapidly for example by a service in the watched directory. It seems that the occurring events aren't recognized fast enough, but that's just my theory. I've tried logging the paths to the files in a hashtable and deleting them asynchronous in another thread but it seems that I'll have to deal with concurrency then, won't I?
Yes. As stated in the WatchService Doc, actual functionality of the WatchService is highly platfom implementation specific, and the problem you list is one listed. Any time you have a file that may be visible by others, you have to deal with a potential concurrency issue.
1 - 1

Post Details

Added on Oct 8 2021
0 comments
324 views