欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

同一主機(jī)下DuplicateDB實(shí)驗(yàn)(含GI)

說明性文字:
           oracle版本11g        操作系統(tǒng):oracle linux 5
      Main DB(target DB)  ----->連接------>   Duplicate DB

同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
----根據(jù)主庫創(chuàng)建Duplicate DB的目錄
----根據(jù)主庫的參數(shù)文件(pfile)創(chuàng)建Duplicate DB的參數(shù)文件(pfile),如果在上述路徑?jīng)]有找到的話在主庫創(chuàng)建pfile:create pfile from spfile;  然后再到$ORACLE_HOME/dbs路徑下ls就能看到了
----圖中的vim /etc/hosts是為了添加IP解析
[root@sink ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 sink localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.10.6 sink
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
-----刪除 sink.  的行,那是在sink實(shí)例下內(nèi)容,我們這里是在根據(jù)sink庫創(chuàng)建test庫,所以不能存在sink實(shí)例的參數(shù)信息
-----修改memory_target的大小,最好和原始值有一定的差距,因?yàn)槟鞘且粋€(gè)主機(jī)運(yùn)行的內(nèi)存,如果不修改就會(huì)報(bào)錯(cuò),提示無法打開test庫
-----如果有db_unique_name需要?jiǎng)h掉這一行,不刪的話就是一個(gè)庫,unique是別名的意思,相當(dāng)于創(chuàng)建輔助庫,在手工TSPITR  和 RMAN TSPITR的時(shí)候需要設(shè)置db_unique_name,這里新設(shè)一個(gè)庫,所以不需要
-----注意control_files的路徑,最好設(shè)在一個(gè)路徑下面好修改,當(dāng)然也可以多路復(fù)用,只不過比較麻煩而已,這部分內(nèi)容我還掌握的不好,不好班門弄斧,這里就設(shè)置同一路徑吧
-----  esc 到底行命令模式  :%s/sink/test/g  替換所有sink為test
----- 最后 加入 最下面2個(gè) 路徑轉(zhuǎn)換(數(shù)據(jù)文件,redo日志文件),最好去主庫看一下asm路徑,這是只是參考性的路徑,您的實(shí)際路徑肯定和我的不一樣
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
----配置了GI之后listener.ora監(jiān)聽就由GI接管了,所以在grid用戶網(wǎng)絡(luò)配置中配置監(jiān)聽
----在duplicate當(dāng)中test庫是必須是nomunt狀態(tài)的,所以如果要連接監(jiān)聽,就只能是靜態(tài)注冊(cè),所以在默認(rèn)監(jiān)聽上給test配置靜態(tài)注冊(cè)
----下面的tnsname.ora的信息是我截圖多出來了,不用理會(huì)
----ORACLE_HOME需要特別注意別寫錯(cuò)了,我當(dāng)時(shí)就寫錯(cuò)了,然后后面的lsnrctl status的時(shí)候看到的狀態(tài)老是BLOCKED,這里踩了一個(gè)大坑,最好在命令行下echo $ORACLE_HOME查看一下實(shí)際的路徑
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
----來到oralce用戶,listener.ora信息是截圖多出來的不必理會(huì)(圖片沒處理好,請(qǐng)大家見諒,我也只是小白,一知半解,堅(jiān)持寫博客只是為了激發(fā)熱情,分享感悟)
----到oracle網(wǎng)絡(luò)配置路徑下,配置tnsname.ora,sink(main DB)test(duplicate DB)
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
---默認(rèn)的是sink實(shí)例
----直接 !sql --->  打開 sink(main DB)
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
----export到test實(shí)例
----將test庫startup nomount
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
---到grid用戶下重新啟動(dòng)listener監(jiān)聽
---發(fā)現(xiàn)test連接上了,狀態(tài)信息顯示為UNKNOW表示test走的是剛才配置的靜態(tài)注冊(cè),如果為BLOCKED則表示你配置靜態(tài)注冊(cè)存在問題,test沒有走靜態(tài)注冊(cè)
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
-----開始  main DB (sink) -----連接----->  duplicate DB  (test)
-----提示:error 來自 目標(biāo)庫,target DB 是指 main DB (主庫 sink)所以下面重啟sink庫
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
-----重啟target DB
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
----重啟之后,正常進(jìn)入了RMAN環(huán)境
----duplicate 開始duplicate target DB 到(to) test 庫 
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
----這是duplicate命令的結(jié)束截圖,如圖database opened ....表示克隆完成
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
------重新來到克隆好的test庫,做一下簡(jiǎn)單查詢,查看test的信息
同一主機(jī)下Duplicate DB實(shí)驗(yàn)(含GI)
-----好了,感覺成功了

