oracle 表空間數(shù)據(jù)文件遷移_第1頁
oracle 表空間數(shù)據(jù)文件遷移_第2頁
oracle 表空間數(shù)據(jù)文件遷移_第3頁
oracle 表空間數(shù)據(jù)文件遷移_第4頁
oracle 表空間數(shù)據(jù)文件遷移_第5頁
已閱讀5頁,還剩15頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

本文格式為Word版,下載可任意編輯——oracle表空間數(shù)據(jù)文件遷移startupmount;

ORACLEinstancestarted.

TotalSystemGlobalArea1845493760bytesFixedSize1220000bytesVariableSize167772768bytesDatabaseBuffers1660944384bytesRedoBuffers15556608bytesDatabasemounted.

SQL>hostcp'/opt/oracle/oradata/student/mcl1.dbf''/home/oracle/mcl1.dbf'

SQL>alterdatabase

2renamefile'/opt/oracle/oradata/student/mcl1.dbf'3to'/home/oracle/mcl1.dbf';

Databasealtered.

SQL>alterdatabaseopen;

Databasealtered.

SQL>selectfile_name,tablespace_name,online_statusfromdba_data_filestablespace_name='MCL';

FILE_NAMETABLESPACE_NAMEONLINE_

/home/oracMCLONLINE

where

le/mcl.dbf

/home/oracMCLONLINEle/mcl1.dbf

SQL>alterdatabase

2renamefile'/home/oracle/mcl1.dbf'3to'/opt/oracle/oradata/student/mcl1.dbf';alterdatabase*

ERRORatline1:

ORA-01511:errorinrenaminglog/datafiles

ORA-01121:cannotrenamedatabasefile9-fileisinuseorrecoveryORA-01110:datafile9:'/home/oracle/mcl1.dbf'

SQL>alterdatabaseclose;alterdatabaseclose*

ERRORatline1:

ORA-01093:ALTERDATABASECLOSEonlypermittedwithnosessionsconnected

SQL>ALTERDATABASENOMOUNT;ALTERDATABASENOMOUNT*ERRORatline1:

ORA-02231:missingorinvalidoptiontoALTERDATABASE

SQL>STARTUPNOMOUNT;

ORA-01081:cannotstartalready-runningORACLE-shutitdownfirstSQL>alterdatabasedismount;alterdatabasedismount*

ERRORatline1:

ORA-01106:databasemustbeclosedbeforedismounting

SQL>shutdownimmediate;Databaseclosed.

Databasedismounted.

ORACLEinstanceshutdown.SQL>startupmount;

ORACLEinstancestarted.

TotalSystemGlobalArea1845493760bytesFixedSize1220000bytesVariableSize167772768bytesDatabaseBuffers1660944384bytesRedoBuffers15556608bytesDatabasemounted.SQL>alterdatabase

2renamefile'/home/oracle/mcl1.dbf'3to'/opt/oracle/oradata/student/mcl1.dbf';

Databasealtered.

SQL>selectfile_name,tablespace_name,online_statusfromdba_data_filestablespace_name='MCL';selectfile_name,tablespace_name,online_statusfromdba_data_filestablespace_name='MCL'

*ERRORatline1:

ORA-01219:databasenotopen:queriesallowedonfixedtables/viewsonly

SQL>alterdatabaseopen2;

alterdatabaseopen*

ERRORatline1:

ORA-01113:file9needsmediarecovery

ORA-01110:datafile9:'/opt/oracle/oradata/student/mcl1.dbf'

SQL>recoverdatabase;Mediarecoverycomplete.SQL>alterdatabaeopen2;

alterdatabaeopen*

ERRORatline1:

ORA-00940:invalidALTERcommand

wherewhere

SQL>alterdatabaseopen;

Databasealtered.

SQL>selectfile_name,tablespace_name,online_statsufromdba_data_fileswheretablespacename='MCL';selectfile_name,tablespace_name,online_statsufromdba_data_fileswheretablespacename='MCL'

*ERRORatline1:

ORA-00904:\

SQL>selectfile_name,tablespace_name,online_statsufromdba_data_filestablespace_name='MCL';selectfile_name,tablespace_name,online_statsufromdba_data_filestablespace_name='MCL'

*ERRORatline1:

ORA-00904:\

SQL>selectfile_name,tablespace_name,online_statusfromdba_data_filestablespace_name='MCL';

FILE_NAMETABLESPACE_NAMEONLINE_

/home/oracMCLONLINEle/mcl.dbf

/opt/oraclMCLONLINEe/oradata/student/mcl1.dbf

SQL>selectfile_name,tablespace_name,online_status,bytesfromdba_data_filestablespace_name='MCL';

FILE_NAMETABLESPACE_NAMEONLINE_BYTES

/home/oracMCLONLINE104857600le/mcl.dbf

wherewherewherewhere/opt/oraclMCLONLINE52428800e/oradata/student/mcl1.dbf

SQL>descdba_data_files;

NameNull?Type

FILE_NAMEVARCHAR2(513)FILE_IDNUMBER

TABLESPACE_NAMEVARCHAR2(30)BYTESNUMBERBLOCKSNUMBERSTATUSVARCHAR2(9)RELATIVE_FNONUMBER

AUTOEXTENSIBLEVARCHAR2(3)MAXBYTESNUMBERMAXBLOCKSNUMBERINCREMENT_BYNUMBERUSER_BYTESNUMBERUSER_BLOCKSNUMBERONLINE_STATUSVARCHAR2(7)

SQL>selectfile_name,tablespace_name,online_status,bytes,user_bytesfromdba_data_fileswheretablespace_name='MCL';

FILE_NAMETABLESPACE_NAMEONLINE_BYTESUSER_BYTES

/home/oracMCLONLINE104857600104792064le/mcl.dbf

/opt/oraclMCLONLINE5242880052363264e/oradata/student/mcl1.dbf

SQL>descuser_tables;

NameNull?Type

TABLE_NAMENOTNULLVARCHAR2(30)TABLESPACE_NAMEVARCHAR2(30)CLUSTER_NAMEVARCHAR2(30)

IOT_NAMEVARCHAR2(30)STATUSVARCHAR2(8)PCT_FREENUMBERPCT_USEDNUMBERINI_TRANSNUMBERMAX_TRANSNUMBERINITIAL_EXTENTNUMBERNEXT_EXTENTNUMBERMIN_EXTENTSNUMBERMAX_EXTENTSPCT_INCREASEFREELISTSFREELIST_GROUPSLOGGINGBACKED_UPNUM_ROWSBLOCKSEMPTY_BLOCKSAVG_SPACECHAIN_CNTAVG_ROW_LENAVG_SPACE_FREELIST_BLOCKSNUM_FREELIST_BLOCKSDEGREEINSTANCESCACHETABLE_LOCKSAMPLE_SIZELAST_ANALYZEDPARTITIONEDIOT_TYPETEMPORARYSECONDARYNESTEDBUFFER_POOLROW_MOVEMENTGLOBAL_STATSUSER_STATSDURATIONSKIP_CORRUPTMONITORINGCLUSTER_OWNERDEPENDENCIESCOMPRESSIONNUMBERNUMBERNUMBERNUMBERVARCHAR2(3)VARCHAR2(1)NUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERVARCHAR2(10)VARCHAR2(10)VARCHAR2(5)VARCHAR2(8)NUMBERDATE

VARCHAR2(3)VARCHAR2(12)VARCHAR2(1)VARCHAR2(1)VARCHAR2(3)VARCHAR2(7)VARCHAR2(8)VARCHAR2(3)VARCHAR2(3)VARCHAR2(15)VARCHAR2(8)VARCHAR2(3)VARCHAR2(30)VARCHAR2(8)VARCHAR2(8)DROPPEDVARCHAR2(3)

SQL>descdba_data_files;

NameNull?Type

FILE_NAMEVARCHAR2(513)FILE_IDNUMBER

