Oracle 之 Duplicate 複製資料庫

Michael_DD發表於2014-11-13
Oracle 之 Duplicate 複製資料庫


環境:nocatalog模式

原例項:testdb1
輔助例項:testdb3
===============================================================================
先配一個testdb3的環境變數
[root@testdb1 ~]:testdb3> cd /home/oracle/
[root@testdb1 oracle]:testdb3> ll
total 40
drwxr-xr-x. 2 oracle oinstall 4096 Jul 10 06:55 Desktop
drwxr-xr-x. 2 oracle oinstall 4096 Jul 10 06:55 Documents
drwxr-xr-x. 2 oracle oinstall 4096 Jul 10 06:55 Downloads
drwxr-xr-x. 2 oracle oinstall 4096 Jul 10 06:55 Music
drwxr-xr-x. 2 oracle oinstall 4096 Jul 10 06:55 Pictures
-rw-r--r--. 1 oracle oinstall  772 Oct 22 13:33 prof_testdb1
-rw-r--r--. 1 oracle oinstall  772 Nov 13 11:24 prof_testdb3
drwxr-xr-x. 2 oracle oinstall 4096 Jul 10 06:55 Public
-rw-r--r--. 1 oracle oinstall    0 Oct 29 16:30 pwd
drwxr-xr-x. 2 oracle oinstall 4096 Jul 10 06:55 Templates
drwxr-xr-x. 2 oracle oinstall 4096 Jul 10 06:55 Videos
[root@testdb1 oracle]:testdb3> cat prof_testdb3
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs


export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/ora11g
export GRID_BASE=/app/grid
export GRID_HOME=$GRID_BASE/grid11g
export ORACLE_SID=testdb3
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:$GRID_HOME/bin:/usr/sbin:/usr/local/bin:$ORACLE_HOME/OPatch
export EDITOR=vi
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
export OGG_HOME=/app/goldengate
export LD_LIBRARY_PATH=$OGG_HOME:$LD_LIBRARY_PATH
export PATH=$OGG_HOME:$PATH
export PS1="[\u@\h \W]:$ORACLE_SID> "
umask 022
[root@testdb3 oracle]:testdb3>

===============================================================================

1. 建立輔助例項金鑰檔案orapwtestdb3
[oracle@testdb3 ~]:testdb1> orapwd
Usage: orapwd file= entries= force= ignorecase= nosysdba=

  where
    file - name of password file (required),
    password - password for SYS will be prompted if not specified at command line,
    entries - maximum number of distinct DBA (optional),
    force - whether to overwrite existing file (optional),
    ignorecase - passwords are case-insensitive (optional),
    nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
    
  There must be no spaces around the equal-to (=) character.
[oracle@testdb3 ~]:testdb1> orapwd file=/app/oracle/ora11g/dbs/orapwtestdb3 password="123456" entries=30;
#檢視是否建立成功
[oracle@testdb3 ~]:testdb1> cd /app/oracle/ora11g/dbs/
[oracle@testdb3 dbs]:testdb1> ll
total 10368
-rw-r-----. 1 oracle oinstall    20480 Nov 11 14:16 dr1testdb1.dat
-rw-r-----. 1 oracle oinstall    20480 Nov 11 14:35 dr2testdb1.dat
-rw-rw----. 1 oracle oinstall     1544 Nov 11 14:34 hc_testdb1.dat
-rw-r--r--. 1 oracle oinstall     2851 May 15  2009 init.ora
-rw-r--r--. 1 oracle oinstall     1438 Oct 24 10:34 inittestdb1.ora
-rw-r-----. 1 oracle oinstall       24 Oct 22 13:42 lkTESTDB1
-rw-r-----. 1 oracle oinstall     1536 Oct 22 14:38 orapwtestdb
-rw-r-----. 1 oracle oinstall     1536 Oct 22 13:42 orapwtestdb1
-rw-r-----. 1 oracle oinstall     5120 Nov 12 17:00 orapwtestdb3
-rw-r-----. 1 oracle oinstall 10534912 Nov 11 14:00 snapcf_testdb1.f
-rw-r-----. 1 oracle oinstall     4608 Nov 12 14:41 spfiletestdb1.ora
[oracle@testdb3 dbs]:testdb1>


orapwd引數:
file : 指定金鑰檔名和路徑
password:指定sys使用者密碼
entries:指定擁有sysdba許可權的使用者最大數
force:如果檔案存在,是否覆蓋

file和password是必填引數。



2.  windows環境需要建立Oracleservice,Linux等不需要
>oradim -new -sid testdb3



3.  配置初始化引數檔案testdb3init.ora
#建立目錄
[root@testdb3 admin]# su - oracle
[oracle@testdb3 oracle]$ cd /app/oracle/admin/
[oracle@testdb3 admin]$ ll
total 4
drwxr-x---. 6 oracle oinstall 4096 Oct 22 13:42 testdb1
[oracle@testdb3 admin]$ mkdir testdb3
[oracle@testdb3 admin]$ cd testdb3
[oracle@testdb3 testdb3]$ mkdir adump bdump cdump pfile udump
[oracle@testdb3 testdb3]$ ll
total 20
drwxr-xr-x. 2 oracle oinstall 4096 Nov 13 09:30 adump
drwxr-xr-x. 2 oracle oinstall 4096 Nov 13 09:30 bdump
drwxr-xr-x. 2 oracle oinstall 4096 Nov 13 09:30 cdump
drwxr-xr-x. 2 oracle oinstall 4096 Nov 13 09:30 pfile
drwxr-xr-x. 2 oracle oinstall 4096 Nov 13 09:30 udump
[oracle@testdb3 admin]$ chown -R oracle:oinstall testdb3/

[oracle@testdb3 testdb3]$ mkdir /app/oracle/oradata/testdb3/

#在/app/oracle/admin/testdb3/pfile目錄下建立pfile檔案

[oracle@testdb3 pfile]$ pwd
/app/oracle/admin/testdb3/pfile
[oracle@testdb3 pfile]$ vi init.ora
DB_NAME='testdb3'
#原庫有多少個控制檔案,就搞多少個
CONTROL_FILES='/app/oracle/oradata/testdb3/control01.ctl','/app/oracle/oradata/testdb3/control02.ctl'
SHARED_POOL_SIZE=200000000
DB_BLOCK_SIZE=8192
DB_FILE_NAME_CONVERT=('/app/oracle/oradata/testdb1/','/app/oracle/oradata//testdb3/')
LOG_FILE_NAME_CONVERT=('/app/oracle/oradata/testdb1/','/app/oracle/oradata/testdb3/')
AUDIT_FILE_DEST='/app/oracle/admin/testdb3/adump/'
BACKGROUND_DUMP_DEST='/app/oracle/admin/testdb3/bdump/'
COMPATIBLE='11.2.0.4.0'
CORE_DUMP_DEST='/app/oracle/admin/testdb3/cdump/'
USER_DUMP_DEST='/app/oracle/admin/testdb3/udump/'
~
~

~
"init.ora" [New] 11L, 613C written                                                                                   
[oracle@testdb3 pfile]$ ll
total 4
-rw-r--r--. 1 oracle oinstall 613 Nov 13 09:40 init.ora
[oracle@testdb3 pfile]$

#在plus中輸入:
SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE    11.2.0.4.0      Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production

SQL> create spfile from pfile='/app/oracle/admin/testdb3/pfile/init.ora';
create spfile from pfile='/app/oracle/admin/testdb3/pfile/init.ora'
*
ERROR at line 1:
ORA-32002: cannot create SPFILE already being used by the instance


SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> create spfile from pfile='/app/oracle/admin/testdb3/pfile/init.ora';

File created.

SQL>

4.  啟動輔助例項到nomount上
SQL> startup nomount
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area  263090176 bytes
Fixed Size                  2252256 bytes
Variable Size             205521440 bytes
Database Buffers           50331648 bytes
Redo Buffers                4984832 bytes
SQL>

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
不影響資料庫的使用

例項暫無控制檔案,不能啟動到mount或open狀態,更不能自動建立控制檔案

5.  配置監聽和網路服務 (特別注意,一點不能錯,不然後面rman時會報各種RMAN-04006: ORA-01034:)

[oracle@testdb3 admin]:testdb1> cat listener.ora
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.9.235)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = testdb1)
      (ORACLE_HOME = /app/oracle/ora11g)
      (SID_NAME = testdb1)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = testdb3)
      (ORACLE_HOME = /app/oracle/ora11g)
      (SID_NAME = testdb3)
    )
  )


[oracle@testdb3 admin]:testdb1> cat tnsnames.ora
testdb1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.9.235)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = testdb1)
    )
  )

testdb2 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.9.236)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = testdb2)
    )
  )
testdb3 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.9.235)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = testdb3)
    )
  )
[oracle@testdb3 admin]:testdb1>

#測試是否配置完成
[oracle@testdb1 dbs]:testdb3> tnsping testdb1
[oracle@testdb1 dbs]:testdb3> tnsping testdb3
[oracle@testdb1 admin]:testdb3> rman target sys/123456@testdb3
都返回正確資訊,則ok!


6.  檢視原testdb1是有完整的備份(沒有可以直接backup database)

備份資料庫和控制檔案
run{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate channel c3 type disk;
allocate channel c4 type disk;
backup current controlfile;
backup database format '/backup/testdb1/testdb1_full_%U';
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}


7. rman連線目錄庫和輔助例項
[oracle@testdb1 admin]:testdb3> rman target sys/123456@testdb1 auxiliary sys/123456@testdb3

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Nov 13 13:04:32 2014

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

connected to target database: TESTDB1 (DBID=613746331)
connected to auxiliary database: TESTDB3 (not mounted)

RMAN>


8. 執行命令
[oracle@testdb1 admin]:testdb3> rman target sys/123456@testdb1 auxiliary sys/123456@testdb3

catalog start with  '/backup/testdb1/';

run {
allocate auxiliary channel c1 type disk;
allocate auxiliary channel c2 type disk;
allocate auxiliary channel c3 type disk;
allocate auxiliary channel c4 type disk;
duplicate target database to testdb3;
release channel c1;
release channel c2;
release channel c3;
release channel c4;
}


詳細分析duplicate過程:
[oracle@testdb1 rman]:testdb3> rman target sys/123456@testdb1 auxiliary sys/123456@testdb3

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Nov 13 15:59:56 2014

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

connected to target database: TESTDB1 (DBID=613746331)
connected to auxiliary database: TESTDB3 (not mounted)

RMAN> duplicate target database to testdb3;

#開始
Starting Duplicate Db at 2014-11-13 16:00:06
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 "alter system set  db_name =
 ''TESTDB1'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''TESTDB3'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile;
   alter clone database mount;
}
executing Memory Script

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

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

Oracle instance shut down

Oracle instance started

Total System Global Area     263090176 bytes

Fixed Size                     2252256 bytes
Variable Size                205521440 bytes
Database Buffers              50331648 bytes
Redo Buffers                   4984832 bytes

Starting restore at 2014-11-13 16:00:23
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=18 device type=DISK

#輸出控制檔案

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /app/oracle/fast_recovery_area/TESTDB1/backupset/2014_11_13/o1_mf_ncnnf_TAG20141113T155613_b68s0yo4_.bkp
channel ORA_AUX_DISK_1: piece handle=/app/oracle/fast_recovery_area/TESTDB1/backupset/2014_11_13/o1_mf_ncnnf_TAG20141113T155613_b68s0yo4_.bkp tag=TAG20141113T155613
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/app/oracle/oradata/testdb3/control01.ctl
output file name=/app/oracle/oradata/testdb3/control02.ctl
Finished restore at 2014-11-13 16:00:27

database mounted