PS:歡迎轉(zhuǎn)載,如需轉(zhuǎn)載請(qǐng)標(biāo)明出處鏈接,謝啦

這是最后一步執(zhí)行克隆的輸出信息,留給下次研究,因?yàn)槲乙膊恢繢uplicate DB的過程中到底是什么樣的過程,這里暫且擱置,下次一定補(bǔ)好

Xshell for Xmanager Enterprise 5 (Build 0738)

創(chuàng)新互聯(lián)公司是一家集網(wǎng)站建設(shè),鎮(zhèn)賚企業(yè)網(wǎng)站建設(shè),鎮(zhèn)賚品牌網(wǎng)站建設(shè),網(wǎng)站定制,鎮(zhèn)賚網(wǎng)站建設(shè)報(bào)價(jià),網(wǎng)絡(luò)營銷,網(wǎng)絡(luò)優(yōu)化,鎮(zhèn)賚網(wǎng)站推廣為一體的創(chuàng)新建站企業(yè),幫助傳統(tǒng)企業(yè)提升企業(yè)形象加強(qiáng)企業(yè)競(jìng)爭(zhēng)力。可充分滿足這一群體相比中小企業(yè)更為豐富、高端、多元的互聯(lián)網(wǎng)需求。同時(shí)我們時(shí)刻保持專業(yè)、時(shí)尚、前沿,時(shí)刻以成就客戶成長(zhǎng)自我,堅(jiān)持不斷學(xué)習(xí)、思考、沉淀、凈化自己,讓我們?yōu)楦嗟钠髽I(yè)打造出實(shí)用型網(wǎng)站。

Copyright (c) 2002-2015 NetSarang Computer, Inc. All rights reserved.

Type `help' to learn how to use Xshell prompt.

[c:\~]$

Connecting to 192.168.10.6:22...

Connection established.

To escape to local shell, press 'Ctrl+Alt+]'.

Last login: Thu Jan  4 19:33:04 2018 from 192.168.10.1

[root@sink ~]# su - oracle

[oracle@sink ~]$ rman target sys/oracle@sink auxiliary sys/oracle@test

 

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Jan 4 19:33:54 2018

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  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-12514: TNS:listener does not currently know of service requested in connect descriptor

[oracle@sink ~]$ rman target sys/oracle@sink auxiliary sys/oracle@test

 

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Jan 4 19:34:33 2018

 

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

 

connected to target database: SINK (DBID=207714324)

connected to auxiliary database: TEST (not mounted)

 

RMAN> duplicate target database to "test" from active database nofilenamecheck;

 

Starting Duplicate Db at 04-JAN-18

using target database control file instead of recovery catalog

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=20 device type=DISK

 

contents of Memory Script:

{

   sql clone "create spfile from memory";

}

executing Memory Script

 

sql statement: create spfile from memory

 

contents of Memory Script:

{

   shutdown clone immediate;

   startup clone nomount;

}

executing Memory Script

 

Oracle instance shut down

 

connected to auxiliary database (not started)

Oracle instance started

 

Total System Global Area     538640384 bytes

 

Fixed Size                     2254992 bytes

Variable Size                415238000 bytes

Database Buffers             117440512 bytes

Redo Buffers                   3706880 bytes

 

contents of Memory Script:

{

   sql clone "alter system set  db_name =

 ''SINK'' comment=

 ''Modified by RMAN duplicate'' scope=spfile";

   sql clone "alter system set  db_unique_name =

 ''TEST'' comment=

 ''Modified by RMAN duplicate'' scope=spfile";

   shutdown clone immediate;

   startup clone force nomount

   backup as copy current controlfile auxiliary format  '/u01/app/oracle/oradata/test/control01.ctl';

   restore clone controlfile to  '/u01/app/oracle/oradata/test/control02.ctl' from

 '/u01/app/oracle/oradata/test/control01.ctl';

   alter clone database mount;

}

executing Memory Script

 

sql statement: alter system set  db_name =  ''SINK'' comment= ''Modified by RMAN duplicate'' scope=spfile

 

sql statement: alter system set  db_unique_name =  ''TEST'' comment= ''Modified by RMAN duplicate'' scope=spfile

 

Oracle instance shut down

 

Oracle instance started

 

Total System Global Area     538640384 bytes

 

Fixed Size                     2254992 bytes

Variable Size                415238000 bytes

Database Buffers             117440512 bytes

Redo Buffers                   3706880 bytes

 

Starting backup at 04-JAN-18

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=40 device type=DISK

channel ORA_DISK_1: starting datafile copy

copying current control file

output file name=/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_sink.f tag=TAG20180104T193452 RECID=2 STAMP=964553692

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01

Finished backup at 04-JAN-18

 

Starting restore at 04-JAN-18

allocated channel: ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: SID=18 device type=DISK

 

channel ORA_AUX_DISK_1: copied control file copy

Finished restore at 04-JAN-18

 

database mounted

 

contents of Memory Script:

{

   set newname for datafile  1 to

 "/u01/app/oracle/oradata/test/system01.dbf";

   set newname for datafile  2 to

 "/u01/app/oracle/oradata/test/sysaux01.dbf";

   set newname for datafile  3 to

 "/u01/app/oracle/oradata/test/undotbs01.dbf";

   set newname for datafile  4 to

 "/u01/app/oracle/oradata/test/users01.dbf";

   set newname for datafile  5 to

 "/u01/app/oracle/oradata/test/example01.dbf";

   set newname for datafile  6 to

 "/u01/app/oracle/oradata/test/tbssss.256.963504823";

   backup as copy reuse

   datafile  1 auxiliary format

 "/u01/app/oracle/oradata/test/system01.dbf"   datafile

 2 auxiliary format

 "/u01/app/oracle/oradata/test/sysaux01.dbf"   datafile

 3 auxiliary format

 "/u01/app/oracle/oradata/test/undotbs01.dbf"   datafile

 4 auxiliary format

 "/u01/app/oracle/oradata/test/users01.dbf"   datafile

 5 auxiliary format

 "/u01/app/oracle/oradata/test/example01.dbf"   datafile

 6 auxiliary format

 "/u01/app/oracle/oradata/test/tbssss.256.963504823"   ;

   sql 'alter system archive log current';

}

executing Memory Script

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

executing command: SET NEWNAME

 

Starting backup at 04-JAN-18

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile copy

input datafile file number=00001 name=/u01/app/oracle/oradata/sink/system01.dbf

output file name=/u01/app/oracle/oradata/test/system01.dbf tag=TAG20180104T193459

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25

channel ORA_DISK_1: starting datafile copy

input datafile file number=00002 name=/u01/app/oracle/oradata/sink/sysaux01.dbf

output file name=/u01/app/oracle/oradata/test/sysaux01.dbf tag=TAG20180104T193459

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15

channel ORA_DISK_1: starting datafile copy

input datafile file number=00005 name=/u01/app/oracle/oradata/sink/example01.dbf

output file name=/u01/app/oracle/oradata/test/example01.dbf tag=TAG20180104T193459

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07

channel ORA_DISK_1: starting datafile copy

input datafile file number=00006 name=+DATA/sink/datafile/tbssss.256.963504823

output file name=/u01/app/oracle/oradata/test/tbssss.256.963504823 tag=TAG20180104T193459

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03

channel ORA_DISK_1: starting datafile copy

input datafile file number=00003 name=/u01/app/oracle/oradata/sink/undotbs01.dbf

output file name=/u01/app/oracle/oradata/test/undotbs01.dbf tag=TAG20180104T193459

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:03

channel ORA_DISK_1: starting datafile copy

input datafile file number=00004 name=/u01/app/oracle/oradata/sink/users01.dbf

output file name=/u01/app/oracle/oradata/test/users01.dbf tag=TAG20180104T193459

channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01

Finished backup at 04-JAN-18

 

sql statement: alter system archive log current

 

contents of Memory Script:

{

   backup as copy reuse

   archivelog like  "/dsk1/arch_sink/1_12_963448790.dbf" auxiliary format

 "/dsk1/arch_test/1_12_963448790.dbf"   ;

   catalog clone archivelog  "/dsk1/arch_test/1_12_963448790.dbf";

   switch clone datafile all;

}

executing Memory Script

 

Starting backup at 04-JAN-18

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log copy

input archived log thread=1 sequence=12 RECID=8 STAMP=964553753

output file name=/dsk1/arch_test/1_12_963448790.dbf RECID=0 STAMP=0

channel ORA_DISK_1: archived log copy complete, elapsed time: 00:00:01

Finished backup at 04-JAN-18

 

cataloged archived log

archived log file name=/dsk1/arch_test/1_12_963448790.dbf RECID=8 STAMP=964553755

 

datafile 1 switched to datafile copy

input datafile copy RECID=2 STAMP=964553755 file name=/u01/app/oracle/oradata/test/system01.dbf

datafile 2 switched to datafile copy

input datafile copy RECID=3 STAMP=964553755 file name=/u01/app/oracle/oradata/test/sysaux01.dbf

datafile 3 switched to datafile copy

input datafile copy RECID=4 STAMP=964553755 file name=/u01/app/oracle/oradata/test/undotbs01.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=5 STAMP=964553755 file name=/u01/app/oracle/oradata/test/users01.dbf

datafile 5 switched to datafile copy

input datafile copy RECID=6 STAMP=964553755 file name=/u01/app/oracle/oradata/test/example01.dbf

datafile 6 switched to datafile copy

input datafile copy RECID=7 STAMP=964553755 file name=/u01/app/oracle/oradata/test/tbssss.256.963504823

 

contents of Memory Script:

{

   set until scn  1158304;

   recover

   clone database

    delete archivelog

   ;

}

executing Memory Script

 

executing command: SET until clause

 

Starting recover at 04-JAN-18

using channel ORA_AUX_DISK_1

 

starting media recovery

 

archived log for thread 1 with sequence 12 is already on disk as file /dsk1/arch_test/1_12_963448790.dbf

archived log file name=/dsk1/arch_test/1_12_963448790.dbf thread=1 sequence=12

media recovery complete, elapsed time: 00:00:00

Finished recover at 04-JAN-18

Oracle instance started

 

Total System Global Area     538640384 bytes

 

Fixed Size                     2254992 bytes

Variable Size                415238000 bytes

Database Buffers             117440512 bytes

Redo Buffers                   3706880 bytes

 

contents of Memory Script:

{

   sql clone "alter system set  db_name =

 ''TEST'' comment=

 ''Reset to original value by RMAN'' scope=spfile";

   sql clone "alter system reset  db_unique_name scope=spfile";

   shutdown clone immediate;

   startup clone nomount;

}

executing Memory Script

 

sql statement: alter system set  db_name =  ''TEST'' comment= ''Reset to original value by RMAN'' scope=spfile

 

sql statement: alter system reset  db_unique_name scope=spfile

 

Oracle instance shut down

 

connected to auxiliary database (not started)

Oracle instance started

 

Total System Global Area     538640384 bytes

 

Fixed Size                     2254992 bytes

Variable Size                415238000 bytes

Database Buffers             117440512 bytes

Redo Buffers                   3706880 bytes

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TEST" RESETLOGS ARCHIVELOG

  MAXLOGFILES     16

  MAXLOGMEMBERS      3

  MAXDATAFILES      200

  MAXINSTANCES     8

  MAXLOGHISTORY      292

 LOGFILE

  GROUP   1 ( '/u01/app/oracle/oradata/test/redo01.log' ) SIZE 50 M  REUSE,

  GROUP   2 ( '/u01/app/oracle/oradata/test/redo02.log' ) SIZE 50 M  REUSE,

  GROUP   3 ( '/u01/app/oracle/oradata/test/redo03.log' ) SIZE 50 M  REUSE

 DATAFILE

  '/u01/app/oracle/oradata/test/system01.dbf'

 CHARACTER SET ZHS16GBK

 

 

contents of Memory Script:

{

   set newname for tempfile  1 to

 "/u01/app/oracle/oradata/test/temp01.dbf";

   switch clone tempfile all;

   catalog clone datafilecopy  "/u01/app/oracle/oradata/test/sysaux01.dbf",

 "/u01/app/oracle/oradata/test/undotbs01.dbf",

 "/u01/app/oracle/oradata/test/users01.dbf",

 "/u01/app/oracle/oradata/test/example01.dbf",

 "/u01/app/oracle/oradata/test/tbssss.256.963504823";

   switch clone datafile all;

}

executing Memory Script

 

executing command: SET NEWNAME

 

renamed tempfile 1 to /u01/app/oracle/oradata/test/temp01.dbf in control file

 

cataloged datafile copy

datafile copy file name=/u01/app/oracle/oradata/test/sysaux01.dbf RECID=1 STAMP=964553762

cataloged datafile copy

datafile copy file name=/u01/app/oracle/oradata/test/undotbs01.dbf RECID=2 STAMP=964553762

cataloged datafile copy

datafile copy file name=/u01/app/oracle/oradata/test/users01.dbf RECID=3 STAMP=964553762

cataloged datafile copy

datafile copy file name=/u01/app/oracle/oradata/test/example01.dbf RECID=4 STAMP=964553762

cataloged datafile copy

datafile copy file name=/u01/app/oracle/oradata/test/tbssss.256.963504823 RECID=5 STAMP=964553762

 

datafile 2 switched to datafile copy

input datafile copy RECID=1 STAMP=964553762 file name=/u01/app/oracle/oradata/test/sysaux01.dbf

datafile 3 switched to datafile copy

input datafile copy RECID=2 STAMP=964553762 file name=/u01/app/oracle/oradata/test/undotbs01.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=3 STAMP=964553762 file name=/u01/app/oracle/oradata/test/users01.dbf

datafile 5 switched to datafile copy

input datafile copy RECID=4 STAMP=964553762 file name=/u01/app/oracle/oradata/test/example01.dbf

datafile 6 switched to datafile copy

input datafile copy RECID=5 STAMP=964553762 file name=/u01/app/oracle/oradata/test/tbssss.256.963504823

 

contents of Memory Script:

{

   Alter clone database open resetlogs;

}

executing Memory Script

 

database opened

Finished Duplicate Db at 04-JAN-18

 

RMAN> 

當(dāng)前文章:同一主機(jī)下DuplicateDB實(shí)驗(yàn)(含GI)
瀏覽路徑:http://chinadenli.net/article28/jhjicp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供外貿(mào)網(wǎng)站建設(shè)服務(wù)器托管品牌網(wǎng)站制作商城網(wǎng)站品牌網(wǎng)站設(shè)計(jì)網(wǎng)站導(dǎo)航

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)