I often have to flashback my database to a certain restore point. On the machine where the database is running I log in with sqlplus and issue the following commands.
shutdown immediate;
startup mount;
flashback database to restore point bettertimes;
alter database open resetlogs;
I don't always have access to the machine (Windows XP) where the database is running
so I want to do the flashback remotely. I have put the above commands in the file
flashback.sql
and do:
sqlplus "sys/passwd as sysdba" @sql\flashback.sql
That works great but when I have to do it remotely I have to specify the SID and the command is:
sqlplus "sys/passwd@orcl as sysdba" @sql\flashback.sql
This doesn't work, neither on the machine where the database is running nor remotely.
The problem is that after the shutdown immediate
the connection is lost and I can't
reconnect without mounting and opening the database manually.
I'm no windows administrator on the server, just sysdba.
Is there a way to flashback the database remotely?