Home Database Mysql Tutorial oracle数据库文件移动(复制)另一个目录(主机)上重新启动的方

oracle数据库文件移动(复制)另一个目录(主机)上重新启动的方

Jun 07, 2016 pm 03:46 PM
oracle Host copy database document Table of contents move

看了一下资料,更改数据文件的方法如下: SQL shutdown immediate 数据库已经关闭。 已经卸载数据库。 ORACLE 例程已经关闭。 SQL startup mount ORACLE 例程已经启动。 Total System Global Area 135338868 bytes Fixed Size 453492 bytes Variable Size 10

看了一下资料,更改数据文件的方法如下:
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount
ORACLE 例程已经启动。

Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
数据库装载完毕。
SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/SYSTEM01.DBF' to 'G:/oradata/SYSTEM01.DBF';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/UNDOTBS01.DBF' to 'g:/oradata/undotbs01.dbf';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/CWMLITE01.DBF' to 'g:/oradata/cwmlite01.dbf';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/DRSYS01.DBF' to 'g:/oradata/drsys01.dbf';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/EXAMPLE01.DBF' to 'g:/oradata/example01.dbf';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/INDX01.DBF' to 'g:/oradata/indx01.dbf';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/ODM01.DBF' to 'g:/oradata/odm01.dbf';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/TOOLS01.DBF' to 'g:/oradata/tools01.dbf';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/USERS01.DBF' to 'g:/oradata/users01.dbf';

数据库已更改。

SQL> alter database rename file 'C:/ORACLE/ORADATA/DRACO/XDB01.DBF' to 'g:/oradata/xdb01.dbf';

数据库已更改。

SQL> alter database open;

数据库已更改。

 

在shutdown immediate后复制数据文件到g:/oradata/
然后再接着startup mount
。。。。

更改控制文件储存位置的方法:

C:/>sqlplus

SQL*Plus: Release 9.2.0.1.0 - Production on 星期二 10月 19 15:14:29 2004

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

请输入用户名: /as sysdba

连接到:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
SQL> select * from v$controlfile;

STATUS
-------
NAME
------------------------------------------------------------------------

--------

C:/ORACLE/ORADATA/DRACO/CONTROL01.CTL


C:/ORACLE/ORADATA/DRACO/CONTROL02.CTL


C:/ORACLE/ORADATA/DRACO/CONTROL03.CTL

SQL> create pfile='c:/init.ora' from spfile;

文件已创建。


*.control_files='/oradata/ocp/control01.ctl','/oradata/ocp/control02.ctl'

,'/oradata/ocp/control03.ctl' 
路径更改为要储存的目录位置。>>


SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。


SQL> startup pfile='c:/init.ora';《 从init.ora启动 》
ORACLE 例程已经启动。

Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
数据库装载完毕。
数据库已经打开。
SQL> create spfile from pfile='c:/init.ora';

文件已创建。

SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup force
ORACLE 例程已经启动。

Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
数据库装载完毕。
数据库已经打开。
SQL> select * from v$controlfile;

STATUS
-------
NAME
------------------------------------------------------------------------

--------

G:/ORADATA/CONTROL01.CTL


G:/ORADATA/CONTROL02.CTL


G:/ORADATA/CONTROL03.CTL


SQL>

 

果不改system表空间的数据文件

可以不用shutdown。
step1:sql>offline tablespace
step2oracle数据库文件移动(复制)另一个目录(主机)上重新启动的方s>mv datafile
step3:sql>alter rename
step4:sql>online tablespace

redo log:
alter database rename file 'xxxto 'xxx';

或删除重建

 

 

我更改日志文件储存路径时执行一下命令:
startup mount
alter database rename file ‘C:/ORACLE/ORADATA/DRACO/REDO03.LOG’ to ‘g:/oradata/REDO03.LOG’
然后重新启动数据库就出现如下错误,请问如何解决?谢谢!
SQL> startup force
ORACLE 例程已经启动。

Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
数据库装载完毕。
ORA-00322: 日志 1 (线程 1) 不是当前副本
ORA-00312: 联机日志 1 线程 1: 'G:/ORADATA/REDO01.LOG'

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

MSI showcases MEG Vision MSI showcases MEG Vision Jun 09, 2024 am 11:15 AM

According to news from this site on June 5, MSI participated in the 2024 Taipei International Computer Show and showcased a new flagship gaming computer called MEGVisionXAI. This game console is an extension of the existing Vision series and uses a very eye-catching surround glass design, with internal components clearly visible. The most attractive part is that the front of the host is equipped with an oversized touch screen. MSI staff said that it can synchronize MSI’s exclusive AI applications to further enhance various AI functions. The relevant pictures attached to this site are as follows: MSI has not yet explained more details. From the pictures shared, you can see that a local AI chatbot is running on the screen. Users can interact with it and ask it to complete AI tasks and locate locally stored documents. wait. Source of the above picture:

6000 mAh silicon negative battery! Xiaomi 15Pro upgrade leaked again 6000 mAh silicon negative battery! Xiaomi 15Pro upgrade leaked again Jul 24, 2024 pm 12:45 PM

According to news on July 23, blogger Digital Chat Station broke the news that the battery capacity of Xiaomi 15 Pro has been increased to 6000mAh and supports 90W wired flash charging. This will be the Pro model with the largest battery in Xiaomi’s digital series. Digital Chat Station previously revealed that the battery of Xiaomi 15Pro has ultra-high energy density and the silicon content is much higher than that of competing products. After silicon-based batteries are tested on a large scale in 2023, second-generation silicon anode batteries have been identified as the future development direction of the industry. This year will usher in the peak of direct competition. 1. The theoretical gram capacity of silicon can reach 4200mAh/g, which is more than 10 times the gram capacity of graphite (the theoretical gram capacity of graphite is 372mAh/g). For the negative electrode, the capacity when the lithium ion insertion amount reaches the maximum is the theoretical gram capacity, which means that under the same weight

Lenovo YOGA Portal mini host officially announced on July 27, released by ChinaJoy, with built-in 350W power supply Lenovo YOGA Portal mini host officially announced on July 27, released by ChinaJoy, with built-in 350W power supply Jul 23, 2024 pm 01:47 PM

According to news from this site on July 23, Lenovo’s YOGA Portal high-performance desktop computer, which has been exposed for a long time, is now confirmed to be officially released at ChinaJoy in Shanghai on July 27. It is claimed to be a mini host designed for professional AI creation. It is a performance master and an expert in AI creation of 3D digital people. The AI ​​virtual background is based on the on-site pictures provided by our friend @yuP in Shanghai. The volume of this small host is only 3.7L. It is made of anodized aluminum and is equipped with Intel Core. i7-14700 processor, equipped with 32GBDDR5 memory and 1TB solid state drive. YOGA Portal is both a host and an all-in-one AI creation machine. The high-performance host is combined with an algorithm-optimized camera to form an integrated solution. Just stand in front of the camera i.e.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

How much memory is needed to use oracle database How much memory is needed to use oracle database May 10, 2024 am 03:42 AM

The amount of memory required for an Oracle database depends on the database size, workload type, and number of concurrent users. General recommendations: Small databases: 16-32 GB, Medium databases: 32-64 GB, Large databases: 64 GB or more. Other factors to consider include database version, memory optimization options, virtualization, and best practices (monitor memory usage, adjust allocations).

iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos iOS 18 adds a new 'Recovered' album function to retrieve lost or damaged photos Jul 18, 2024 am 05:48 AM

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

See all articles