Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • replacing ^M character when passing files from Windows to Unix Linux/Unix
  • How to find Unix server conguraiton including Server Model number and underlying disk sub-system ( On Solaris) Linux/Unix
  • sql_doing_fts.sql Oracle
  • Identical Dblink Issue… Oracle
  • Specify the Rollback segment to use in Transaction Oracle
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle
  • TOP-N Sql to find Nth max or Top N rows Oracle
  • TABLE SIZING WITH DB_BLOCK ARCHITECTURE Reference : Metalink note : 10640.1 Oracle
  • Jai Shree Ram Oracle
  • column level grant syntax Oracle
  • Create type and Grant on it. Oracle
  • Index Range Scan Oracle
  • How to know current SID Oracle
  • OEM-Commnds Oracle
  • compile_inv.sql Oracle

online_bkup.sql

Posted on 15-Sep-2005 By Admin No Comments on online_bkup.sql

set serveroutput on

execute dbms_output.enable(20000);

declare

cursor c1 is

select distinct tablespace_name

from dba_data_files

order by tablespace_name;

cursor c4 is

select member from v$logfile

order by member;

staging_copy_area varchar2(100) := ‘10.201.43.51:/uocdb1/oradata/UOC’;

begin

for cur in c1 loop

dbms_output.put_line (‘alter tablespace ‘ || cur.tablespace_name || ‘ begin backup;’);

declare

cursor c2 is

select file_name

from dba_data_files

where tablespace_name = cur.tablespace_name

order by file_name;

begin

for cur1 in c2 loop

dbms_output.put_line (‘! scp ‘ || cur1.file_name || ‘ ‘ || staging_copy_area );

end loop;

end;

dbms_output.put_line (‘alter tablespace ‘ || cur.tablespace_name || ‘ end backup;’);

end loop;

/********* log file backup **************/

for cur4 in c4 loop

dbms_output.put_line (‘! scp ‘ || cur4.member || ‘ ‘ || staging_copy_area );

end loop;

end;

/

Oracle, SQL scripts

Post navigation

Previous Post: Global Unique Identifier Generation in Oracle 9.2 SYS_GUID()
Next Post: Set Role explaination.

Related Posts

  • Index Range Scan Oracle
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • fkwoind.sql fkwoindex.sql Oracle
  • SQL_PLAN.sql for checking real execution plan Oracle
  • Updated LCK.SQL file. Oracle
  • arch_configUOCIOTTO.ora Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • Oracle Recommended Patches — Oracle Database ID 756671.1 Oracle
  • Windows based Command line mailing program like mailx (Sednmail for windows) PHP/MYSQL/Wordpress
  • For Search and replace unix command. Linux/Unix
  • TNSNAMES entries details Oracle
  • Space padding in korn shell Linux/Unix
  • DBMS_Shared_pool pinning triggers Oracle
  • move_arch_files.ksh /* Good One */ Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme