How to Rename or Move Oracle Tablespace Datafile to Another Location Làm thế nào để Đổi tên hoặc Move Oracle tablespace DATAFILE để khác Địa điểm
Oracle database does not provide an easy user interface to rename a datafile of tablespace, nor database administrator can easily move or relocate the datafile to another location or directory that different from original location on creation of database. Oracle cơ sở dữ liệu không cung cấp một giao diện người dùng dễ dàng để đổi tên một DATAFILE của tablespace, và cũng không quản trị cơ sở dữ liệu có thể dễ dàng di chuyển hoặc di dời các DATAFILE đến một địa điểm hoặc thư mục khác nhau từ vị trí ban đầu về sáng tạo của cơ sở dữ liệu. The rename or move place task has to be performed via Oracle SQLPlus command line interface. Việc đổi tên hoặc di chuyển công việc diễn ra đã được thực hiện thông qua Oracle SQLPlus giao diện dòng lệnh. However, if the operation is performed when the tablespace which owns the datefile is online, error will occur. Tuy nhiên, nếu hoạt động được thực hiện khi tablespace các công ty sở hữu các datefile là trực tuyến, lỗi sẽ xảy ra.
The error message may include the following: Các thông báo lỗi có thể bao gồm:
ORA-01511: error in renaming log/data files ORA-01511: lỗi trong đổi tên đăng nhập / dữ liệu tập tin
ORA-01121: cannot rename database file <string> – file is in use or recovery ORA-01121: không thể đổi tên tập tin cơ sở dữ liệu <string> - tập tin đang được sử dụng hoặc phục hồi
ORA-01110: data file <string>: 'datafile.dbf' ORA-01110: file dữ liệu <string>: 'datafile.dbf'
To properly move the datafile around or rename the datafile, follow this guide: Để di chuyển đúng DATAFILE xung quanh hoặc đổi tên DATAFILE, hãy làm theo hướng dẫn này:
- Login to SQLPlus. Đăng nhập để SQLPlus.
- Connect as SYS DBA with CONNECT / AS SYSDBA command. Kết nối như SYS DBA với CONNECT / AS SYSDBA lệnh.
- Shutdown the database instance with SHUTDOWN command. Tắt máy tính, ví dụ cơ sở dữ liệu với lệnh SHUTDOWN.
- Rename or/and move the datafiles at operating system level. Đổi tên hoặc / và di chuyển datafiles ở cấp hệ điều hành.
- Start Oracle database in mount state with STARTUP MOUNT command. Bắt đầu của Oracle cơ sở dữ liệu trong nước gắn kết với lệnh StartUp Mount.
- Modify the name or location of datafiles in Oracle data dictionary using following command syntax: Sửa đổi tên hoặc vị trí của dữ liệu Oracle datafiles trong từ điển bằng cách sử dụng cú pháp lệnh sau đây:
ALTER DATABASE RENAME FILE '<fully qualified path to original data file name>' TO '<new or original fully qualified path to new or original data file name>'; Đường dẫn <fully đủ điều kiện ALTER DATABASE đổi tên tập tin 'để tập tin dữ liệu gốc name>' <new TO 'hoặc bản gốc đầy đủ đường dẫn đến tập tin dữ liệu mới hoặc nguyên gốc name>';
- Open Oracle database instance completely with ALTER DATABASE OPEN command. Mở cơ sở dữ liệu Oracle dụ hoàn toàn với lệnh ALTER DATABASE OPEN.
If the datafiles that need to be changed or moved do not belong to SYSTEM tablespaces, and do not contain active rollback segments or temporary segments, there is another workaround that does not require database instance to be shutdown. Nếu datafiles rằng cần phải được thay đổi hoặc di chuyển không thuộc SYSTEM tablespaces, và không chứa các phân đoạn rollback hoạt động hoặc phân đoạn tạm thời, có một lỗi tạm mà không cần dụ cơ sở dữ liệu sẽ được tắt. Instead, only the particular tablespace that contains the date files is taken offline. Thay vào đó, chỉ có những tablespace cụ thể có chứa các tập tin được lấy ngày offline.
- Login to SQLPlus. Đăng nhập để SQLPlus.
- Connect as SYS DBA with CONNECT / AS SYSDBA command. Kết nối như SYS DBA với CONNECT / AS SYSDBA lệnh.
- Make offline the affected tablespace with ALTER TABLESPACE <tablespace name> OFFLINE; command. Hãy offline các tablespace bị ảnh hưởng với <tablespace ALTER tablespace name> OFFLINE; lệnh.
- Modify the name or location of datafiles in Oracle data dictionary using following command syntax: Sửa đổi tên hoặc vị trí của dữ liệu Oracle datafiles trong từ điển bằng cách sử dụng cú pháp lệnh sau đây:
ALTER TABLESPACE <tablespace name> RENAME DATAFILE '<fully qualified path to original data file name>' TO '<new or original fully qualified path to new or original data file name>'; ALTER tablespace <tablespace name> đường dẫn <fully đủ điều kiện đổi tên DATAFILE 'vào dữ liệu gốc tập name>' <new TO 'hoặc bản gốc đầy đủ đường dẫn đến tập tin dữ liệu mới hoặc nguyên gốc name>';
- Bring the tablespace online again with ALTER TABLESPACE alter tablespace <tablespace name> ONLINE; command. Mang theo tuyến tablespace lại với ALTER tablespace thay đổi <tablespace tablespace name> ONLINE; lệnh.
IMPORTANT : The page is machine translated and provided "as is" without warranty. Quan trọng: Sửa là máy dịch và cung cấp "như là" không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể khó hiểu. Please refer to Vui lòng tham khảo original English article bản gốc tiếng Anh bài viết whenever possible. bất cứ khi nào có thể.
Related Articles Bài viết liên quan
- How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile Làm thế nào Drop tablespace và Recover Oracle Database Khi Accidentally Xóa DATAFILE
- How to Remove and Drop Datafiles from Tablespace in Oracle Database Làm thế nào để Hủy bỏ và Thả Datafiles từ tablespace trong Oracle Database
- Oracle ORA-01658 Unable to Create INITIAL Extent for Segment in Tablespace Error Oracle ORA-01658 Không thể Tạo ĐẦU Mức độ cho Segment trong tablespace Lỗi
- ORA-25153 Temporary Tablespace is Empty Error in Oracle ORA-25153 Temporary tablespace đang rỗng Lỗi trong Oracle
- Fix Vista Unable to Rename or Move Files and Folders Issues After Applying KB938979 Patch Vista Không thể sửa chữa hoặc Chuyển Đổi tên tập tin và thư mục Các vấn đề Sau khi áp dụng KB938979 Patch
- How to Move WordPress Blog to New Domain or Location Làm thế nào để Move WordPress Blog đến New Domain hay Địa điểm
- Download Bulk Rename Utility To Rename Files Easily Download Bulk Rename Utility Để Đổi tên tập tin dễ dàng
- Change Oracle Database User Password Cơ sở dữ liệu Oracle thay đổi mật khẩu người dùng
- Oracle Database Link Oracle Database Link
- Oracle Database Import Error 3113/3114 Oracle Database nhập Lỗi 3113/3114









































