Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • checking redhat linux version Linux/Unix
  • on IBM-AIX for display Linux/Unix
  • Temporary tablespace explaination Oracle
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Changing Instance Name ( No DB_NAME) Oracle
  • reset Sequence Oracle
  • Histogram information Oracle
  • plan10g.sql good1 Oracle
  • When error comes for temporary tablespace with version <= 9i Oracle
  • Create type and Grant on it. Oracle
  • Check_recovery.sh program to run sqlplus and return its values remotely. Linux/Unix
  • To see only files and/or folders using LS command Linux/Unix
  • get_vmstat_solaris Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. 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

  • Renaming Oracle Instance Name Oracle
  • Good Site for Oracle Internals Oracle
  • Settting up get_vmstat.sh for colletinf CPU Usage. Oracle
  • All Hints for Oracle Databases Oracle
  • Library cahe Latches and internal explaination Oracle
  • To check whether standby is recovering properly or not?? Oracle

Leave a Reply Cancel reply

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

Categories

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

Recent Posts

  • 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
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • chk_space_SID.ksh Linux/Unix
  • ORA-1841 Error Connecting to Upgraded Database After Set PASSWORD_LIFE_TIME Oracle
  • GSQ.sql Oracle
  • How to analyze statspack or AWR report. Oracle
  • Sending SQLPLUS output in HTML format Oracle
  • Jai Shree Ram Oracle
  • Some useful Unix Commands Linux/Unix
  • Example of How To Resize the Online Redo Logfiles Note:1035935.6 Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme