SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
Oracle application training



Manual Clone of Oracle 11i Database
Cloning an Oracle Application Release 11i database to a Seperate UNIX Machine

Objective
Cloning an Oracle Application Release 11i database to a Seperate UNIX Machine

Steps to Clone
1. On the target box create the user who owns ORACLE_HOME files and database files (will be oracle for
the purposes of this paper). Create an environment file for each of these users specifying the
environment variables referenced in the Oracle Applications Release 11i for UNIX Installation

Manual.

Example of variables for the oracle user:

LD_LIBRARY_PATH
ORACLE_HOME
ORACLE_SID
TWO_TASK (if applicable)
PATH
TERM
JRE_DIR

2. Make zip files of all the ORACLE_HOME files on the Source Box.
3. FTP the zipped files over to the Target Box
4. Unzip all files into the new $ORACLE_HOME locations.
5. Relink the ORACLE_HOME.Example of items to be relinked:
cd $ORACLE_HOME/rdbms/lib; make -f ins_rdbms.mk install
or
cd $ORACLE_HOME/rdbms/lib relinkall

Modify the listener.ora and tnsnames.ora files to reflect your new environment. These files should be
found in the $ORACLE_HOME/network/admin directory.

Copying a Database

Moving a database from one location to another is conceptually very simple. However, you must be
extremely careful or the migration will fail. The physical approach involves cloning the source database.
This method is very similar to an offline backup of the database. The steps involved are:




Mr Prasad . +91-9441235888                                                     oracle application training
Oracle application training


• Backup the source database's control file to a trace file.
• Make a list of all of your data and redo log files.
• Perform a "clean" shutdown of the source database.
• Copy all datafiles, redo log files, init.ora file, and trace file from the source location to the target
location.
• Edit the target init.ora file and trace file.
• Start the target instance.
• Recreate the control file, recover and open the database.

Note: The following instructions assume you (1) already have the server installed for the target location,
(2) all parameters are already set for the target environment,

1. Backup the source database's control file to a trace file. Connect to the source database via SQL*Plus
using an account that has the SYSDBA or DBA role granted to it. Run the following command:

2. SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;

3. This will create a text file that we'll use later. This file will be written to the subdirectory designated by
the value of the USER_DUMP_DEST parameter.

4. Make a list of all datafiles and redo log files. It is absolutely essential to know the names and locations
of all datafiles and redo log files. To do this, issue the following queries:

5. SQL> SELECT file_name FROM dba_data_files;

6. SQL> SELECT member FROM v$logfile;

7. The first query will give the full path and file name for each of your datafiles. The second query will
give the same information for all redo log files. Be sure to record this information for future reference.

8. Perform a "clean" shutdown of the source database.A clean shutdown is necessary in order to make
sure all datafiles and control files are synchronized with the most recent transactions. The following
commands will give you a clean shutdown:

9. shutdown immediate;

10. Copy all data files,redo log files,the init.ora file,and the trace file from the source location to the
target location.Using the information collected in Step 2,copy all source datafiles and redo log files to
the target location. Also copy your init.ora file and the trace file generated in Step 1 to the target
location.

11. Edit the target init.ora file and the trace file. Using a text editor, revise the init.ora file to reflect the


Mr Prasad . +91-9441235888                                                             oracle application training
Oracle application training


new values for the target database. This will involve changing the paths indicated in parameters such as
CONTROL_FILES, USER_DUMP_DEST, BACKGROUND_DUMP_DEST, and any other parameter that
specifies a path/file location (see Attachment 1 below). Likewise, we must modify the trace file. This file
contains the CREATE CONTROLFILE command that we will be using in Step 7. You will have to change the
paths for all the datafiles and redo log files to reflect their new location (see Attachment 2 below).

12. Start the target instance.Once the init.ora file is edited, you can start the istance.However, since we
don't have control files yet, you must use the following command:

13. startup nomount;

14. Recreate the control file.Once the instance is started, you can create your control files. If you saved
your trace file as mytrace.trc, you can now create the control files by running this file as follows:

15. @mytrace.trc

16. This script will create the control files, perform a database recovery to resynchronize the control file
with the rest of the database, and open the database.

17. Database can now be opened normally using resetlogs options.

18. ALTER DATABASE OPEN restlogs;



Attachment 1. Sample init.ora file
Here is a sample init.ora file. Entries that should be edited to reflect the target file locations are
identified by an '<-- edit this' entry.

init.ora

AQ_TM_PROCESSES = 1
background_dump_dest = G:orantrdbms80trace <-- edit this
compatible = 9.2
control_files = ("G:orantdatabasectl1home.ora", <-- edit this
"G:orantdatabasectl2home.ora") <-- edit this
db_block_buffers = 200
db_block_size =2048
db_file_multiblock_read_count = 8
db_files = 1020
db_name = home
dml_locks = 100
log_buffer = 8192


Mr Prasad . +91-9441235888                                                          oracle application training
Oracle application training


log_checkpoint_interval = 8000
log_checkpoint_timeout = 0
max_dump_file_size = 10240
processes = 50
remote_login_passwordfile = exclusive
sequence_cache_entries = 10
sequence_cache_hash_buckets = 10
shared_pool_size = 6500000
sort_area_size = 65536
user_dump_dest = G:orantrdbms80trace <-- edit this



Attachment 2. Sample trace file
Here is a sample of the output from the command alter database backup controlfile to trace. Entries
that should be edited to reflect the target file locations are identified by an '<-- edit this' entry.

clone.trc

*** 1999.10.08.10.49.07.171
# The following commands will create a new control file and use it
# to open the database.
# Data used by the recovery manager will be lost. Additional logs may
# be required for media recovery of offline data files. Use this
# only if the current version of all online logs are available.
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "HOME" RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 30
MAXINSTANCES 1
MAXLOGHISTORY 112
LOGFILE
GROUP 1 'G:ORANTDATABASELOGHOME1.ORA' SIZE 1M, <-- edit this
GROUP 2 'G:ORANTDATABASELOGHOME2.ORA' SIZE 1M <-- edit this
DATAFILE
'G:ORANTDATABASEHOMESYS.DBF', <-- edit this
'G:ORANTDATABASEHOMERBS.DBF', <-- edit this
'G:ORANTDATABASEHOMEUSER.DBF', <-- edit this
'G:ORANTDATABASEHOMETEMP.DBF', <-- edit this
'G:ORANTDATABASEHOMEINDX.DBF' <-- edit this
;



Mr Prasad . +91-9441235888                                                     oracle application training

Mais conteúdo relacionado

