Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • plan10g.sql Oracle
  • cp_filesystem.sql Oracle
  • FGA Part-I Oracle
  • Move WordPress site from one hosting service to other. PHP/MYSQL/Wordpress
  • pvm_metric.sql for gathering report from vmstat tables Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • Difference between SYNC and AFFIRM Oracle
  • How to start CRS manually Oracle
  • cif crons Linux/Unix
  • Disbaling DBA_SCHEDULER_JOBS Oracle
  • Gathering statistics with DBMS_STATS Oracle
  • sid_wise_cursor.sql find open cursor basis on username or SID Oracle
  • Find_table_size.sql Oracle
  • Renaming the column name Oracle
  • Another Tuning Article for subheap of shared pool 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

  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • ORACLE_SID in sqlplus Oracle
  • Good Oracle Architecture In Short and point to point Oracle
  • tab.sql Oracle
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • Standby Database File Management in 10g with STANDBY_FILE_MANAGEMENT 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 (394)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (343)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • tracksqltime.sql05-Mar-2026
  • Complete Git Tutorial for Beginners25-Dec-2025
  • Postgres DB user and OS user.25-Dec-2025
  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • sid_wise_sql.sql Oracle
  • restarting network in linux Linux/Unix
  • Good notes for shared pool Oracle
  • Check SQL Server edition SQL Server
  • Important Solaris Commands Linux/Unix
  • nfs mount command Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Oracle 11g Environment Setup Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme