Step-by-Step tutorial on deploying an Oracle database with tar: deploy an oracle database with tar

Source: Internet
Author: User

Step-by-Step tutorial on deploying an Oracle database with tar: deploy an oracle database with tar

There is a project on hand that may require downtime and maintenance, and it is likely that the host fails to be started. In case of a temporary backup, the TB-level backup cannot be used due to the huge data volume, therefore, the method of storage copy is considered to verify the deployment scheme using tar.

Although the use of cold backup is very limited and seems to be invisible to many people, the conventional migration method is intolerable when archiving is not enabled and the data is huge, direct Copy is an option when storage and Gigabit bandwidth are used.

Environment: Linux 5 + Oracle 10201

0. Stop applications and databases

Emctl stop dbconsole

Shutdown immediate;

Lsnrctl stop listener

1. Package

Tar-zcpf u01.tar.gz u01 #/u01 is the oracle Installation Directory

2. Transmission

Scp u01.tar.gz root@192.168.56.102: u01.tar.gz

3. Extract

Tar-zxf u01.tar.gz-C/

4. Permissions

The package contains permissions. You can also manually modify permissions.

Chown-R oracle: oinstall/u01

5. Execute the script

/U01/oracle/oraInventory/orainstRoot. sh

/U01/oracle/product/10.2.0/db_1/root. sh

6. oracle user environment variables

Scp. bash_profile oracle@192.168.56.102:. bash_profile

Source. bash_profile

7. Configure oratab

By default, the script is automatically created after it is executed. If it is not manually added.

Cat/etc/oratab

GT10G:/u01/oracle/product/10.2.0/db_1: N

8. Modify the listening address and tns address

If the host name is used, remember to change the address of both to the local machine.

Vi $ ORACLE_HOME/network/admin/listener. ora

Vi $ ORACLE_HOME/network/admin/tnsnames. ora

9. Start the instance to open the database

Startup

SQL> select * from v $ version;

BANNER

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

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-64bi

PL/SQL Release 10.2.0.1.0-Production

CORE 10.2.0.1.0 Production

TNS for Linux: Version 10.2.0.1.0-Production

NLSRTL Version 10.2.0.1.0-Production

Certificate ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

When installing oracle software, if the operating system is the same, you can directly tar the software.

It should be noted that tar can be used only when all minor versions of the system are the same.

You can directly set the tar/oracle directory so that the environment variable does not need to be set. If you need to change the sid, you can OK.

After decompression, remember to execute relink all under the oracle user.

Run sh $ ORACLE_HOME/install/changePerm. sh.

Switch to the root user and run root. sh under $ ORACLE_HOME.

If you want to upgrade later, you also need to set something:

Nbzwdb # [/var/opt/oracle] more/var/opt/oracle/oraInst. loc

Inventory_loc =/oracle/oraInventory

Inst_group = dba

Remember to be a root user. Pay attention to the following permissions:

Nbzwdb # [/var/opt/oracle] ll ora *

-Rwxrwxr-x 1 root sys 50 Sep 17 22:51 oraInst. loc

In this case, OK.

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.