Data Migration of ArcSDE10.2.1forOracle12c

Source: Internet
Author: User
For the ArcSDEforOracle database, there are many data migration methods: Logical migration, cold backup, hot backup, and RMAN, and of course the CopyPaste method of ArcGIS, the new version of Oracle12c also introduces the concepts of PDB and CDB. If you are interested, you can view the official help of Oracle12c. Today we will introduce O

For the ArcSDE for Oracle database, data migration involves many methods: Logical migration, cold backup, hot backup, and RMAN, and of course the Copy/Paste method of ArcGIS itself, the new version of Oracle12c also introduces the concepts of PDB and CDB. If you are interested, you can view the official help of Oracle12c. Today we will introduce O

For the ArcSDE for Oracle database, data migration involves many methods: Logical migration, cold backup, hot backup, and RMAN, and of course the Copy/Paste method of ArcGIS itself, the new version of Oracle12c also introduces the concepts of PDB and CDB. If you are interested, you can view the official help of Oracle12c.


Today we will introduce how to migrate the PDB in Beijing CDB to another CDB using the new features of Oracle12c. The concept of PDB is generally considered to be a plug-in database, just as if you used a USB flash drive on someone else's computer and are pulling it out from someone else's computer, insert it into your computer. This is equivalent to data migration.


Test environment:

Source environment:

Redhat 5.5, Oracle12.1.0.1 (CDB: orcl, PDB: pdborcl), ArcSDE10.2.1, 192.168.220.203

Target environment:

Windows Server2012, Oracle12.1.0.1 (CDB: orcl, PDB: pdborcl1 and pdborcl2), ArcSDE10.2.1, 192.168.100.213


In my Linux environment, the business data of ArcSDE10.2.1 for Oracle12c has been imported and readable and writable, And the PDB is pdborcl. I hope to migrate this pdborcl To The Window environment.

----------------------------------------------------------------------------------


Blog: http://blog.csdn.net/linghe301

----------------------------------------------------------------------------------

Migration principle: generate an XML Metadata file describing the PDB in the Linux environment, and then copy the data file of the PDB and the XML Metadata file to the Windows machine, use these XML Metadata files and data files to create a new PDB.



1: view the PDB status in Linux

[oracle@oracle12c orcl]$ sqlplus sys/oracle@orcl as sysdbaSQL*Plus: Release 12.1.0.1.0 Production on Sat Feb 15 06:30:09 2014Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit ProductionWith the Partitioning, OLAP, Advanced Analytics and Real Application Testing optionsSQL> select name from v$datafile;NAME--------------------------------------------------------------------------------/home/oracle/app/oracle/oradata/orcl/system01.dbf/home/oracle/app/oracle/oradata/orcl/sysaux01.dbf/home/oracle/app/oracle/oradata/orcl/undotbs01.dbf/home/oracle/app/oracle/oradata/orcl/pdbseed/system01.dbf/home/oracle/app/oracle/oradata/orcl/users01.dbf/home/oracle/app/oracle/oradata/orcl/pdbseed/sysaux01.dbf/home/oracle/app/oracle/oradata/orcl/pdborcl/system01.dbf/home/oracle/app/oracle/oradata/orcl/pdborcl/sysaux01.dbf/home/oracle/app/oracle/oradata/orcl/pdborcl/SAMPLE_SCHEMA_users01.dbf/home/oracle/app/oracle/oradata/orcl/pdborcl/example01.dbf/home/oracle/app/oracle/product/orcl/pdborcl/sde01NAME--------------------------------------------------------------------------------/home/oracle/app/oracle/oradata/orcl/esri.dbf/home/oracle/app/oracle/oradata/orcl/pdborcl/esri.dbf/home/oracle/app/oracle/oradata/orcl/pdborcl/esri2.dbf14 rows selected.SQL> select con_id,dbid,NAME,OPEN_MODE from v$pdbs;    CON_ID       DBID NAME                           OPEN_MODE---------- ---------- ------------------------------ ----------         2 4062262812 PDB$SEED                       READ ONLY         3 2266793495 PDBORCL                        MOUNTED

2: export the metadata file of PDB in Linux

SQL> alter pluggable database pdborcl unplug into '/home/oracle/pdborcl.xml';Pluggable database altered.SQL> !ls /home/oracleapp  database  Desktop  pdborcl.xml  

3: physically copy the exported XML file and PDBORCL data file from the Linux environment to the Windows environment. The default paths are c: \ pdborcl. xml and c: \ pdborcl \ *. dbf.

