Home > database >  Linux install oralce11g, table space migration to modify the correct address
Linux install oralce11g, table space migration to modify the correct address

Time:09-25

Under Linux installed oracle, use for a long time, the space is full, ready to put the oracle in the home directory, the original table space address is/opt/app/oracle/oradata/former/RRS. DBF, and execute the select the name from v $datafile; There is the data file,

I'll perform the alter in tablespace RRS offline; Then DBF files are copied to the home directory in tableSpace folder (folder open 777 permissions) in advance, and then execute the alter database rename file '/home/in tableSpace/POWER. DBF' to '/opt/app/oracle/oradata/former/POWER. DBF'; Statements, at that time to quote the following error:
ORA - 01511: the error renaming in the log/data files
ORA - 01516: nonexistent log file, data file, or temporary file
"/opt/oracle/app/oradata/former/RRS. DBF"
Can't find the source data files, online to find a large amount of data, tried database under the mount start, start, and so on, under the open is the error, the Internet also can not find the answer about this problem, please teach

CodePudding user response:

 
SQL> The create in tablespace test datafile 'c: \ test. DBF' size 1 m;

Table space is created,

SQL> The alter in tablespace test offline;

Table space is changed,

SQL> The exit
From the Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0-64 - bit Production
With the Partitioning, OLAP, Data Mining, and Real Application Testing options to break
Open

C: \ Users \ wanglj> Move the c: \ test. DBF d: \ test. DBF
Moves a file,

C: \ Users \ wanglj> Up sqlplus "/as sysdba"

SQL * Plus: Release 11.2.0.4.0 Production on Monday December 18 23:11:20 2017

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


To connect to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0-64 - bit Production
With the Partitioning, OLAP, Data Mining, and Real Application Testing options

SQL> The alter in tablespace test rename datafile 'c: \ test. DBF' to 'd: \ test. DBF';

Table space is changed,

SQL> The alter in tablespace test online;

Table space is changed,

SQL> Create table test (int id, name varchar (10)) in tablespace test;

The table is created,

SQL> Insert into test values (100, 'XXX');

The created 1 row,

SQL> Select * from the test;

ID NAME
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
100 XXX

SQL>

CodePudding user response:

reference 1st floor wmxcn2000 response:
 
SQL> The create in tablespace test datafile 'c: \ test. DBF' size 1 m;

Table space is created,

SQL> The alter in tablespace test offline;

Table space is changed,

SQL> The exit
From the Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0-64 - bit Production
With the Partitioning, OLAP, Data Mining, and Real Application Testing options to break
Open

C: \ Users \ wanglj> Move the c: \ test. DBF d: \ test. DBF
Moves a file,

C: \ Users \ wanglj> Up sqlplus "/as sysdba"

SQL * Plus: Release 11.2.0.4.0 Production on Monday December 18 23:11:20 2017

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


To connect to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0-64 - bit Production
With the Partitioning, OLAP, Data Mining, and Real Application Testing options

SQL> The alter in tablespace test rename datafile 'c: \ test. DBF' to 'd: \ test. DBF';

Table space is changed,

SQL> The alter in tablespace test online;

Table space is changed,

SQL> Create table test (int id, name varchar (10)) in tablespace test;

The table is created,

SQL> Insert into test values (100, 'XXX');

The created 1 row,

SQL> Select * from the test;

ID NAME
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
100 XXX

SQL>


reference 1st floor wmxcn2000 response:
 
SQL> The create in tablespace test datafile 'c: \ test. DBF' size 1 m;

Table space is created,

SQL> The alter in tablespace test offline;

Table space is changed,

SQL> The exit
From the Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0-64 - bit Production
With the Partitioning, OLAP, Data Mining, and Real Application Testing options to break
Open

C: \ Users \ wanglj> Move the c: \ test. DBF d: \ test. DBF
Moves a file,

C: \ Users \ wanglj> Up sqlplus "/as sysdba"

SQL * Plus: Release 11.2.0.4.0 Production on Monday December 18 23:11:20 2017

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


To connect to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.4.0-64 - bit Production
With the Partitioning, OLAP, Data Mining, and Real Application Testing options

SQL> The alter in tablespace test rename datafile 'c: \ test. DBF' to 'd: \ test. DBF';

Table space is changed,

SQL> The alter in tablespace test online;

Table space is changed,

SQL> Create table test (int id, name varchar (10)) in tablespace test;

The table is created,

SQL> Insert into test values (100, 'XXX');

The created 1 row,

SQL> Select * from the test;

ID NAME
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
100 XXX

SQL>


nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related