Posts

Showing posts from June, 2023

How To Move Or Rename The Tempfile In Oracle

 Log in SYSDBA  Check  Tempfile  status SQL> SELECT v.file#, t.file_name, v.status 2 FROM dba_temp_files t, v$tempfile v 3 WHERE t.file_id = v.file#; FILE# FILE_NAME STATUS ---------- ------------------------- ------- 1 /appsolworld/temp01.dbf ONLINE 2 /appsolworld/temp02.dbf ONLINE 3 /appsolworld/temp03.dbf ONLINE  Make it OFFLINE the tempfile that has to move SQL> ALTER DATABASE TEMPFILE '/appsolworld/temp01.dbf' OFFLINE; We should make offline the tempfile that has to move, if not then will get this error : SQL> ALTER DATABASE RENAME FILE '/appsolworld/temp01.dbf' TO '/u02/temp01.dbf'; ALTER DATABASE RENAME FILE '/appsolwolrd/temp01.dbf' TO '/u02/temp01.dbf' * ERROR at line 1: ORA-01511: error in renaming log/data files ORA-01121: cannot rename database file 1026 - file is in use or recovery ORA-01110: data file 1026: '/appsolworld/

How To Text The File Using Linux Cat Command

 Overview ======== Here we look at how to write text into a file using the Linux cat command. The cat Command ================ Cat command's common usages is to print the content of a file onto the standard output stream. Other than that, the cat command allows us to write some texts into a file. The Syntax ========== Please look at the general syntax of the cat command: cat [OPTION] [FILE] Copy First, OPTION is a list of flags we can apply to modify the command’s printing behavior,  whereas FILE is a list of files we want the command to read. Making cat Read From stdin ========================== Let’s execute the cat command: cat Now try to enter some texts into the terminal: cat This is a appsolworld This is a appsolworld Once we are done, we can terminate the command by pressing CTRL+D. [demantra@dsiddem demantra]$ cat >> a appsolworld ^C [demantra@dsiddem demantra]$ cat a sfsfsfsd appsolworld [demantra@dsiddem demantra]$ cat > a this [demantra@dsiddem demantra]$ cat a