TABLESPACE_NAMEVARCHAR2(30)BYTESNUMBERBLOCKSNUMBERSTATUSVARCHAR2(9)RELATIVE_FNONUMBER

AUTOEXTENSIBLEVARCHAR2(3)MAXBYTESNUMBERMAXBLOCKSNUMBERINCREMENT_BYNUMBERUSER_BYTESNUMBERUSER_BLOCKSNUMBERONLINE_STATUSVARCHAR2(7)

SQL>selectfile_id,file_name,tablespace_namefromdba_data_filestablespace_name='MCL';

FILE_IDFILE_NAMETABLESPACE_NAME7/home/oracMCLle/mcl.dbf

9/opt/oraclMCLe/oradata/student/mcl1.dbf

SQL>descdba_tables;

NameNull?Type

OWNERNOTNULLVARCHAR2(30)TABLE_NAMENOTNULLVARCHAR2(30)TABLESPACE_NAMEVARCHAR2(30)CLUSTER_NAMEVARCHAR2(30)IOT_NAMEVARCHAR2(30)STATUSVARCHAR2(8)PCT_FREENUMBER

where

PCT_USEDNUMBERINI_TRANSNUMBERMAX_TRANSNUMBERINITIAL_EXTENTNUMBERNEXT_EXTENTNUMBERMIN_EXTENTSNUMBERMAX_EXTENTSNUMBERPCT_INCREASENUMBERFREELISTSNUMBERFREELIST_GROUPSLOGGINGBACKED_UPNUM_ROWSBLOCKSEMPTY_BLOCKSAVG_SPACECHAIN_CNTAVG_ROW_LENAVG_SPACE_FREELIST_BLOCKSNUM_FREELIST_BLOCKSDEGREEINSTANCESCACHETABLE_LOCKSAMPLE_SIZELAST_ANALYZEDPARTITIONEDIOT_TYPETEMPORARYSECONDARYNESTEDBUFFER_POOLROW_MOVEMENTGLOBAL_STATSUSER_STATSDURATIONSKIP_CORRUPTMONITORINGCLUSTER_OWNERDEPENDENCIESCOMPRESSIONDROPPED

SQL>descuser_tables;

NUMBERVARCHAR2(3)VARCHAR2(1)NUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERVARCHAR2(10)VARCHAR2(10)VARCHAR2(5)VARCHAR2(8)NUMBERDATE

VARCHAR2(3)VARCHAR2(12)VARCHAR2(1)VARCHAR2(1)VARCHAR2(3)VARCHAR2(7)VARCHAR2(8)VARCHAR2(3)VARCHAR2(3)VARCHAR2(15)VARCHAR2(8)VARCHAR2(3)VARCHAR2(30)VARCHAR2(8)VARCHAR2(8)VARCHAR2(3)NameNull?Type

TABLE_NAMENOTNULLVARCHAR2(30)TABLESPACE_NAMEVARCHAR2(30)CLUSTER_NAMEVARCHAR2(30)IOT_NAMEVARCHAR2(30)STATUSVARCHAR2(8)PCT_FREENUMBERPCT_USEDNUMBERINI_TRANSMAX_TRANSINITIAL_EXTENTNEXT_EXTENTMIN_EXTENTSMAX_EXTENTSPCT_INCREASEFREELISTSFREELIST_GROUPSLOGGINGBACKED_UPNUM_ROWSBLOCKSEMPTY_BLOCKSAVG_SPACECHAIN_CNTAVG_ROW_LENAVG_SPACE_FREELIST_BLOCKSNUM_FREELIST_BLOCKSDEGREEINSTANCESCACHETABLE_LOCKSAMPLE_SIZELAST_ANALYZEDPARTITIONEDIOT_TYPETEMPORARYSECONDARYNESTEDBUFFER_POOLROW_MOVEMENTGLOBAL_STATSUSER_STATSDURATIONNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERVARCHAR2(3)VARCHAR2(1)NUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERNUMBERVARCHAR2(10)VARCHAR2(10)VARCHAR2(5)VARCHAR2(8)NUMBERDATE

