Oracle 传输表空间迁移数据总结注意:迁移表空间之前必需先建立相对应的用户,要不然会迁移不成功的。有时,我们需要把比较大的数
Oracle 传输表空间迁移数据总结
注意:迁移表空间之前必需先建立相对应的用户,要不然会迁移不成功的。
有时,,我们需要把比较大的数据进行跨平台(10G支持跨平台)的迁移,使用EXP/IMP等方法很慢,可以通过传输表空间快速安全的实现。此操作需要在SYSDBA的权限下进行,具体步骤如下:
1.检查所要迁移的表空间是否自包含(就是检测是否符合传输表空间的基本条件)
exec sys.dbms_tts.transport_set_check('tablespace_name',true);
select * from sys.transport_set_violations;
如果无记录返回,则说明符合传输表空间的条件,如果有记录返回则不符合。
2.设置所要传输的表空间为只读
alter tablespace tablespace_name read only;
3.使用exp工具导出所要传输表空间的元数据(metadata)
exp userid=\'sys/lclsys2008 as sysdba\' file=/opt/test.dmp log=/opt/test.log transport_tablespace=y tablespaces=tablespace_name
注意:这里使用SYSDBA时需要转义字符,在LINUX下用\',WINDOWS下使用单引号就可以
4.使用RMAN转换所要传输的表空间的数据文件头为目标系统文件
登陆RMAN: rman target /
rman>convert tablespace "TABLESPACE_NAME" to platform 'Linux IA (32-bit)' format 'D:\xxx.dbf'
注意:TABLESPACE_NAME为传输表空间的名称,需要使用双引号且大写,Linux IA (32-bit)为目标平台的名称,可以在目标平台数据库中通过select platform_name form v$database来查询。
5.复制表空间转换后的数据文件及导出文件到目标平台
6.使用IMP工具加载数据库文件到目标平台
imp userid=\'sys/ad as sysdba\' file=expdat.dmp transport_tablespace=y datafiles=('D:\xx.dbf') tablespaces=tablespace_name
注意:在使用IMP和EXP时尽量使用相同的版本,以避免操作失败。
补充一点,在piner的书提到,就是seq,function,proc,view等元数据并没有迁移过来,需要再执行一次迁移。
就是执行一次exp ... rows=n
再imp导入才行。

todropaViewInmysql, "dropviewifexistsview_name;"및 TomodifyAview를 사용하고 "createOrreplaceViewView_NameAsselect ...". "

mysqlViewScaneFeficTicallyINGILIDESIGNPATTORNSLIKEADAPTER, DECIARATOR, FACTORY 및 OBSERVER.1) AdapterPatternAdAptSDataFromDifferentTablesinToAunifiedView.2) Decor

viewsinmysqlarebeneficialforsimplifyingcomplexqueries, envancingsecurity, dataconsistency, andoptimizing promperformance

toeteimpleviewinmysql, usethecreateviewstatement.1) definetheviewwithReateViewview_nameas.2) specifyTesLectStatementToreTrievesiredData.3) usetheViewLikeAtableForqueries.ViewsSimplifyDataAccessAndenHances, ButconSiderFormance

toCreateUserSinmysql, usethecreateuserstatement.1) foralocaluser : createUser'LocalUser '@'localHost'IndifiedBy'SecurePassword '; 2) foremoteUser : createUser'RemoteUser'@'%'reidentifiedBy'StrongPassword ';

mysqlviewshavelimitations : 1) 그들은 upportallsqloperations, datamanipulation throughviewswithjoinsorbqueries를 제한하지 않습니다

적절한 usermanagementInmysqliscrucialforenhancingsecurityandensuringfefficientDatabaseOperation.1) USECREATEUSERTOWDDUSERS,@'localHost'or@'%'.

mysqldoes notimposeahardlimitontriggers, butpracticalfactorsdeteirefectiveuse : 1) ServerConfigurationimpactStriggerManagement; 2) 복잡한 트리거 스케일 스케일 사이드로드; 3) argertableSlowtriggerTriggerPerformance; 4) High ConconcercencyCancaUspriggerContention; 5) m


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

Video Face Swap
완전히 무료인 AI 얼굴 교환 도구를 사용하여 모든 비디오의 얼굴을 쉽게 바꾸세요!

인기 기사

뜨거운 도구

스튜디오 13.0.1 보내기
강력한 PHP 통합 개발 환경

SublimeText3 중국어 버전
중국어 버전, 사용하기 매우 쉽습니다.

드림위버 CS6
시각적 웹 개발 도구

VSCode Windows 64비트 다운로드
Microsoft에서 출시한 강력한 무료 IDE 편집기

ZendStudio 13.5.1 맥
강력한 PHP 통합 개발 환경