contents of Memory Script:
{
   set until scn  2786457;
   set newname for datafile  1 to
 "/app/oracle/oradata//testdb3/system01.dbf";
   set newname for datafile  2 to
 "/app/oracle/oradata//testdb3/sysaux01.dbf";
   set newname for datafile  3 to
 "/app/oracle/oradata//testdb3/undotbs01.dbf";
   set newname for datafile  4 to
 "/app/oracle/oradata//testdb3/users01.dbf";
   set newname for datafile  5 to
 "/app/oracle/oradata//testdb3/mytmp01.dbf";
   restore
   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 2014-11-13 16:00:33
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /app/oracle/oradata//testdb3/system01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00002 to /app/oracle/oradata//testdb3/sysaux01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /app/oracle/oradata//testdb3/undotbs01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /app/oracle/oradata//testdb3/users01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00005 to /app/oracle/oradata//testdb3/mytmp01.dbf
channel ORA_AUX_DISK_1: reading from backup piece /backup/testdb1/testdb1_full_28pnh0qr_1_1
channel ORA_AUX_DISK_1: piece handle=/backup/testdb1/testdb1_full_28pnh0qr_1_1 tag=TAG20141113T150602
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 2014-11-13 16:01:19

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=863539279 file name=/app/oracle/oradata/testdb3/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=7 STAMP=863539279 file name=/app/oracle/oradata/testdb3/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=8 STAMP=863539279 file name=/app/oracle/oradata/testdb3/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=9 STAMP=863539280 file name=/app/oracle/oradata/testdb3/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=10 STAMP=863539280 file name=/app/oracle/oradata/testdb3/mytmp01.dbf

contents of Memory Script:
{
   set until scn  2786457;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 2014-11-13 16:01:20
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 11 is already on disk as file /arch/testdb1/1_11_863361259.dbf
archived log for thread 1 with sequence 1 is already on disk as file /arch/testdb1/1_1_863537718.dbf
archived log for thread 1 with sequence 2 is already on disk as file /arch/testdb1/1_2_863537718.dbf
archived log file name=/arch/testdb1/1_11_863361259.dbf thread=1 sequence=11
archived log file name=/arch/testdb1/1_1_863537718.dbf thread=1 sequence=1
archived log file name=/arch/testdb1/1_2_863537718.dbf thread=1 sequence=2
media recovery complete, elapsed time: 00:00:01
Finished recover at 2014-11-13 16:01:24
Oracle instance started

Total System Global Area     263090176 bytes

Fixed Size                     2252256 bytes
Variable Size                205521440 bytes
Database Buffers              50331648 bytes
Redo Buffers                   4984832 bytes

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''TESTDB3'' 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 =  ''TESTDB3'' 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     263090176 bytes

Fixed Size                     2252256 bytes
Variable Size                205521440 bytes
Database Buffers              50331648 bytes
Redo Buffers                   4984832 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "TESTDB3" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES      100
  MAXINSTANCES     8
  MAXLOGHISTORY      292
 LOGFILE
  GROUP   1 ( '/app/oracle/oradata/testdb3/redo01.log' ) SIZE 50 M  REUSE,
  GROUP   2 ( '/app/oracle/oradata/testdb3/redo02.log' ) SIZE 50 M  REUSE,
  GROUP   3 ( '/app/oracle/oradata/testdb3/redo03.log' ) SIZE 50 M  REUSE
 DATAFILE
  '/app/oracle/oradata/testdb3/system01.dbf'
 CHARACTER SET ZHS16GBK


contents of Memory Script:
{
   set newname for tempfile  1 to
 "/app/oracle/oradata//testdb3/temp01.dbf";
   switch clone tempfile all;
   catalog clone datafilecopy  "/app/oracle/oradata/testdb3/sysaux01.dbf",
 "/app/oracle/oradata/testdb3/undotbs01.dbf",
 "/app/oracle/oradata/testdb3/users01.dbf",
 "/app/oracle/oradata/testdb3/mytmp01.dbf";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

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

cataloged datafile copy
datafile copy file name=/app/oracle/oradata/testdb3/sysaux01.dbf RECID=1 STAMP=863539303
cataloged datafile copy
datafile copy file name=/app/oracle/oradata/testdb3/undotbs01.dbf RECID=2 STAMP=863539303
cataloged datafile copy
datafile copy file name=/app/oracle/oradata/testdb3/users01.dbf RECID=3 STAMP=863539303
cataloged datafile copy
datafile copy file name=/app/oracle/oradata/testdb3/mytmp01.dbf RECID=4 STAMP=863539303

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=863539303 file name=/app/oracle/oradata/testdb3/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=863539303 file name=/app/oracle/oradata/testdb3/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=863539303 file name=/app/oracle/oradata/testdb3/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=863539303 file name=/app/oracle/oradata/testdb3/mytmp01.dbf
Reenabling controlfile options for auxiliary database
Executing: alter database force logging

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 2014-11-13 16:01:54

RMAN>

===========================================================
9. 驗證
[oracle@testdb1 pfile]:testdb3> sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 13 16:08:16 2014

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select status from v$instance;

STATUS
------------
OPEN

SQL> select name from v$database;

NAME
---------
TESTDB3

SQL>

檔案齊全:
[oracle@testdb1 testdb3]:testdb1> pwd
/app/oracle/oradata/testdb3
[oracle@testdb1 testdb3]:testdb1> ll
total 1787164
-rw-r-----. 1 oracle oinstall  10076160 Nov 13 16:09 control01.ctl
-rw-r-----. 1 oracle oinstall  10076160 Nov 13 16:09 control02.ctl
-rw-r-----. 1 oracle oinstall  20979712 Nov 13 16:01 mytmp01.dbf
-rw-r-----. 1 oracle oinstall  52429312 Nov 13 16:07 redo01.log
-rw-r-----. 1 oracle oinstall  52429312 Nov 13 16:01 redo02.log
-rw-r-----. 1 oracle oinstall  52429312 Nov 13 16:01 redo03.log
-rw-r-----. 1 oracle oinstall 629153792 Nov 13 16:07 sysaux01.dbf
-rw-r-----. 1 oracle oinstall 734011392 Nov 13 16:07 system01.dbf
-rw-r-----. 1 oracle oinstall  55582720 Nov 13 16:01 temp01.dbf
-rw-r-----. 1 oracle oinstall 262152192 Nov 13 16:07 undotbs01.dbf
-rw-r-----. 1 oracle oinstall   5251072 Nov 13 16:01 users01.dbf



[oracle@testdb1 testdb3]:testdb1> pwd
/app/oracle/admin/testdb3/
[oracle@testdb1 testdb3]:testdb1> ll
total 72
drwxr-xr-x. 2 oracle oinstall 49152 Nov 13 16:08 adump
drwxr-xr-x. 2 oracle oinstall  4096 Nov 13 14:36 bdump
drwxr-xr-x. 2 oracle oinstall  4096 Nov 13 09:30 cdump
-rw-r--r--. 1 oracle oinstall  2854 Nov 13 13:22 init.ora
drwxr-xr-x. 2 oracle oinstall  4096 Nov 13 15:59 pfile
drwxr-xr-x. 2 oracle oinstall  4096 Nov 13 09:30 udump

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1331402/,如需轉載,請註明出處,否則將追究法律責任。

相關文章