迁移数据库的文件到不同路径
导读: 迁移数据库的文件到不同路径 1.选择迁移的数据文件: D:/ORACLE/ORADATA/SUN/TEST.ORA http://www.sosdb.com/jdul/dispbbs.asp?boardID=1ID=219page=3 create table name (name varchar2(10)) tablespace test; (1) No Archive Mode (A)迁移数据文件 1
导读:迁移数据库的文件到不同路径
<p><font>1.选择迁移的数据文件: <br>D:/ORACLE/ORADATA/SUN/TEST.ORA </font><br><br>http://www.sosdb.com/jdul/dispbbs.asp?boardID=1&ID=219&page=3 </p><br><p>create table name <br>(name varchar2(10)) <br>tablespace test; </p><br><p>(1) No Archive Mode </p><br><p>(A)迁移数据文件 <br>1.看表所在的表空间与数据文件: <br>select d.name , t.name <br>from <br>v$datafile d , v$tablespace t <br>where <br>d.ts#=t.ts#; </p><br><p>2.alter tablespace test offline; <br>move D:/ORACLE/ORADATA/SUN/TEST.ORA D:/oracle/move/TEST.ORA </p><br><p>3. <br>alter database rename file 'D:/ORACLE/ORADATA/SUN/TEST.ORA' to 'D:/oracle/move/TEST.ORA'; </p><br><p>4.alter tablespace test online; </p><br><p>5.迁移成功。 </p><br><p>(B)迁移redolog 文件 <br>1.查看Redolog 的文件的位置所在。 <br>select member from v$logfile; </p><br><p>2.选择要迁移的Redolog的位置, 查看Redolog 位置的状态. <br>select g.member, v.status from <br>v$log v , v$logfile g <br>where <br>v.GROUP#=g.GROUP#; </p><br><p>3.如果日志的状态为CURRENT, 切换日志. <br>alter system switch logfile; </p><br><p>4.移动日志文件的位置 <br>move D:/ORACLE/ORADATA/SUN/REDO03.LOG D:/oracle/move/REDO03.LOG </p><br><p>5.数据字典的更名 <br>alter database rename file 'D:/ORACLE/ORADATA/SUN/REDO03.LOG' to 'D:/oracle/move/REDO03.LOG'; </p><br><p>6.进行切换日志的测试. <br>alter system switch logfile; </p><br><p>7.测试成功. </p><br><p>(2) Archive log Model </p><br><p>SQL> startup mount <br>更改数据库为Archive log 模式 <br>SQL> alter database archivelog <br>SQL> archive log start <br>打开数据库 <br>SQL> alter database open </p><br><p>(C)迁移数据文件 <br>1.看表所在的表空间与数据文件: <br>select d.name , t.name <br>from <br>v$datafile d , v$tablespace t <br>where <br>d.ts#=t.ts#; </p><br><p>2.alter tablespace test offline; <br>move D:/ORACLE/ORADATA/SUN/TEST.ORA D:/oracle/move/TEST.ORA </p><br><p>3. <br>alter database rename file 'D:/ORACLE/ORADATA/SUN/TEST.ORA' to 'D:/oracle/move/TEST.ORA'; </p><br><p>4.恢复数据文件 <br>如果数据库文件的状态是 Recover 执行如下语句 (OFFLINE) 不执行 <br>rocover datafile 'D:/oracle/move/TEST.ORA'; </p><br><p>5.上线 <br>alter tablespace test online; </p><br><p>datafile级的为 <br>alter database datafile db1 offline; <br>move db1 db2 <br>alter database rename file db1 to db2 <br>rocover datafile db2; <br>alter database datafile db2 online; </p><br><p><br>(D)Relolog的迁移 <br>1.查看Redolog 的文件的位置所在。 <br>select member from v$logfile; </p><br><p>2.选择要迁移的Redolog的位置, 查看Redolog 位置的状态. <br>select g.member, v.status from <br>v$log v , v$logfile g <br>where <br>v.GROUP#=g.GROUP#; </p><br><p>3.如果日志的状态为CURRENT, 切换日志. <br>alter system switch logfile; </p><br><p>4.移动日志文件的位置 <br>move D:/ORACLE/ORADATA/SUN/REDO03.LOG D:/oracle/move/REDO03.LOG </p><br><p>5.数据字典的更名 <br>alter database rename file 'D:/ORACLE/ORADATA/SUN/REDO03.LOG' to 'D:/oracle/move/REDO03.LOG'; </p><br><p>6.进行切换日志的测试. <br>alter system switch logfile; </p><br><p>7.测试成功.</p><p> </p>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

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

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

How to use MySQLi to establish a database connection in PHP: Include MySQLi extension (require_once) Create connection function (functionconnect_to_db) Call connection function ($conn=connect_to_db()) Execute query ($result=$conn->query()) Close connection ( $conn->close())

The os.Rename function is used in Go language to rename files. The syntax is: funcRename(oldpath,newpathstring)error. This function renames the file specified by oldpath to the file specified by newpath. Examples include simple renaming, moving files to different directories, and ignoring error handling. The Rename function performs an atomic operation and may only update directory entries when the two files are in the same directory. Renames may fail across volumes or while a file is in use.

The best way to move legacy C++ applications to the cloud: Re-platform: Move the application code to a cloud-native platform (such as Kubernetes) and leverage cloud services. Cloudization: Deploy applications on cloud platforms and utilize cloud services without code refactoring.

To handle database connection errors in PHP, you can use the following steps: Use mysqli_connect_errno() to obtain the error code. Use mysqli_connect_error() to get the error message. By capturing and logging these error messages, database connection issues can be easily identified and resolved, ensuring the smooth running of your application.

HTML cannot read the database directly, but it can be achieved through JavaScript and AJAX. The steps include establishing a database connection, sending a query, processing the response, and updating the page. This article provides a practical example of using JavaScript, AJAX and PHP to read data from a MySQL database, showing how to dynamically display query results in an HTML page. This example uses XMLHttpRequest to establish a database connection, send a query and process the response, thereby filling data into page elements and realizing the function of HTML reading the database.

1. On the old device, click "Me" → "Settings" → "Chat" → "Chat History Migration and Backup" → "Migrate". 2. Select the target platform device to be migrated, select the chat records to be migrated, and click "Start". 3. Log in with the same WeChat account on the new device and scan the QR code to start chat record migration.
