Move the datafile to release the diskspace on the drive

Source: Internet
Author: User

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,201 0, 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,201 0, 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:
A 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,201 0, 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;

 

 

 

 

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.