4: Open the related pdborcl. xml

 
   
  
   PDBORCL
    
  
   3
    
  
   1
    
  
   202375168
    
  
   2266793495
    
  
   1347416737
    
  
   E07706C816463582E043CB64A8C060C6
    
  
   2025944
    
  
   0
    
  
   4194824
    
      
   
    SYSTEM
       
   
    0
       
   
    0
       
   
    1
       
   
    0
       
         
    
     /home/oracle/app/oracle/oradata/orcl/pdborcl/system01.dbf
          8      
    
     1
          
    
     1735344
          
    
     0
          
    
     1
          
    
     35840
          
    
     8192
          
    
     202375168
          
    
     2266793495
          
    
     0
          
    
     2025942
          
    
     0
          
    
     1720082
          
    
     819636003
        
     
    
      
   
    SYSAUX
       
   
    0
       
   
    1
       
   
    1
       
   
    0
       
         
    
     /home/oracle/app/oracle/oradata/orcl/pdborcl/sysaux01.dbf
          9      
    
     4
          
    
     1735347
          
    
     0
          
    
     1
          
    
     80640
          
    
     8192
          
    
     202375168
          
    
     2266793495
          
    
     0
          
    
     2025942
          
    
     0
          
    
     1720082
          
    
     819636003
        
     
    
      
   
    TEMP
       
   
    1
       
   
    2
       
   
    1
       
   
    0
       
   
    128
       
         
    
     /home/oracle/app/oracle/oradata/orcl/pdborcl/pdborcl_temp01.dbf
          3      
    
     1
          
    
     1735345
          
    
     0
          
    
     0
          
    
     2560
          
    
     8192
          
    
     202375168
          1      
    
     4194302
          
    
     80
        
     
    
      
   
    USERS
       
   
    0
       
   
    3
       
   
    1
       
   
    0
       
         
    
     /home/oracle/app/oracle/oradata/orcl/pdborcl/SAMPLE_SCHEMA_users01.dbf
          10      
    
     9
          
    
     1735350
          
    
     0
          
    
     1
          
    
     640
          
    
     8192
          
    
     202375168
          
    
     2266793495
          
    
     0
          
    
     2025942
          
    
     0
          
    
     1720082
          
    
     819636003
        
     
    
      
   
    EXAMPLE
       
   
    0
       
   
    4
       
   
    1
       
   
    0
       
         
    
     /home/oracle/app/oracle/oradata/orcl/pdborcl/example01.dbf
          11      
    
     10
          
    
     1735352
          
    
     0
          
    
     1
          
    
     45840
          
    
     8192
          
    
     202375168
          
    
     2266793495
          
    
     0
          
    
     2025942
          
    
     0
          
    
     1720082
          
    
     819636003
        
     
    
      
   
    SDE
       
   
    0
       
   
    5
       
   
    1
       
   
    0
       
         
    
     /home/oracle/app/oracle/oradata/orcl/pdborcl/sde01
          13      
    
     13
          
    
     1750711
          
    
     0
          
    
     1
          
    
     51200
          
    
     8192
          
    
     202375168
          
    
     2266793495
          
    
     0
          
    
     2025942
          
    
     0
          
    
     1720082
          
    
     819636003
        
     
    
      
   
    ESRI
       
   
    0
       
   
    6
       
   
    1
       
   
    0
       
         
    
     /home/oracle/app/oracle/oradata/orcl/pdborcl/esri.dbf
          15      
    
     15
          
    
     1833964
          
    
     0
          
    
     1
          
    
     128000
          
    
     8192
          
    
     202375168
          
    
     2266793495
          
    
     0
          
    
     2025942
          
    
     0
          
    
     1720082
          
    
     819636003
        
     
    
      
   
    ESRI2
       
   
    0
       
   
    7
       
   
    1
       
   
    0
       
         
    
     /home/oracle/app/oracle/oradata/orcl/pdborcl/esri2.dbf
          16      
    
     16
          
    
     1842823
          
    
     0
          
    
     1
          
    
     12800
          
    
     8192
          
    
     202375168
          
    
     2266793495
          
    
     0
          
    
     2025942
          
    
     0
          
    
     1720082
          
    
     819636003
        
     
    
      
   
    178
       
   
    2000
       
         
    APS=12.1.0.1.0      
    CATALOG=12.1.0.1.0      
    CATJAVA=12.1.0.1.0      
    CATPROC=12.1.0.1.0      
    CONTEXT=12.1.0.1.0      
    DV=12.1.0.1.0      
    JAVAVM=12.1.0.1.0      
    OLS=12.1.0.1.0      
    ORDIM=12.1.0.1.0      
    OWM=12.1.0.1.0      
    SDO=12.1.0.1.0      
    XDB=12.1.0.1.0      
    XML=12.1.0.1.0      
    XOQ=12.1.0.1.0    
       
   
    0
       
   
    0
       
   
    0
       4.2.0.00.27:1    
         
    
     processes=300
          
    
     memory_target=843055104
          
    
     db_block_size=8192
          
    
     compatible=12.1.0.0.0
          
    
     open_cursors=300
          
    
     enable_pluggable_database=TRUE
        
       
         
    
     primary version:18
          
    
     secondary version:0
        
       
   
    0
     
  
 

