How to Rename or Move Oracle Tablespace Datafile to Another Location Kā pārdēvēt vai pārvietot Oracle Tablespace datni uz citu vietu
Oracle database does not provide an easy user interface to rename a datafile of tablespace, nor database administrator can easily move or relocate the datafile to another location or directory that different from original location on creation of database. Oracle datu bāze nenodrošina viegli lietotāja saskarni, lai pārdēvētu datni ar tablespace, kā arī datu bāzes administrators var viegli pārvietot vai pārvietot datni uz citu vietu vai direktoriju, kas atšķiras no sākotnējās atrašanās vietu radīšana datu bāzē. The rename or move place task has to be performed via Oracle SQLPlus command line interface. Pārdēvēt vai pārvietot vietu uzdevums ir jāveic, izmantojot Oracle SQLPlus komandrindas interfeisu. However, if the operation is performed when the tablespace which owns the datefile is online, error will occur. Tomēr, ja darbība tiek veikta, kad tablespace, kuram pieder datefile ir tiešsaistē, kļūdas nebūs.
The error message may include the following: Kļūdas ziņojums var būt šādi:
ORA-01511: error in renaming log/data files ORA-01511: error in pārdēvēšanu log / datu faili
ORA-01121: cannot rename database file <string> – file is in use or recovery ORA-01121: nevar pārdēvēt datubāzes failu <string> - fails tiek lietots vai atgūšana
ORA-01110: data file <string>: 'datafile.dbf' ORA-01.110: datu fails <string>: 'datafile.dbf "
To properly move the datafile around or rename the datafile, follow this guide: Pareizi pārvietot datni ap vai pārdēvētu datni, ievērojiet šīs vadlīnijas:
- Login to SQLPlus. Login to SQLPlus.
- Connect as SYS DBA with CONNECT / AS SYSDBA command. Connect kā SYS DBA ar CONNECT / AS SYSDBA komandu.
- Shutdown the database instance with SHUTDOWN command. Shutdown datubāzē piemēram, ar shutdown komandu.
- Rename or/and move the datafiles at operating system level. Pārdēvēt vai / un pārvietoties datafiles ar operētājsistēmu līmenī.
- Start Oracle database in mount state with STARTUP MOUNT command. Start Oracle datu bāzē mount stāvoklī, Startup MOUNT komandu.
- Modify the name or location of datafiles in Oracle data dictionary using following command syntax: Mainīt nosaukumu vai atrašanās vietu datafiles no Oracle datu vārdnīcu, izmantojot šādu komandu sintaksi:
ALTER DATABASE RENAME FILE '<fully qualified path to original data file name>' TO '<new or original fully qualified path to new or original data file name>'; ALTER DATABASE pārdēvēt failu "<fully kvalificētu ceļu uz sākotnējo datu faila nosaukums> 'TO' <new vai oriģinālu jāiekopē jauniem vai oriģināliem, datu faila nosaukums> ';
- Open Oracle database instance completely with ALTER DATABASE OPEN command. Open Oracle datu bāzi, piemēram, pilnīgi ar ALTER DATABASE OPEN komandu.
If the datafiles that need to be changed or moved do not belong to SYSTEM tablespaces, and do not contain active rollback segments or temporary segments, there is another workaround that does not require database instance to be shutdown. Ja datafiles, ko nepieciešams mainīt vai pārvietot nepieder SYSTEM tablespaces, un nesatur aktīvo Rollback segments vai pagaidu segmentiem, ir vēl cits risinājums, kas neprasa datubāzē mirklī izslēgšanu. Instead, only the particular tablespace that contains the date files is taken offline. Tā vietā, tikai īpaši tablespace, kurā datumā failus ir bezsaistē.
- Login to SQLPlus. Login to SQLPlus.
- Connect as SYS DBA with CONNECT / AS SYSDBA command. Connect kā SYS DBA ar CONNECT / AS SYSDBA komandu.
- Make offline the affected tablespace with ALTER TABLESPACE <tablespace name> OFFLINE; command. Padarīt offline skarto tablespace ar ALTER TABLESPACE <tablespace nosaukums> OFFLINE; komandu.
- Modify the name or location of datafiles in Oracle data dictionary using following command syntax: Mainīt nosaukumu vai atrašanās vietu datafiles no Oracle datu vārdnīcu, izmantojot šādu komandu sintaksi:
ALTER TABLESPACE <tablespace name> RENAME DATAFILE '<fully qualified path to original data file name>' TO '<new or original fully qualified path to new or original data file name>'; ALTER TABLESPACE <tablespace nosaukums> RENAME datni '<fully kvalificētu ceļu uz sākotnējo datu faila nosaukums>' TO '<new vai oriģinālu jāiekopē jauniem vai oriģināliem, datu faila nosaukums>';
- Bring the tablespace online again with ALTER TABLESPACE alter tablespace <tablespace name> ONLINE; command. Bring tablespace online atkal ar ALTER TABLESPACE mainīt tablespace <tablespace nosaukums> online; komandu.
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: lapa mašīna iztulkot un pasniegts tàds, "kàds tas ir" bez garantijas. Machine translation may be difficult to understand. Mašīntulkošanas var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile Kā Drop Tablespace un atgūt Oracle Database Kad Nejauši Dzēst datni
- How to Remove and Drop Datafiles from Tablespace in Oracle Database Kā noņemt un Drop Datafiles no Tablespace in Oracle Database
- Oracle ORA-01658 Unable to Create INITIAL Extent for Segment in Tablespace Error Oracle ORA-01.658 Nevar izveidot INITIAL Apjoms, kādā segmentā Tablespace Kļūda
- ORA-25153 Temporary Tablespace is Empty Error in Oracle ORA-25.153 Pagaidu Tablespace ir tukšs Kļūda Oracle
- How to Move WordPress Blog to New Domain or Location Kā pārvietot WordPress Blog uz jaunu domēnu vai atrašanās vietas
- Fix Vista Unable to Rename or Move Files and Folders Issues After Applying KB938979 Patch Fix Vista Nevar pārdēvēt vai pārvietot failus un mapes jautājumi pēc pieteikšanās KB938979 Patch
- Change Oracle Database User Password Maina Oracle Database Lietotājs Parole
- Oracle Database Link Oracle Database Link
- Download Bulk Rename Utility To Rename Files Easily Download Bulk Rename Utility Lai pārdēvētu failus Ērti
- Oracle Database Import Error 3113/3114 Oracle Database Import Error 3113/3114









































