使用Linux文件句柄恢复Oracle数据文件
使用Linux文件句柄恢复Oracle数据文件'
查看当前数据文件
[oracle@zhongwc ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue Jan 15 11:14:48 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> col tablespace_name format a10
SQL> col file_name format a50
SQL> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SQL> select file_name,tablespace_name,status from dba_data_files;
FILE_NAME TABLESPACE STATUS
-------------------------------------------------- ---------- ---------
/u01/app/oracle/oradata/ZWC/users01.dbf USERS AVAILABLE
/u01/app/oracle/oradata/ZWC/undotbs01.dbf UNDOTBS1 AVAILABLE
/u01/app/oracle/oradata/ZWC/sysaux01.dbf SYSAUX AVAILABLE
/u01/app/oracle/oradata/ZWC/system01.dbf SYSTEM AVAILABLE
/u01/app/oracle/oradata/ZWC/example01.dbf EXAMPLE AVAILABLE
删除普通数据表空间的数据文件
SQL> !rm -r /u01/app/oracle/oradata/ZWC/users01.dbf
SQL> !rm -r /u01/app/oracle/oradata/ZWC/example01.dbf
查看文件句柄,发现users01.dbf和example01.dbf状态为delete,切记不要shutdown实例
[oracle@zhongwc ~]$ ps -ef|grep dbw|grep -v grep |awk '{print $2}'
2858
[oracle@zhongwc ~]$ ls -l /proc/2858/fd
total 0
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 0 -> /dev/null
l-wx------ 1 oracle oinstall 64 Jan 15 11:20 1 -> /dev/null
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 10 -> /dev/zero
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 11 -> /dev/zero
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 12 -> /u01/app/oracle/product/11.2.0/db_1/rdbms/mesg/orazhs.msb
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 13 -> /u01/app/oracle/product/11.2.0/db_1/dbs/hc_ZWC.dat
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 14 -> /proc/2858/fd/
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 15 -> /dev/zero
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 16 -> /u01/app/oracle/product/11.2.0/db_1/rdbms/mesg/oraus.msb
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 17 -> /u01/app/oracle/product/11.2.0/db_1/dbs/hc_ZWC.dat
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 18 -> /u01/app/oracle/product/11.2.0/db_1/dbs/lkZWC
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 19 -> /u01/app/oracle/product/11.2.0/db_1/rdbms/mesg/orazhs.msb
l-wx------ 1 oracle oinstall 64 Jan 15 11:20 2 -> /dev/null
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 20 -> /u01/app/oracle/product/11.2.0/db_1/rdbms/mesg/oraus.msb
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 256 -> /u01/app/oracle/oradata/ZWC/control01.ctl
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 257 -> /u01/app/oracle/fast_recovery_area/ZWC/control02.ctl
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 258 -> /u01/app/oracle/oradata/ZWC/system01.dbf
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 259 -> /u01/app/oracle/oradata/ZWC/sysaux01.dbf
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 260 -> /u01/app/oracle/oradata/ZWC/undotbs01.dbf
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 261 -> /u01/app/oracle/oradata/ZWC/users01.dbf (deleted)
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 262 -> /u01/app/oracle/oradata/ZWC/example01.dbf (deleted)
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 263 -> /u01/app/oracle/oradata/ZWC/temp01.dbf
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 3 -> /dev/null
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 4 -> /dev/null
lrwx------ 1 oracle oinstall 64 Jan 15 11:20 5 -> /u01/app/oracle/product/11.2.0/db_1/dbs/hc_ZWC.dat
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 6 -> /dev/null
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 7 -> /dev/null
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 8 -> /dev/null
lr-x------ 1 oracle oinstall 64 Jan 15 11:20 9 -> /dev/null

MySQLviewshavelimitations:1)Theydon'tsupportallSQLoperations,restrictingdatamanipulationthroughviewswithjoinsorsubqueries.2)Theycanimpactperformance,especiallywithcomplexqueriesorlargedatasets.3)Viewsdon'tstoredata,potentiallyleadingtooutdatedinforma

ProperusermanagementinMySQLiscrucialforenhancingsecurityandensuringefficientdatabaseoperation.1)UseCREATEUSERtoaddusers,specifyingconnectionsourcewith@'localhost'or@'%'.2)GrantspecificprivilegeswithGRANT,usingleastprivilegeprincipletominimizerisks.3)

MySQLdoesn'timposeahardlimitontriggers,butpracticalfactorsdeterminetheireffectiveuse:1)Serverconfigurationimpactstriggermanagement;2)Complextriggersincreasesystemload;3)Largertablesslowtriggerperformance;4)Highconcurrencycancausetriggercontention;5)M

Yes,it'ssafetostoreBLOBdatainMySQL,butconsiderthesefactors:1)StorageSpace:BLOBscanconsumesignificantspace,potentiallyincreasingcostsandslowingperformance.2)Performance:LargerrowsizesduetoBLOBsmayslowdownqueries.3)BackupandRecovery:Theseprocessescanbe

Adding MySQL users through the PHP web interface can use MySQLi extensions. The steps are as follows: 1. Connect to the MySQL database and use the MySQLi extension. 2. Create a user, use the CREATEUSER statement, and use the PASSWORD() function to encrypt the password. 3. Prevent SQL injection and use the mysqli_real_escape_string() function to process user input. 4. Assign permissions to new users and use the GRANT statement.

MySQL'sBLOBissuitableforstoringbinarydatawithinarelationaldatabase,whileNoSQLoptionslikeMongoDB,Redis,andCassandraofferflexible,scalablesolutionsforunstructureddata.BLOBissimplerbutcanslowdownperformancewithlargedata;NoSQLprovidesbetterscalabilityand

ToaddauserinMySQL,use:CREATEUSER'username'@'host'IDENTIFIEDBY'password';Here'showtodoitsecurely:1)Choosethehostcarefullytocontrolaccess.2)SetresourcelimitswithoptionslikeMAX_QUERIES_PER_HOUR.3)Usestrong,uniquepasswords.4)EnforceSSL/TLSconnectionswith

ToavoidcommonmistakeswithstringdatatypesinMySQL,understandstringtypenuances,choosetherighttype,andmanageencodingandcollationsettingseffectively.1)UseCHARforfixed-lengthstrings,VARCHARforvariable-length,andTEXT/BLOBforlargerdata.2)Setcorrectcharacters


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
