Network Forensic & Anomaly Detection System; tailored for covert channel/network steganography detection - cdpxe/nefias. Rename and Clean Up Project File. Navigate to your project folder and rename the.uproject file. Original.uproject - Final.uproject. Then open up Final.uproject with a text editor (not by double-clicking) and rename all instances of Original to Final. In a small project, you should only have to rename the Module name. Original title: 'file name warning' message. In the past week or so, I have been getting a warning box that shows up on my desk top (of Windows 8) whenever I boot up. It says 'There is a file or folder called 'c: Program' which could cause certain applications to not function correctly. Renaming it to 'c: Program1' would solve this problem.
In this Blog, we are discussing about how to change the location of Redolog file along with the Name Change.
This Blog can be used to change the name of redo log file at same location or different location.
Rename Files In Dev City
So we will find out the location of the existing redo log file:
SQL> select member from v$logfile;
MEMBER
———————————————————————————————————————————-
/u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_3_cgf7hpvy_.log
/u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_3_cgf7hpx9_.log
/u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_2_cgf7hmvc_.log
/u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_2_cgf7hmx1_.log
/u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_1_cgf7hk1t_.log
/u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_1_cgf7hk4f_.log
6 rows selected.
SQL>
As per our previous posts, we change the database name from CDB2 to CDB3, however the location of these files does not change with the database name change, we have to do it later with the extra steps.
Find out the log files using OS Commands:
SQL> host ls -lrt /u01/app/oracle/oradata/CDB2/onlinelog
total 153792
-rw-r—– 1 oracle oinstall 52429312 Apr 3 06:30 o1_mf_1_cgf7hk1t_.log
-rw-r—– 1 oracle oinstall 52429312 Apr 3 10:30 o1_mf_2_cgf7hmvc_.log
-rw-r—– 1 oracle oinstall 52429312 Apr 3 13:50 o1_mf_3_cgf7hpvy_.log
SQL>
SQL> host ls -lrt /u01/app/oracle/fast_recovery_area/CDB2/onlinelog
total 153792
-rw-r—– 1 oracle oinstall 52429312 Apr 3 06:30 o1_mf_1_cgf7hk4f_.log
-rw-r—– 1 oracle oinstall 52429312 Apr 3 10:30 o1_mf_2_cgf7hmx1_.log
-rw-r—– 1 oracle oinstall 52429312 Apr 3 13:50 o1_mf_3_cgf7hpx9_.log
SQL>
Create the directories, where we are planning to keep the new files:
SQL> host mkdir /u01/app/oracle/oradata/cdb3/onlinelog
SQL> host mkdir /u01/app/oracle/fast_recovery_area/cdb3/onlinelog
Shutdown the database now and using OS command copy the files with the new name on the new location:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> host cp /u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_3_cgf7hpvy_.log /u01/app/oracle/oradata/cdb3/onlinelog/redo01a.log
SQL> host cp /u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_3_cgf7hpx9_.log /u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo01b.log
SQL> host cp /u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_2_cgf7hmvc_.log /u01/app/oracle/oradata/cdb3/onlinelog/redo02a.log
SQL> host cp /u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_2_cgf7hmx1_.log /u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo02b.log
SQL> host cp /u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_1_cgf7hk1t_.log /u01/app/oracle/oradata/cdb3/onlinelog/redo03a.log
SQL> host cp /u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_1_cgf7hk4f_.log /u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo03b.log
SQL>
After you create the file, we have to start the database in mount stage and alter the location of these log files:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 2516582400 bytes
Fixed Size 2927528 bytes
Variable Size 671089752 bytes
Database Buffers 1828716544 bytes
Redo Buffers 13848576 bytes
Database mounted.
SQL>
SQL> ALTER DATABASE RENAME FILE ‘/u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_3_cgf7hpvy_.log’ to ‘/u01/app/oracle/oradata/cdb3/onlinelog/redo01a.log’;
Database altered.
SQL> ALTER DATABASE RENAME FILE ‘/u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_3_cgf7hpx9_.log’ to ‘/u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo01b.log’;
Database altered.
SQL> ALTER DATABASE RENAME FILE ‘/u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_2_cgf7hmvc_.log’ to ‘/u01/app/oracle/oradata/cdb3/onlinelog/redo02a.log’;
Database altered.
Rename Files In Dev Code
SQL> ALTER DATABASE RENAME FILE ‘/u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_2_cgf7hmx1_.log’ to ‘/u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo02b.log’;
Database altered.
SQL> ALTER DATABASE RENAME FILE ‘/u01/app/oracle/oradata/CDB2/onlinelog/o1_mf_1_cgf7hk1t_.log’ to ‘/u01/app/oracle/oradata/cdb3/onlinelog/redo03a.log’;
Database altered.
SQL> ALTER DATABASE RENAME FILE ‘/u01/app/oracle/fast_recovery_area/CDB2/onlinelog/o1_mf_1_cgf7hk4f_.log’ to ‘/u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo03b.log’;
Database altered.
SQL>
After we rename the files using alter command, we have the new location in the controlfile to pick up. So its time to open the database:
Rename Files In Dev Chrome
SQL> alter database open;
Database altered.
SQL>
Finally check the location of Redo Log File:
SQL> select member from v$logfile;
MEMBER
———————————————————————–
/u01/app/oracle/oradata/cdb3/onlinelog/redo01a.log
/u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo01b.log
/u01/app/oracle/oradata/cdb3/onlinelog/redo02a.log
/u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo02b.log
/u01/app/oracle/oradata/cdb3/onlinelog/redo03a.log
/u01/app/oracle/fast_recovery_area/cdb3/onlinelog/redo03b.log
6 rows selected.
SQL>
Thanks for watching.
Let me know if any questions.
- The C Standard Library
Rename Files In Dev Core
- C Standard Library Resources
- C Programming Resources
- Selected Reading
Description
The C library function int remove(const char *filename) deletes the given filename so that it is no longer accessible.
Declaration
Following is the declaration for remove() function.
Parameters
filename − This is the C string containing the name of the file to be deleted.
Return Value
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.
Rename Files In Dev Console
Example
The following example shows the usage of remove() function.
Let us assume we have a text file file.txt having some content. So we are going to delete this file, using the above program. Let us compile and run the above program to produce the following message and the file will be deleted permanently.