VARCHAR2(3)VARCHAR2(12)VARCHAR2(1)VARCHAR2(1)VARCHAR2(3)VARCHAR2(7)VARCHAR2(8)VARCHAR2(3)VARCHAR2(3)VARCHAR2(15)SKIP_CORRUPTVARCHAR2(8)MONITORINGVARCHAR2(3)CLUSTER_OWNERVARCHAR2(30)DEPENDENCIESVARCHAR2(8)COMPRESSIONVARCHAR2(8)DROPPEDVARCHAR2(3)

SQL>descall_tables;

NameNull?Type

OWNERNOTNULLVARCHAR2(30)TABLE_NAMENOTNULLVARCHAR2(30)TABLESPACE_NAMEVARCHAR2(30)CLUSTER_NAMEVARCHAR2(30)IOT_NAMEVARCHAR2(30)STATUSVARCHAR2(8)PCT_FREENUMBERPCT_USEDNUMBERINI_TRANSNUMBERMAX_TRANSNUMBERINITIAL_EXTENTNUMBERNEXT_EXTENTNUMBERMIN_EXTENTSNUMBERMAX_EXTENTSNUMBERPCT_INCREASENUMBERFREELISTSNUMBERFREELIST_GROUPSNUMBERLOGGINGVARCHAR2(3)BACKED_UPVARCHAR2(1)NUM_ROWSNUMBERBLOCKSNUMBEREMPTY_BLOCKSNUMBERAVG_SPACENUMBERCHAIN_CNTNUMBERAVG_ROW_LENNUMBERAVG_SPACE_FREELIST_BLOCKSNUMBERNUM_FREELIST_BLOCKSNUMBERDEGREEVARCHAR2(10)INSTANCESVARCHAR2(10)CACHEVARCHAR2(5)TABLE_LOCKVARCHAR2(8)SAMPLE_SIZENUMBERLAST_ANALYZEDDATE

PARTITIONEDVARCHAR2(3)

IOT_TYPEVARCHAR2(12)TEMPORARYVARCHAR2(1)SECONDARYVARCHAR2(1)NESTEDVARCHAR2(3)BUFFER_POOLVARCHAR2(7)ROW_MOVEMENTVARCHAR2(8)GLOBAL_STATSVARCHAR2(3)USER_STATSVARCHAR2(3)DURATIONVARCHAR2(15)SKIP_CORRUPTMONITORINGCLUSTER_OWNERDEPENDENCIESCOMPRESSIONDROPPED

SQL>selectfile_id,file_name,tablespace_nametablespace_name='MCL';

FILE_IDFILE_NAMETABLESPACE_NAME7/home/oracMCLle/mcl.dbf

9/opt/oraclMCLe/oradata/student/mcl1.dbf

SQL>altertablespacemcloffline;

Tablespacealtered.

SQL>altertablespacemcl

2renamedatafile'/opt/oracle/oradata/student/mcl1.dbf'3to'/home/oracle/mcl1.dbf';

Tablespacealtered.

SQL>altertablespacemclonline;altertablespacemclonline*

ERRORatline1:

VARCHAR2(8)VARCHAR2(3)VARCHAR2(30)VARCHAR2(8)VARCHAR2(8)VARCHAR2(3)fromdba_data_fileswhere

ORA-01113:file9needsmediarecovery

ORA-01110:datafile9:'/home/oracle/mcl1.dbf'

SQL>recoverydatabase;

SP2-0734:unknowncommandbeginning\...\SQL>recoverdatabase;

ORA-00283:recoverysessioncanceledduetoerrors

ORA-01124:cannotrecoverdatafile1-fileisinuseorrecoveryORA-01110:datafile1:'/opt/oracle/oradata/student/system01.dbf'

SQL>recovertablespace;

ORA-00931:missingidentifier

SQL>recoverfile;

ORA-00905:missingkeyword

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論