目标数据库:jadl0g 复制的结果数据库:d10g 注意:****目标库与clone结果库在同一台机子上**** 1.vi /u01/oracle/10g/network/admin/tnsnames.ora D10G =(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.db.com)(PORT = 1521))(CONNECT_DATA =(SE
目标数据库:jadl0g
复制的结果数据库:d10g
注意:****目标库与clone结果库在同一台机子上****
1.vi /u01/oracle/10g/network/admin/tnsnames.ora
D10G = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oracle.db.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = d10g) ) (failover = on) )
2.vi /u01/oracle/10g/network/admin/listener.ora
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME=jadl10g) (SID_NAME = jadl10g) (ORACLE_HOME = /u01/oracle/10g) ) (SID_DESC = (GLOBAL_DBNAME=d10g) (SID_NAME = d10g) (ORACLE_HOME = /u01/oracle/10g) ) )
3.重启监听
lsnrctl stop lsnrctl start tnsping d10g tnsping jadl10g
4.创建密码文件和参数文件
[oracle@oracle ~]$ cd /u01/oracle/10g/dbs/ [oracle@oracle dbs]$ orapwd file=orapwd10g password=oracle [oracle@oracle dbs]$ strings spfilejadl10g.ora > initd10g.ora [oracle@oracle dbs]$ vi initd10g.ora :1,$ s/jadl10g/d10g/g---执行该命令 [oracle@oracle dbs]$ grep u01 initd10g.ora *.audit_file_dest='/u01/oracle/admin/d10g/adump' *.background_dump_dest='/u01/oracle/admin/d10g/bdump' *.control_files='/u01/oracle/oradata/d10g/control01.ctl','/u01/oracle/flash_recovery_area/d10g/control02.ctl'#Restore Controlfile *.core_dump_dest='/u01/oracle/admin/d10g/cdump' *.db_recovery_file_dest='/u01/oracle/flash_recovery_area' *.user_dump_dest='/u01/oracle/admin/d10g/udump' 5.创建相应的文件 [oracle@oracle dbs]$ mkdir /u01/oracle/admin/d10g/adump -p [oracle@oracle dbs]$ mkdir /u01/oracle/admin/d10g/bdump -p [oracle@oracle dbs]$ mkdir /u01/oracle/admin/d10g/cdump -p [oracle@oracle dbs]$ mkdir /u01/oracle/admin/d10g/udump -p [oracle@oracle dbs]$ mkdir /u01/oracle/oradata/d10g [oracle@oracle dbs]$ export ORACLE_SID=d10g [oracle@oracle dbs]$ rman target / Recovery Manager: Release 10.2.0.5.0 - Production on Fri Nov 7 12:59:20 2014 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database (not started) RMAN> startup nomount Oracle instance started Total System Global Area 599785472 bytes Fixed Size 2098112 bytes Variable Size 171969600 bytes Database Buffers 419430400 bytes Redo Buffers 6287360 bytes RMAN> exit Recovery Manager complete. [oracle@oracle dbs]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Fri Nov 7 13:00:15 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine and Real Application Testing options SQL> create spfile from pfile; File created. SQL> shutdown ORA-01507: database not mounted ORACLE instance shut down. SQL> startup nomount ORACLE instance started. Total System Global Area 599785472 bytes Fixed Size 2098112 bytes Variable Size 171969600 bytes Database Buffers 419430400 bytes Redo Buffers 6287360 bytes SQL> exit Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine and Real Application Testing options **************************** [oracle@oracle dbs]$ rman target sys/oracle@jadl10g auxiliary sys/oracle@d10g Recovery Manager: Release 10.2.0.5.0 - Production on Fri Nov 7 13:26:11 2014 Copyright (c) 1982, 2007, Oracle. All rights reserved. RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00554: initialization of internal recovery manager package failed RMAN-04005: error from target database: ORA-01031: insufficient privileges
这个错误是由于我的目标数据库没有密码文件造成的。
解决方法就是创建密码文件
[oracle@oracle dbs]$ orapwd file=orapwjadl10g password=oracle **************************** [oracle@oracle dbs]$ rman target sys/oracle@jadl10g auxiliary sys/oracle@d10g Recovery Manager: Release 10.2.0.5.0 - Production on Fri Nov 7 13:34:12 2014 Copyright (c) 1982, 2007, Oracle. All rights reserved. connected to target database: JADL10G (DBID=2011530396) connected to auxiliary database: D10G (not mounted) 执行如下命令(注意必须是远程和本地的顺序): RMAN> duplicate target database to "D10G" nofilenamecheck 2> db_file_name_convert('/u01/oracle/oradata/jadl10g/','/u01/oracle/oradata/d10g/') 3> logfile '/u01/oracle/oradata/d10g/redo01.log' size 10m, 4> '/u01/oracle/oradata/d10g/redo02.log' size 10m; Starting Duplicate Db at 07-NOV-14 using target database control file instead of recovery catalog allocated channel: ORA_AUX_DISK_1 channel ORA_AUX_DISK_1: sid=156 devtype=DISK contents of Memory Script: { set until scn 556591; set newname for datafile 1 to "/u01/oracle/oradata/d10g/system01.dbf"; set newname for datafile 2 to "/u01/oracle/oradata/d10g/undotbs01.dbf"; set newname for datafile 3 to "/u01/oracle/oradata/d10g/sysaux01.dbf"; set newname for datafile 4 to "/u01/oracle/oradata/d10g/users01.dbf"; set newname for datafile 5 to "/u01/oracle/oradata/d10g/example01.dbf"; restore check readonly clone database ; } executing Memory Script executing command: SET until clause executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME executing command: SET NEWNAME Starting restore at 07-NOV-14 using channel ORA_AUX_DISK_1 skipping datafile 1; alrea【本文来自鸿网互联 (http://www.68idc.cn)】dy restored to file /u01/oracle/oradata/d10g/system01.dbf skipping datafile 2; already restored to file /u01/oracle/oradata/d10g/undotbs01.dbf skipping datafile 3; already restored to file /u01/oracle/oradata/d10g/sysaux01.dbf skipping datafile 4; already restored to file /u01/oracle/oradata/d10g/users01.dbf skipping datafile 5; already restored to file /u01/oracle/oradata/d10g/example01.dbf restore not done; all files readonly, offline, or already restored Finished restore at 07-NOV-14 sql statement: CREATE CONTROLFILE REUSE SET DATABASE "D10G" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 '/u01/oracle/oradata/d10g/redo01.log' SIZE 10 M , GROUP 2 '/u01/oracle/oradata/d10g/redo02.log' SIZE 10 M DATAFILE '/u01/oracle/oradata/d10g/system01.dbf' CHARACTER SET AL32UTF8 contents of Memory Script: { switch clone datafile all; } executing Memory Script datafile 2 switched to datafile copy input datafile copy recid=1 stamp=863013896 filename=/u01/oracle/oradata/d10g/undotbs01.dbf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=863013896 filename=/u01/oracle/oradata/d10g/sysaux01.dbf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=863013896 filename=/u01/oracle/oradata/d10g/users01.dbf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=863013896 filename=/u01/oracle/oradata/d10g/example01.dbf contents of Memory Script: { set until scn 556591; recover clone database delete archivelog ; } executing Memory Script executing command: SET until clause Starting recover at 07-NOV-14 using channel ORA_AUX_DISK_1 starting media recovery archive log thread 1 sequence 1 is already on disk as file /u01/oracle/flash_recovery_area/JADL10G/archivelog/2014_11_07/o1_mf_1_1_b5qkpgh1_.arc archive log thread 1 sequence 2 is already on disk as file /u01/oracle/flash_recovery_area/JADL10G/archivelog/2014_11_07/o1_mf_1_2_b5qkpk0o_.arc archive log thread 1 sequence 1 is already on disk as file /u01/oracle/flash_recovery_area/JADL10G/archivelog/2014_11_07/o1_mf_1_1_b5rqvjwq_.arc archive log thread 1 sequence 2 is already on disk as file /u01/oracle/flash_recovery_area/JADL10G/archivelog/2014_11_07/o1_mf_1_2_b5rqvmxf_.arc archive log filename=/u01/oracle/flash_recovery_area/JADL10G/archivelog/2014_11_07/o1_mf_1_1_b5qkpgh1_.arc thread=1 sequence=1 archive log filename=/u01/oracle/flash_recovery_area/JADL10G/archivelog/2014_11_07/o1_mf_1_2_b5qkpk0o_.arc thread=1 sequence=2 media recovery complete, elapsed time: 00:00:23 Finished recover at 07-NOV-14 contents of Memory Script: { shutdown clone; startup clone nomount ; } executing Memory Script database dismounted Oracle instance shut down connected to auxiliary database (not started) Oracle instance started Total System Global Area 599785472 bytes Fixed Size 2098112 bytes Variable Size 171969600 bytes Database Buffers 419430400 bytes Redo Buffers 6287360 bytes sql statement: CREATE CONTROLFILE REUSE SET DATABASE "D10G" RESETLOGS ARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 '/u01/oracle/oradata/d10g/redo01.log' SIZE 10 M , GROUP 2 '/u01/oracle/oradata/d10g/redo02.log' SIZE 10 M DATAFILE '/u01/oracle/oradata/d10g/system01.dbf' CHARACTER SET AL32UTF8 contents of Memory Script: { set newname for tempfile 1 to "/u01/oracle/oradata/d10g/temp01.dbf"; switch clone tempfile all; catalog clone datafilecopy "/u01/oracle/oradata/d10g/undotbs01.dbf"; catalog clone datafilecopy "/u01/oracle/oradata/d10g/sysaux01.dbf"; catalog clone datafilecopy "/u01/oracle/oradata/d10g/users01.dbf"; catalog clone datafilecopy "/u01/oracle/oradata/d10g/example01.dbf"; switch clone datafile all; } executing Memory Script executing command: SET NEWNAME renamed temporary file 1 to /u01/oracle/oradata/d10g/temp01.dbf in control file cataloged datafile copy datafile copy filename=/u01/oracle/oradata/d10g/undotbs01.dbf recid=1 stamp=863013929 cataloged datafile copy datafile copy filename=/u01/oracle/oradata/d10g/sysaux01.dbf recid=2 stamp=863013929 cataloged datafile copy datafile copy filename=/u01/oracle/oradata/d10g/users01.dbf recid=3 stamp=863013929 cataloged datafile copy datafile copy filename=/u01/oracle/oradata/d10g/example01.dbf recid=4 stamp=863013929 datafile 2 switched to datafile copy input datafile copy recid=1 stamp=863013929 filename=/u01/oracle/oradata/d10g/undotbs01.dbf datafile 3 switched to datafile copy input datafile copy recid=2 stamp=863013929 filename=/u01/oracle/oradata/d10g/sysaux01.dbf datafile 4 switched to datafile copy input datafile copy recid=3 stamp=863013929 filename=/u01/oracle/oradata/d10g/users01.dbf datafile 5 switched to datafile copy input datafile copy recid=4 stamp=863013929 filename=/u01/oracle/oradata/d10g/example01.dbf contents of Memory Script: { Alter clone database open resetlogs; } executing Memory Script database opened Finished Duplicate Db at 07-NOV-14 RMAN> exit Recovery Manager complete. 验证是否clone成功: [oracle@oracle dbs]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Fri Nov 7 14:21:20 2014 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine and Real Application Testing options SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- d10g
1.密码文件问题
2.网络问题
3.参数问题
4.rman语句 db_file_name_convert 在同一个服务器设置语法有问题
5.注意必须要有备份,远程的话需要copy备份到目标库

MySQL은 초보자가 데이터베이스 기술을 배우는 데 적합합니다. 1. MySQL 서버 및 클라이언트 도구를 설치하십시오. 2. SELECT와 같은 기본 SQL 쿼리를 이해하십시오. 3. 마스터 데이터 작업 : 데이터를 만들고, 삽입, 업데이트 및 삭제합니다. 4. 고급 기술 배우기 : 하위 쿼리 및 창 함수. 5. 디버깅 및 최적화 : 구문 확인, 인덱스 사용, 선택*을 피하고 제한을 사용하십시오.

MySQL은 테이블 구조 및 SQL 쿼리를 통해 구조화 된 데이터를 효율적으로 관리하고 외래 키를 통해 테이블 간 관계를 구현합니다. 1. 테이블을 만들 때 데이터 형식을 정의하고 입력하십시오. 2. 외래 키를 사용하여 테이블 간의 관계를 설정하십시오. 3. 인덱싱 및 쿼리 최적화를 통해 성능을 향상시킵니다. 4. 데이터 보안 및 성능 최적화를 보장하기 위해 데이터베이스를 정기적으로 백업 및 모니터링합니다.

MySQL은 웹 개발에 널리 사용되는 오픈 소스 관계형 데이터베이스 관리 시스템입니다. 주요 기능에는 다음이 포함됩니다. 1. 다른 시나리오에 적합한 InnoDB 및 MyISAM과 같은 여러 스토리지 엔진을 지원합니다. 2.로드 밸런싱 및 데이터 백업을 용이하게하기 위해 마스터 슬레이브 복제 기능을 제공합니다. 3. 쿼리 최적화 및 색인 사용을 통해 쿼리 효율성을 향상시킵니다.

SQL은 MySQL 데이터베이스와 상호 작용하여 데이터 첨가, 삭제, 수정, 검사 및 데이터베이스 설계를 실현하는 데 사용됩니다. 1) SQL은 Select, Insert, Update, Delete 문을 통해 데이터 작업을 수행합니다. 2) 데이터베이스 설계 및 관리에 대한 생성, 변경, 삭제 문을 사용하십시오. 3) 복잡한 쿼리 및 데이터 분석은 SQL을 통해 구현되어 비즈니스 의사 결정 효율성을 향상시킵니다.

