Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • tblwopk.sql tablewopk.sql Oracle
  • SCRIPT TO LIST RECURSIVE DEPENDENCY BETWEEN OBJECTS UTLDTREE.sql Oracle
  • On solaris 10, “S” link is not part of $ORACLE_HOME/bin/oracle as default. ( For 9.2.0.8) Oracle
  • cur_sql.sql Oracle
  • Distributed Transaction Troubleshooting. Oracle
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • Oracle Support Metalink ID 161818.1 Oracle
  • switchover for primary database Oracle
  • How do I get Oracle to automatically start when my server boots up? Oracle
  • How to collect CPU usage on Linux using Shell script Linux/Unix
  • track_autoupgrade_copy_progress.sql Oracle
  • Consolidated Reference List Of Notes For Migration / Upgrade Service Requests -ID 762540.1 Oracle
  • MYSQL and Oracle Comparison for Oracle DBA MYSQL
  • Configure ssh authentications for RAC Oracle
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle

online_ts_bkup.sql

Posted on 29-Jul-2005 By Admin No Comments on online_ts_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 c3 is

select name from v$controlfile

order by name;

cursor c4 is

select member from v$logfile

order by member;

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

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;

/********* Binary control file backup **************/

for cur3 in c3 loop

dbms_output.put_line (‘! scp ‘ || cur3.name || ‘ ‘ || staging_copy_area );

end loop;

/********* Binary control 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: switchlogfile.sh
Next Post: Paste command syntax

Related Posts

  • Find_table_size.sql Oracle
  • EXTPROC Oracle
  • ORA-3136 Oracle
  • Find Plan Hash value fphv.sql Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle

Leave a Reply Cancel reply

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

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (402)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (350)
  • SQL Server (6)
  • Uncategorized (5)
  • Videos (0)

Recent Posts

  • SAT Mathematics 10 questions and answer at the end.30-Apr-2026
  • top 10 AI news today30-Apr-2026
  • runon_allpdbs_show_conname.sh23-Apr-2026
  • runon_allcdbs_find_pdbs.sql23-Apr-2026
  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • switchover for primary database Oracle
  • Goldengate document from Porus Oracle
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • tuning commmand for cpu, ip and memory stats Linux/Unix
  • Very Good Oralce Internal Tuning Book Oracle
  • Building Our Own Namespaces with “Create Context” Oracle
  • USE_NL and INDEX hints example Oracle
  • Nice Article about semaphores and init.ora Processes parameter relations Linux/Unix

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme