Move the datafile to release the diskspace on the drive

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;

 

 

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值