Destaque

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Manual clone of_oracle_11i_database

  • 1. Oracle application training Manual Clone of Oracle 11i Database Cloning an Oracle Application Release 11i database to a Seperate UNIX Machine Objective Cloning an Oracle Application Release 11i database to a Seperate UNIX Machine Steps to Clone 1. On the target box create the user who owns ORACLE_HOME files and database files (will be oracle for the purposes of this paper). Create an environment file for each of these users specifying the environment variables referenced in the Oracle Applications Release 11i for UNIX Installation Manual. Example of variables for the oracle user: LD_LIBRARY_PATH ORACLE_HOME ORACLE_SID TWO_TASK (if applicable) PATH TERM JRE_DIR 2. Make zip files of all the ORACLE_HOME files on the Source Box. 3. FTP the zipped files over to the Target Box 4. Unzip all files into the new $ORACLE_HOME locations. 5. Relink the ORACLE_HOME.Example of items to be relinked: cd $ORACLE_HOME/rdbms/lib; make -f ins_rdbms.mk install or cd $ORACLE_HOME/rdbms/lib relinkall Modify the listener.ora and tnsnames.ora files to reflect your new environment. These files should be found in the $ORACLE_HOME/network/admin directory. Copying a Database Moving a database from one location to another is conceptually very simple. However, you must be extremely careful or the migration will fail. The physical approach involves cloning the source database. This method is very similar to an offline backup of the database. The steps involved are: Mr Prasad . +91-9441235888 oracle application training
  • 2. Oracle application training • Backup the source database's control file to a trace file. • Make a list of all of your data and redo log files. • Perform a "clean" shutdown of the source database. • Copy all datafiles, redo log files, init.ora file, and trace file from the source location to the target location. • Edit the target init.ora file and trace file. • Start the target instance. • Recreate the control file, recover and open the database. Note: The following instructions assume you (1) already have the server installed for the target location, (2) all parameters are already set for the target environment, 1. Backup the source database's control file to a trace file. Connect to the source database via SQL*Plus using an account that has the SYSDBA or DBA role granted to it. Run the following command: 2. SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE; 3. This will create a text file that we'll use later. This file will be written to the subdirectory designated by the value of the USER_DUMP_DEST parameter. 4. Make a list of all datafiles and redo log files. It is absolutely essential to know the names and locations of all datafiles and redo log files. To do this, issue the following queries: 5. SQL> SELECT file_name FROM dba_data_files; 6. SQL> SELECT member FROM v$logfile; 7. The first query will give the full path and file name for each of your datafiles. The second query will give the same information for all redo log files. Be sure to record this information for future reference. 8. Perform a "clean" shutdown of the source database.A clean shutdown is necessary in order to make sure all datafiles and control files are synchronized with the most recent transactions. The following commands will give you a clean shutdown: 9. shutdown immediate; 10. Copy all data files,redo log files,the init.ora file,and the trace file from the source location to the target location.Using the information collected in Step 2,copy all source datafiles and redo log files to the target location. Also copy your init.ora file and the trace file generated in Step 1 to the target location. 11. Edit the target init.ora file and the trace file. Using a text editor, revise the init.ora file to reflect the Mr Prasad . +91-9441235888 oracle application training
  • 3. Oracle application training new values for the target database. This will involve changing the paths indicated in parameters such as CONTROL_FILES, USER_DUMP_DEST, BACKGROUND_DUMP_DEST, and any other parameter that specifies a path/file location (see Attachment 1 below). Likewise, we must modify the trace file. This file contains the CREATE CONTROLFILE command that we will be using in Step 7. You will have to change the paths for all the datafiles and redo log files to reflect their new location (see Attachment 2 below). 12. Start the target instance.Once the init.ora file is edited, you can start the istance.However, since we don't have control files yet, you must use the following command: 13. startup nomount; 14. Recreate the control file.Once the instance is started, you can create your control files. If you saved your trace file as mytrace.trc, you can now create the control files by running this file as follows: 15. @mytrace.trc 16. This script will create the control files, perform a database recovery to resynchronize the control file with the rest of the database, and open the database. 17. Database can now be opened normally using resetlogs options. 18. ALTER DATABASE OPEN restlogs; Attachment 1. Sample init.ora file Here is a sample init.ora file. Entries that should be edited to reflect the target file locations are identified by an '<-- edit this' entry. init.ora AQ_TM_PROCESSES = 1 background_dump_dest = G:orantrdbms80trace <-- edit this compatible = 9.2 control_files = ("G:orantdatabasectl1home.ora", <-- edit this "G:orantdatabasectl2home.ora") <-- edit this db_block_buffers = 200 db_block_size =2048 db_file_multiblock_read_count = 8 db_files = 1020 db_name = home dml_locks = 100 log_buffer = 8192 Mr Prasad . +91-9441235888 oracle application training
  • 4. Oracle application training log_checkpoint_interval = 8000 log_checkpoint_timeout = 0 max_dump_file_size = 10240 processes = 50 remote_login_passwordfile = exclusive sequence_cache_entries = 10 sequence_cache_hash_buckets = 10 shared_pool_size = 6500000 sort_area_size = 65536 user_dump_dest = G:orantrdbms80trace <-- edit this Attachment 2. Sample trace file Here is a sample of the output from the command alter database backup controlfile to trace. Entries that should be edited to reflect the target file locations are identified by an '<-- edit this' entry. clone.trc *** 1999.10.08.10.49.07.171 # The following commands will create a new control file and use it # to open the database. # Data used by the recovery manager will be lost. Additional logs may # be required for media recovery of offline data files. Use this # only if the current version of all online logs are available. STARTUP NOMOUNT CREATE CONTROLFILE SET DATABASE "HOME" RESETLOGS NOARCHIVELOG MAXLOGFILES 32 MAXLOGMEMBERS 2 MAXDATAFILES 30 MAXINSTANCES 1 MAXLOGHISTORY 112 LOGFILE GROUP 1 'G:ORANTDATABASELOGHOME1.ORA' SIZE 1M, <-- edit this GROUP 2 'G:ORANTDATABASELOGHOME2.ORA' SIZE 1M <-- edit this DATAFILE 'G:ORANTDATABASEHOMESYS.DBF', <-- edit this 'G:ORANTDATABASEHOMERBS.DBF', <-- edit this 'G:ORANTDATABASEHOMEUSER.DBF', <-- edit this 'G:ORANTDATABASEHOMETEMP.DBF', <-- edit this 'G:ORANTDATABASEHOMEINDX.DBF' <-- edit this ; Mr Prasad . +91-9441235888 oracle application training