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

How to restore a database through a .dbf file

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces how to restore the database through .dbf file, the article is very detailed, has a certain reference value, interested friends must read it!

Demand:

We (Party B) need a set of perfect testing environment to build our own environment based on the his test library provided by Party A.

Existing resources:

A server whose operating system is Windows Server2008R2_enterprise_64bit

Party A provides resources:

The test server operating system is WindowsServer2003_64bit

The database is 10g (Oracle Database 10g Enterprise Edition Release 10.2.0.1.0-Prod)

Database character set US7ASCII

The total size of the database file .dbf is 178G (the rar compression package is 22.9G, and the compression ratio of the .dbf file to the .dbf file is: nasty 22.9, 178pm 0.129g, 13%)

The initial implementation plan is as follows:

Option 1 (conservative):

1. Create a virtual machine (build necessary snapshots), build WindowsServer2003 on the virtual machine, and install Oracle10g (obtain the installation software from the information section, and require the version of the installation package to be consistent with the test environment)

two。 Cold standby test library restore 10g

Option 2 (not tried, the time period of a try is also quite long 1-2 days):

If the above fails, then

1. Create a virtual machine (build necessary snapshots) and build WindowsServer2008r2 on the virtual machine

2.expdp 10g full library to 11g (impractical according to dba_users, there are 7352 schemas)

Scenario 3 (pride connection error):

If the above fails, then

1.expdp 10g34 schema (filtered by dba_objects.owner) to 11g, then pride connection error tracking!

Option 4 (not tested so far):

If the above fails, then

1.sqldeveloper database replication

Option 5 (dead horse as a live horse doctor):

If the above fails, then

1. Reducing cold standby 10g on windows2008r2,11g

If the above five fail, it will be game over!

As a result, the first scheme is the best with the least time period.

It takes too long to zip the .dbf file and move the copy to the restored machine (most of the time it is complicated during the day and continue to do it at night).

Be sure to know the principle (the architecture of Oracle)!

For example, what files are read by the three states of Oracle, and what are these files used for?

All right, let's get down to business and talk about the successful practice of option 1.

1. First package the .dbf file of the test library (178G, which spreads quickly after compression and is not easy to lose packets)

two。 Create a Windows Server2003_64Bit virtual machine

3. Install the oracle10g software (install the database software only), and the ORACLE_HOME directory (in this case, C:\ oracle\ product\ 10.2.0\ db_2) is the same as the provided test library.

4. Extract the copied .dbf to the oradata file path.

5. Copy the pfile file of the test library to the C:\ oracle\ product\ 10.2.0\ db_2\ database\ initorcl.ora directory

Statements that need to be executed in the test library:

Create pfile from spfile

6. Get the control file creation statement of the test library

Statements that need to be executed in the test library:

Alter database backup controlfile to trace

Show parameter dump

Get the user_dump_dest= path (find the newly generated .trc, change control file under this path)

7. Create an instance

Oradim-new-sid orcl

Set oracle_sid=orcl

Sqlplus / as sysdba

Startup

Note that several folders under C:\ oracle\ product\ 10.2.0\ db_2\ provided: admin and flash_recovery_area had better be copied as well.

The above is all the contents of the article "how to restore a database through a .dbf file". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

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