我不小心覆盖了/usr/lib/oracle/xe/oradata/XE/system.dbf system.dbf
那么我并没有真正做到这一点,但是由于数据库中的其他故障,我重写了它。
当我尝试运行以下内容:
SQL> shutdown ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 289406976 bytes Fixed Size 1258488 bytes Variable Size 92277768 bytes Database Buffers 192937984 bytes Redo Buffers 2932736 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
现在我想尝试恢复数据库,因为在挂载或标准启动它肯定不起作用。
SQL> recover database using backup controlfile; ORA-00283: recovery session canceled due to errors ORA-01110: data file 1: '/usr/lib/oracle/xe/oradata/XE/system.dbf' ORA-01122: database file 1 failed verification check ORA-01110: data file 1: '/usr/lib/oracle/xe/oradata/XE/system.dbf' ORA-01206: file is not part of this database - wrong database id
我如何解决这个问题? 这甚至有可能吗?
我的“真正的”问题是我运行/etc/init.d/oracle-xeconfiguration,它覆盖了我的旧configuration,并可能删除了密码,所以我的表已经没有了,但是我find了mytablespace.dbf,所以我希望有可能恢复?
请说明一下。
你有数据库的备份吗? 覆盖SYSTEM表空间数据文件将需要从备份完整恢复。
因为我没有Oracle的经验,所以我根本不知道这是否适用。 但是,如果文件是由进程打开的,并且该进程仍在运行,则可以通过在/ proc文件系统中访问它来恢复它。
# ls -l /proc/13646/fd total 0 lrwx------ 1 root root 64 Apr 13 21:43 0 -> /dev/null lrwx------ 1 root root 64 Apr 13 21:43 1 -> /dev/null lrwx------ 1 root root 64 Apr 13 21:43 2 -> /dev/null lrwx------ 1 root root 64 Apr 13 21:43 3 -> socket:[38094] l-wx------ 1 root root 64 Apr 13 21:43 4 -> /var/log/openvpn-status-server.log lrwx------ 1 root root 64 Apr 13 21:43 5 -> /etc/openvpn/ipp.txt lrwx------ 1 root root 64 Apr 13 21:43 6 -> socket:[38099] lrwx------ 1 root root 64 Apr 13 21:43 7 -> /dev/net/tun
让我们删除其中的一个!
# rm /var/log/openvpn-status-server.log # ls /var/log/openvpn-status-server.log ls: cannot access /var/log/openvpn-status-server.log: No such file or directory
好的,再次删除,ls:
# ls -l /proc/13646/fd/4 l-wx------ 1 root root 64 Apr 13 21:43 /proc/13646/fd/4 -> /var/log/openvpn-status- server.log (deleted)
在那里,删除,但仍然举行。
# cp /proc/13646/fd/4 myrecover.txt # ls -l myrecover.txt -rw------- 1 root root 359 Apr 13 21:45 myrecover.txt
果然,我亲爱的老openvpn-status-server.log被恢复了!