Oracle software and database replication

Source: Internet
Author: User
Tags ftp transfer

Condition: In the same version of the operating system, copying a database involves copying software and database files as follows:
1. Package files in the Oracle Installation Directory of the source database:
Js_znjh_1./app/oracle $ tar cvf oracle.tar admin product utils

2. FTP Transfer packets
Js_znjh2./app/oracle $ ftp 134.96.14.39
Connected to 134.96.14.39.
220 js_znjh_1 FTP server (Version 4.2 Sat Sep 8 09:49:58 CDT 2007) ready.
Name (134.96.14.39: oracle): oracle
331 Password required for oracle.
Password:
230-Last unsuccessful login: Tue Dec 29 14:36:56 BEIST 2009 on ftp from: ffff: 134.98.103.55
230-Last login: Thu Jan 7 15:06:50 BEIST 2010 on/dev/pts/2 from 134.98.83.38
230 User oracle logged in.
Ftp> cd/app/oracle
250 CWD command successful.
Ftp> bin
200 Type set to I.
Ftp> dir
200 PORT command successful.
150 Opening data connection for/bin/ls.
Total 1408
Drwxrwxr-x 16 oracle dba 4096 Jan 12 2009 7592346
Drwxr-x --- 3 oracle dba 256 Oct 15 admin
Drwxr-xr-x 2 root system 256 Oct 12 lost + found
Drwxr-x --- 5 oracle dba 256 Oct 15 oraInventory
Drwxrwx --- 6 oracle dba 256 Oct 14 oraInventory_bak
-Rw-r ----- 1 oracle dba 713899 Oct 14 p75921__10204_cpu.zip
Drwxrwxr-x 3 oracle dba 256 Oct 13 product
Drwxr-xr-x 2 oracle dba 256 Oct 13 utils
Drwxr-xr-x 2 oracle dba 256 Jan 07 oracle.tar
226 Transfer complete.
Ftp> get oracle.tar

3. decompress the package:
Ftp> quit
221 Goodbye.
Js_znjh2./app/oracle $ ls
Lost + found oracle.tar
Js_znjh2./app/oracle $ tar xvf oracle.tar

4. Back up the control file in the source database and copy it to the target database.

5. Generate a pfile File Based on the spfile file in the source database and copy it to the target database.

6. Stop the application of the source database, stop the database, and copy the database files of the source database (stop copying)

7. open source database

8. Change the target database

 

SQL/PLUS logon error:
Js_znjh2./app/oracle $ export ORACLE_SID = idep2
Js_znjh2./app/oracle $ sqlplus "/as sysdba"

SQL * Plus: Release 10.2.0.4.0-Production on Thu Jan 7 13:21:18 2010

Copyright (c) 1982,200 7, Oracle. All Rights Reserved.

Exec (): 0509-036 Cannot load program oracleidep2 because of the following errors:
0509-130 Symbol resolution failed for/usr/lib/libc. a [aio_64.o] because:
0509-136 Symbol kaio_rdwr64 (number 1) is not exported from
Dependent module/unix.
0509-136 Symbol listio64 (number 2) is not exported from
Dependent module/unix.
0509-136 Symbol acancel64 (number 3) is not exported from
Dependent module/unix.
0509-136 Symbol iosuspend64 (number 4) is not exported from
Dependent module/unix.
0509-136 Symbol aio_nwait (number 5) is not exported from
Dependent module/unix.
0509-136 Symbol aio_nwait64 (number 6) is not exported from
Dependent module/unix.
0509-136 Symbol aio_nwait_timeout (number 7) is not exported from
Dependent module/unix.
0509-136 Symbol aio_nwait_timeout64 (number 8) is not exported from
Dependent module/unix.
0509-026 System error: Error 0
0509-192 Examine. loader section symbols with
'Dump-TV 'command.
ERROR:
ORA-12547: TNS: lost contact

The online search prompts that AIO is faulty or not open. view the following command:
Js_znjh2./dev $ lsattr-El aio0
Autoconfig defined STATE to be configured at system restart True
Fastpath enable State of fast path True
Kprocprio 39 Server PRIORITY True
Maxreqs 4096 Maximum number of REQUESTS True
Maxservers 10 MAXIMUM number of servers per cpu True
Minservers 1 MINIMUM number of servers True

I found no problem. I asked SA for help and said AIO was okay. What is the problem? I continued searching online. Someone mentioned run rootpre. sh. When I started relink all, I only saw a lot of alarms in the log, with a lot of content.
I didn't take a closer look, but I was prompted to execute the root. sh file at the end, but I didn't remind you to execute the rootpre. sh file,

Try this file, and the source address is no longer available. You have to re-decompress the file in the package where the software is installed. You need ROOT permission to run the file. SA helps solve the problem !!

 

Another problem,
The control file cannot be created. The first and second files can be created. The third file prompts that the path is incorrect. The third file cannot be created either. Later, initSID was detected. the ora file is copied from the source database and contains line breaks!
Create controlfile reuse set database "idep2" RESETLOGS FORCE LOGGING NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: create controlfile failed
ORA-00200: control file cocould not be created
ORA-00202: control file: '/DataExchange2/oradata/id
Ep2/control03.ctl'
ORA-27040: file create error, unable to create file
Ibm aix risc System/6000 Error: 2: No such file or directory

 

The statement is as follows:
Create pfile = '/app/oracle/product/10.2.0/db_1/dbs/init_idep2.ora' from spfile;


Idep2. _ db_cache_size = 4261412864
Idep2. _ Java _pool_size = 16777216
Idep2. _ large_pool_size = 16777216
Idep2. _ shared_pool_size = 1023410176
Idep2. _ stream s_pool_size = 33554432
*. Audit_file_dest = '/app/oracle/admin/idep2/adump'
*. Background_dump_dest = '/app/oracle/admin/idep2/bdump'
*. Compatible = '10. 2.0.3.0'
*. Control_files = '/DataExchange2/oradata/idep2/control01.ctl', '/DataExchange2/oradata/idep2/control02.ctl', '/DataExchange2/oradata/idep2/control03.ctl'
*. Core_dump_dest = '/app/oracle/admin/idep2/cdump'
*. Db_block_size = 8192
*. Db_domain =''
*. Db_file_multiblock_read_count = 16
*. Db_name = 'idep2'
*. Job_queue_processes = 10
*. Open_cursors = 300
*. Pga_aggregate_target = 1174405120
*. Processses = 1000
*. Remote_login_passwordfile = 'clusive'
*. Sessions = 1105
*. Sga_max_size = 5368709120
*. Sga_target = 5368709120
*. Undo_management = 'auto'
*. Undo_tablespace = 'undotbs1'
*. User_dump_dest = '/app/oracle/admin/idep2/udump'


Orapwd file =/app/oracle/product/10.2.0/db_1/dbs/orapwidep2 password = idep240 entries = 10;

Alter database backup controlfile to trace;


STARTUP NOMOUNT

Create controlfile reuse set database "idep2" RESETLOGS FORCE LOGGING NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 292
LOGFILE
GROUP 1'/DataExchange2/oradata/idep2/redo01.log 'SIZE 1024 M,
GROUP 2'/DataExchange2/oradata/idep2/redo02.log 'size 1024 M,
GROUP 3 '/DataExchange2/oradata/idep2/redo03.log' SIZE 1024 M
-- STANDBY LOGFILE
DATAFILE
'/DataExchange2/oradata/idep2/system01.dbf ',
'/DataExchange2/oradata/idep2/undotbs01.dbf ',
'/DataExchange2/oradata/idep2/sysaux01.dbf ',
'/DataExchange2/oradata/idep2/zhjs_index01.dbf ',
'/DataExchange2/oradata/idep2/zhjs_acc01.dbf ',
'/DataExchange2/oradata/idep2/zhjs_param01.dbf ',
'/DataExchange2/oradata/idep2/zhjs_log01.dbf ',
'/DataExchange2/oradata/idep2/zhjs_log02.dbf'
Character set ZHS16GBK;


Alter database open resetlogs;


Alter tablespace temp add tempfile '/DataExchange2/oradata/idep2/temp01.dbf'
SIZE 2048 m reuse autoextend off;

Alter tablespace ZHJS_TEMP add tempfile '/DataExchange2/oradata/idep2/zhjs_temp01.dbf'
SIZE 5120 m reuse autoextend off;

Alter database rename global_name to idep2;

Related Article

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.