----------------------------------------------------------------------------------


Blog: http://blog.csdn.net/linghe301

----------------------------------------------------------------------------------


5: Use the create PDB statement

C: \ Users \ Administrator> sqlplus sys/oracle @ localhost/orcl as sysdbaSQL * Plus: Release 12.1.0.1.0 Production on Friday February 28 22:59:53 2014 Copyright (c) 1982,201 3, Oracle. all rights reserved. connect to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0-64bit ProductionWith the Partitioning, Oracle Label Security, OLAP, Advanced Analyticsand Real Application Testing optionsSQL> select con_id, dbid, name, Open_mode from v $ pdbs; CON_ID dbid name OPEN_MODE ---------- hour ---------- 2 4083344342 PDB $ seed read only 3 1246209042 PDBORCL1 MOUNTED 4 1218627613 PDBORCL2 MOUNTEDSQL> create pluggable database pdbsde using 'C: \ pdborcl. xml 'Copy file_name_convert = ('/home/oracle/app/oracle/oradata/orcl/pdborcl/', 'c: \ app \ oracle \ oradata \ orcl \ pdborcl \ '); create pluggable databas E pdbsde using 'C: \ pdborcl. xml 'Copy file_name_convert = ('/home/oracle/app/oracle/oradata/orcl/pdborcl/', 'c: \ app \ oracle \ oradata \ orcl \ pdborcl \') * row 1st error: ORA-19505: unrecognized file "/home/oracle/app/oracle/oradata/orcl/pdborcl/system01.dbf" ORA-27041: Unable to open file OSD-04002: unable to open file O/S-Error: (OS 3) the system cannot find the specified path.

6: Change pdborcl. the data file path in the xml file is changed to the actual path stored in the Windows environment, such as c: \ pdborcl \ sde01, and should also be set to the Windows path in the data file parameter settings, the data files are stored in C: \ app \ oracle \ oradata \ orcl \ pdborcl \

This step involves copying data files. The data size and time vary.

SQL> create pluggable database pdbsde using 'C: \ pdborcl. xml 'Copy file_name_convert = ('C: \ pdborcl \ ', 'c: \ app \ oracle \ oradata \ orcl \ pdborcl \'); the plug-in database has been created.

7. Open the new PDB (pdbsde) and check the status.

[Oracle @ oracle12c orcl] $ sqlplus sys/oracle @ orcl as sysdbaSQL * Plus: Release 12.1.0.1.0 Production on Sat Feb 15 06:30:09 2014SQL> select con_id, dbid, name, open_mode from v $ pdbs; CON_ID dbid name OPEN_MODE ---------- parallel ---------- 2 4083344342 PDB $ seed read only 3 1246209042 PDBORCL1 MOUNTED 4 1218627613 PDBORCL2 MOUNTED 5 2266793495 pdbsde mountedsql> alter pluggable database pdbsde open; the plug-in database pdbsde has enabled SQL> select con_id, dbid, name, open_mode from v $ pdbs; CON_ID dbid name OPEN_MODE ---------- ------------------------------ ---------- 2 4083344342 PDB $ seed read only 3 1246209042 PDBORCL1 MOUNTED 4 1218627613 PDBORCL2 MOUNTED 5 2266793495 PDBSDE READ WRITE
8: Use sqlplus to connect to sde users
SQL> conn sde/sde@192.168.100.213/pdbsdeERROR: ORA-01035: ORACLE ??? Between dí ?? Ód restricted session? T μ? ?? § When 1ó? Warning: you are no longer connected to ORACLE.
Prompt ORA-01035 error, need to grant restricted session permission
SQL> conn system/oracle@192.168.100.213/pdbsde is connected. SQL> grant restricted session to sde; authorization successful. SQL> conn sde/sde@192.168.100.213/pdbsde is connected.
9: Use ArcCatalog10.2.1 for read/write Testing



Summary: I personally think this is a bit similar to Oracle's cold backup, but the operation is relatively simple during the implementation process, especially the ArcGIS version data migration, this ensures simplicity, operability, and efficiency. It is worth your reference!

----------------------------------------------------------------------------------


Blog: http://blog.csdn.net/linghe301

----------------------------------------------------------------------------------

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.