Move the datafile to release the diskspace on the drive

本文讨论了在Oracle数据库环境中遇到的数据库文件迁移与重命名过程中出现的问题及解决方案,包括检查磁盘空间、使用SQL*Plus命令进行数据库操作等步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Nothing special,just keep track the history.

C:\Users\Administrator>tnspic
'tnspic' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Administrator>tnsping orcl

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 17-MAY-2013 11:06:32

Copyright (c) 1997, 2010, Oracle.  All rights reserved.

Used parameter files:
E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = HP580)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = orcl)))
^C

C:\Users\Administrator>
C:\Users\Administrator>set oracle_sid=orcl

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri May 17 11:08:31 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 1.0689E+10 bytes
Fixed Size                  2185160 bytes
Variable Size            6174017592 bytes
Database Buffers         4496293888 bytes
Redo Buffers               16977920 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> conn businessdata/businessdata
ERROR:
ORA-03113: end-of-file on communication channel
Process ID: 0
Session ID: 419 Serial number: 3


ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Process ID: 0
Session ID: 0 Serial number: 0


Warning: You are no longer connected to ORACLE.

SQL> show user
USER is ""
SQL> exit
Check diskspace and find there is no diskspace on datafile filesysystem.
C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri May 17 14:33:20 2013

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup nomount;
ORACLE instance started.

Total System Global Area 1.0689E+10 bytes
Fixed Size                  2185160 bytes
Variable Size            6174017592 bytes
Database Buffers         4496293888 bytes
Redo Buffers               16977920 bytes
SQL> alter database rename datafile 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF';
alter database rename datafile 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF'
                      *
ERROR at line 1:
ORA-02231: missing or invalid option to ALTER DATABASE


SQL> abase rename datafile 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.D
SP2-0734: unknown command beginning "abase rena..." - rest of line ignored.
SQL>  rename datafile 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF';
 rename datafile 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF'
                 *
ERROR at line 1:
ORA-00946: missing TO keyword


SQL>
SQL>
SQL> alter database rename file 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF';
alter database rename file 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF'
*
ERROR at line 1:
ORA-01507: database not mounted


SQL> alter database mount;

Database altered.

SQL> alter database rename file 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF';
alter database rename file 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF'
*
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01141: error renaming data file 31 - new file 'E:\DATALRG15.DBF' not found
ORA-01110: data file 31: 'F:\BBCLDB\ORCL\DATALRG15.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) ???????????


SQL> select name from v$database;

NAME
---------
ORCL
cut and paste the file to the target drive.
SQL> alter database rename file 'F:\BBCLDB\orcl\DATALRG15.DBF' to 'E:\DATALRG15.DBF';

Database altered.

SQL> alter database open;

 

 

 

 

 

 

 

 

 

design a plugin for files of screen-recording's moving to different disks of Xbox Game Bar in PC. reply in Chinese.the detailed of process, and necessary profiles and their codes(C series codes is required).(rules:1.detect and find the enough and largest space between the disks and list priority sequence,they're target disk(default mode) , customized mode is alternative;2. for the recording files, if choose default mode, set a default value such as 1GB for recordings and 10MB for screenshots, they all are based on the resolution of the screen(could find the minimum size of files of different resolutions to fill the default mode),it could customize the minimun size;3.for customize mode, it should detect 2 first and then is 1 to check whether the disks are allowed to move, if not, show popup window to tell the info and cancel(but don't pop the window when running a games), if enough, run the moving as what mode you've chosen, so do as default mode;4.for different games-recording, they could also be classified when moved to different disks or even the same disks but different files;5.for different games-recording, the files' sizes are smaller the customized values but not only one file, cumulating all of them first then run the rule 2 before the disks is full(it should set another default mode different before), and it could give the alternation like games(arrange it a new sequence based the number of most repeated names of games-recording, and the first one is the first to move the another do so), size & number(arrange it from larger to smaller, but they all need to smaller than size mentioned in rule 2,and then number are adjustable,and number of each moving files from larger and smaller will follow it,and first one is the first to move,the another do so)(it should set another customized mode different before);6.screenshot are alternative in the rule, but when it run the rule 4, it need to be classified to different subfolders(screenshot and recording) where the same games-capture folds in;7.when there is a game is running, pause the moving, especially the disk where the running games in;8.to avoid the difficulty of management with the scattered files, no need to run the rule 1 when every time(but not first time you reboot the computer after you install the plugin) of computer booting or game recording until the target disk's space is about to overflow(add timer(could adjustable) to detect it), no matter what mode you've chosen and then pop up to rechoose the mode;9.if the target disk is overflow when moving a file of game-recording, cancel to move it to the new chosen disk, add number as natural sequence in the files' name;10.to avoid to frequent moving of files, it could set a threshold of system disk, pop up the tip when the threshold is about to arrive before recording, threshold setting: it could choose proportion(%) or values(the customized space threshold of system disk),no need to add timer;11.choose the unused cores of CPU as priority;12.if all the disks are fullful,stop moving and popup the warning.13.the mentioned modes are alternative(which means there are third choose that to do nothing like without installing plugin),and all numbers mentioned above(expect popup window) of customized mode could be changed in Setting of Xbox Game Bar)
06-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值