MySQL의 기본 작업에는 데이터베이스, 테이블 작성 및 SQL을 사용하여 데이터에서 CRUD 작업을 수행하는 것이 포함됩니다. 1. 데이터베이스 생성 : createAbasemy_first_db; 2. 테이블 만들기 : CreateTableBooks (idintauto_incrementprimarykey, titlevarchar (100) notnull, authorvarchar (100) notnull, published_yearint); 3. 데이터 삽입 : InsertIntobooks (Title, Author, Published_year) VA

웹 응용 프로그램에서 MySQL의 주요 역할은 데이터를 저장하고 관리하는 것입니다. 1. MySQL은 사용자 정보, 제품 카탈로그, 트랜잭션 레코드 및 기타 데이터를 효율적으로 처리합니다. 2. SQL 쿼리를 통해 개발자는 데이터베이스에서 정보를 추출하여 동적 컨텐츠를 생성 할 수 있습니다. 3.mysql은 클라이언트-서버 모델을 기반으로 작동하여 허용 가능한 쿼리 속도를 보장합니다.

MySQL 데이터베이스를 구축하는 단계에는 다음이 포함됩니다. 1. 데이터베이스 및 테이블 작성, 2. 데이터 삽입 및 3. 쿼리를 수행하십시오. 먼저 CreateAbase 및 CreateTable 문을 사용하여 데이터베이스 및 테이블을 작성한 다음 InsertInto 문을 사용하여 데이터를 삽입 한 다음 최종적으로 SELECT 문을 사용하여 데이터를 쿼리하십시오.

MySQL은 사용하기 쉽고 강력하기 때문에 초보자에게 적합합니다. 1.MySQL은 관계형 데이터베이스이며 CRUD 작업에 SQL을 사용합니다. 2. 설치가 간단하고 루트 사용자 비밀번호를 구성해야합니다. 3. 삽입, 업데이트, 삭제 및 선택하여 데이터 작업을 수행하십시오. 4. Orderby, Where and Join은 복잡한 쿼리에 사용될 수 있습니다. 5. 디버깅은 구문을 확인하고 쿼리를 분석하기 위해 설명을 사용해야합니다. 6. 최적화 제안에는 인덱스 사용, 올바른 데이터 유형 선택 및 우수한 프로그래밍 습관이 포함됩니다.


핫 AI 도구

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

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

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

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

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

WebStorm Mac 버전
유용한 JavaScript 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

DVWA
DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

Dreamweaver Mac版
시각적 웹 개발 도구
