Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle11g entire DB migration

2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Instance Name: PCBMES

Migrate oracle11gr2 database under/oracle_ebs/pcbmes/db to/ebs/pcbmes/db directory

I. Preliminary preparations

1. Create pfile file (DB starts with spfile)

create pfile from spfile;

2. Obtain the script for recreating the control file (see associated document 01 for details)

alter database backup controlfile to trace;

Generate a trace file. The file path generated by this operation is/oracle_ebs/pcbmes/db/diag/rdbms/pcbmes/PCBMES/trace. You can use ls -l -t.| more to sort View files

more /oracle_ebs/pcbmes/db/diag/rdbms/pcbmes/PCBMES/trace/PCBMES_ora_16295.trc

Copy the displayed script to a new file script (Createctlf.sql), and edit and save it according to the new path. The script generated by editing is as follows:

CREATE CONTROLFILE REUSE DATABASE "PCBMES" RESETLOGS NOARCHIVELOG

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

MAXINSTANCES 8

MAXLOGHISTORY 292

LOGFILE

GROUP 1 '/ebs/pcbmes/db/apps_st/data/PCBMES/redo01.log' SIZE 50M BLOCKSIZE 512,

GROUP 2 '/ebs/pcbmes/db/apps_st/data/PCBMES/redo02.log' SIZE 50M BLOCKSIZE 512,

GROUP 3 '/ebs/pcbmes/db/apps_st/data/PCBMES/redo03.log' SIZE 50M BLOCKSIZE 512

-- STANDBY LOGFILE

DATAFILE

'/ebs/pcbmes/db/apps_st/data/PCBMES/system01.dbf',

'/ebs/pcbmes/db/apps_st/data/PCBMES/sysaux01.dbf',

'/ebs/pcbmes/db/apps_st/data/PCBMES/undotbs01.dbf',

'/ebs/pcbmes/db/apps_st/data/PCBMES/users01.dbf',

'/ebs/pcbmes/db/apps_st/data/PCBMES/pcbmes_d_01.dbf',

'/ebs/pcbmes/db/apps_st/data/PCBMES/pcbmes_d_02.dbf',

'/ebs/pcbmes/db/apps_st/data/PCBMES/pcbmes_x_01.dbf',

'/ebs/pcbmes/db/apps_st/data/PCBMES/pcbmes_x_02.dbf'

CHARACTER SET ZHS16GBK

;

ALTER DATABASE OPEN RESETLOGS;

ALTER TABLESPACE TEMP ADD TEMPFILE '/ebs/pcbmes/db/apps_st/data/PCBMES/temp01.dbf'

SIZE 30408704 REUSE AUTOEXTEND ON NEXT 655360 MAXSIZE 32767M;

II. Copy database files

1. Close database and monitor

shutdown immediate;

lsnrctl stop;

2. Copy files

cp -RH /oracle_ebs/pcbmes/db/. /ebs/pcbmes/db/

III. Modify various configuration files of the target

1. Modify DB configuration file

cd /ebs/pcbmes/db/tech_st/11.2.0/dbs

vi initPCBMES.ora

Modify all the configured original paths into new paths

2. Modify monitoring configuration

cd /ebs/pcbmes/db/tech_st/11.2.0/network/admin

vi listener.ora

vi sqlnet.ora

Modify user environment variables

cd

cp .profile .profile.bak

vi .profile

4. Re-create the control file

1. Log in again with orames user, and check whether the environment variables are correct and effective.

2. Create control files

sqlplus /nolog

SQL> conn / as sysdba;

SQL> startup nomount pfile='/ebs/pcbmes/db/tech_st/11.2.0/dbs/initPCBMES.ora';

SQL> @createctlf.sql

SQL> create spfile from pfile;

SQL> shutdown immediate;

SQL> startup;

3. Start listening

lsnrctl start

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report